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

Use "slug" names, instead of full project / font names in URL #29

Open
justvanrossum opened this issue Dec 9, 2022 · 4 comments
Open

Comments

@justvanrossum
Copy link
Collaborator

These are designed to work nicely in URLs.

Compare:
image
with:
image

@justvanrossum
Copy link
Collaborator Author

Problem: neither the currently used display names as the slug names are guaranteed to be unique. We should probably add some unique element to the URL, like the font UUID.

What do you think, @fabiocaccamo?

@fabiocaccamo
Copy link
Collaborator

fabiocaccamo commented Dec 9, 2022

Database entities already have an hashid field (generated using the hashids lib), the purpose of this field is to obfuscate the incremental database id while keeping the id string short (compared to the uuid). It's guaranteed to be unique.

I think we could use the font hashid as last path name in the url, the resulting URL would be something like: /-/gs-testing/hanzi/g4zw3ixz/.

In case we decide to proceed with this solution, we must also expose the hashid field value through the APIs.

@justvanrossum
Copy link
Collaborator Author

In case we decide to proceed with this solution, we must also expose the hashid field value through the APIs.

No need: the Fontra server could make the hashid itself from the font ID.

@fabiocaccamo
Copy link
Collaborator

If you want to use independent hashids yes, you can do it on the client side from the font ID, but if you need to generate the same hashid that there is in the database you must use the same settings.

@nedkamburov nedkamburov moved this to 📋 Backlog in Fontra Project Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants