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

Slugify Sketch Titles, but not publicly exposed #522

Open
1 task done
catarak opened this issue Feb 7, 2018 · 7 comments
Open
1 task done

Slugify Sketch Titles, but not publicly exposed #522

catarak opened this issue Feb 7, 2018 · 7 comments

Comments

@catarak
Copy link
Member

catarak commented Feb 7, 2018

Nature of issue?

  • Existing feature enhancement

Feature enhancement details:

Right now, the link to sketches are only by the sketch id, which is not very human readable. It would be cool to have human friendly links. For now, the simplest version of this would be to generate a slug every time a sketch is saved from the title of the project, and then a user can navigate to the sketch using that slug by going to /<username>/sketches/<slug>.

@catarak
Copy link
Member Author

catarak commented Oct 25, 2018

i think this could be expanded a bit:

  • slugified sketch names should have a length limit
  • if a user changes the name of the sketch, what should happen? should the slug change? should it not change? should it be like wordpress in which the user has to manually re-generate the slug?
  • how do you make sure slugs are unique per user?

@ankur54
Copy link

ankur54 commented Mar 12, 2019

Hi. I would like to work on this issue if no one is currently working.

@catarak
Copy link
Member Author

catarak commented Mar 13, 2019

@ankur54 go ahead and work on it!

@ankur54
Copy link

ankur54 commented Mar 14, 2019

After a little bit of searching over the internet, I came across a dependency "slugify" npm, which I intend to use. Also, could you please tell me in which file should I make changes?

@catarak
Copy link
Member Author

catarak commented Mar 14, 2019

slugify is already included, and you can already navigate to sketches via their slug. however, it's never linked to on the front end, so this issue is about linking it on the front end. there's not currently a design for this, and also i have some open questions which i listed above

@ankur54
Copy link

ankur54 commented Mar 14, 2019

a) I think there should be a length limit. Around 40 letters would do, I think. If the length exceeds we can represent it with "...".
b) if a user changes the name of the sketch, I think, it would be better if slug updates automatically.

What do you think?

@catarak
Copy link
Member Author

catarak commented Mar 14, 2019

a) in #568 there's a discussion about the maximum length of a sketch name. i wonder if that would fix this issue. i think it depends on the maximum length of a url (which off the top of my head, i don't know what that is)
b) the problem with generating a new slug automatically is if a user has linked to that sketch. then, a link they possibly thought was permanent has changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants