Skip to content

Organization: auto populate slug on creation #623

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

Merged
merged 9 commits into from
Jul 8, 2025

Conversation

humitos
Copy link
Member

@humitos humitos commented Jul 3, 2025

Show the slug field when creating the organization and auto-populate it based
on the name of the organization.

Peek.2025-07-03.17-43.webm

Requires readthedocs/readthedocs.org#12297
Closes #25

humitos added 3 commits July 3, 2025 17:52
Show the `slug` field when creating the organization and auto-populate it based
on the name of the organization.

Requires readthedocs/readthedocs.org#12297
Closes #25
@humitos humitos requested a review from a team as a code owner July 3, 2025 15:59
@humitos humitos requested a review from agjohnson July 3, 2025 15:59
@agjohnson
Copy link
Contributor

On the UX side of things, I think the user needs to see a live update field with something like:

"Example project default URL: https://org-slug-example-project.readthedocs-hosted.com"

Users won't understand from this that the organization slug is going to affect project URLs. Largely, they won't know what the organization slug does at all, really.

So on the implementation side, exposing the slug field as a visible input is maybe not what we want. We probably want a separate UI with a bit more explanation of the slug. This might also make my suggestion on using a web component more applicable -- instead of altering a form field the web component would render a segment with a verbose explanation of project URLs/etc.

@humitos
Copy link
Member Author

humitos commented Jul 7, 2025

OK. I re-wrote this JS using knockout and I added a UI element (grabbed from redirects page) that shows a live example of a project URL:

Peek.2025-07-07.11-19.webm

@humitos humitos requested a review from agjohnson July 7, 2025 09:20
@agjohnson
Copy link
Contributor

You might have missed push up the code here, I don't see any new changes.

@humitos
Copy link
Member Author

humitos commented Jul 7, 2025

Ha, indeed, you are correct. I just pushed them 😄

Copy link
Contributor

@agjohnson agjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hiding the block when it's empty works, but makes the UI jump around. I think defaulting to a placeholder when the slug is empty is probably better and would always show this block with something useful.

@humitos humitos merged commit 2ca4b1f into main Jul 8, 2025
4 checks passed
@humitos humitos deleted the humitos/auto-populate-organization-slug branch July 8, 2025 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support manual slugs and slug verification on organization creation
2 participants