Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When entering a map title it should accept spaces and replace them with hyphens in the URL #536

Open
prototyperspective opened this issue Oct 19, 2024 · 1 comment
Labels
enhancement New feature or request ok first issue Clear & narrow scope but tougher than "good first issue" QoL small change the improves the feel of using the tool

Comments

@prototyperspective
Copy link

Describe your issue

When creating a new topic most users will probably add a sentence with spaces. It will show an error and many will not understand what the problem is. Moreover, it shouldn't be a problem at all.

Solution you'd like

The title with spaces could be displayed somewhere at the map and the URL get automatically changed so it replaces spaces with hyphens -

Alternatives you've considered

No response

Additional context

Created a topic named like https://ameliorate.app/Prototyperspective/CarsAreHarmfulToSociety because I didn't think of using spaces because I didn't know this title was used for the URL. It would be better to have all topics with spaces like …/problems-of-cars

Technical ideas and questions

No response

@prototyperspective prototyperspective added enhancement New feature or request needs review Hasn't been reviewed by a maintainer yet labels Oct 19, 2024
@keyserj
Copy link
Collaborator

keyserj commented Oct 21, 2024

Yeah this seems good to do at some point. I think these are roughly the needed changes:

  1. allow the topic.title column to have spaces (currently is disallowed via zod validation)
  2. continue displaying the title wherever we currently are
  3. replace all spaces with hyphens wherever the title is used for a URL

Known places where title is used for URL:

  1. topic settings "view your topic at..."
  2. user page, topic column (display text should be same, anchor text should be replaced)
  3. topic details pane "[username]/[title]" (display text should be same, anchor text should be replaced)

@keyserj keyserj added ok first issue Clear & narrow scope but tougher than "good first issue" QoL small change the improves the feel of using the tool and removed needs review Hasn't been reviewed by a maintainer yet labels Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ok first issue Clear & narrow scope but tougher than "good first issue" QoL small change the improves the feel of using the tool
Projects
Status: No status
Development

No branches or pull requests

2 participants