You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The WorkspaceCreateForm (/{project_name}/new-workspace/) has a field, name, which must be a valid slug (a short label suitable for use in a URL, containing only letters, numbers, underscores or hyphens). If the user does not enter a valid slug, the validation fails server-side and the form reloads, which is slow (see #4685). It's not so-reasonable to require a human to type out a slug, or to require two trips to the form if they make a mistake. The UX here could be improved. #4682 added some help_text explaining the requirement, but this seems unsatisfactory.
Suggestion: Apply django.utils.text.slugify in clean_name() or wherever, to convert what the user entered to a valid slug. Presumably the issue is usually they have used spaces in the name, which is easily fixed while maintaining their intent. We already lower-case the name.
Alternatively/additionally the client-side JavaScript could prevent entering non-slug characters by adding an onkeypress event listener.
Or maybe name should be free human-readable text and the slug should be separate.
The text was updated successfully, but these errors were encountered:
The
WorkspaceCreateForm
(/{project_name}/new-workspace/
) has a field,name
, which must be a valid slug (a short label suitable for use in a URL, containing only letters, numbers, underscores or hyphens). If the user does not enter a valid slug, the validation fails server-side and the form reloads, which is slow (see #4685). It's not so-reasonable to require a human to type out a slug, or to require two trips to the form if they make a mistake. The UX here could be improved. #4682 added somehelp_text
explaining the requirement, but this seems unsatisfactory.Suggestion: Apply
django.utils.text.slugify
inclean_name()
or wherever, to convert what the user entered to a valid slug. Presumably the issue is usually they have used spaces in the name, which is easily fixed while maintaining their intent. We already lower-case the name.Alternatively/additionally the client-side JavaScript could prevent entering non-slug characters by adding an
onkeypress
event listener.Or maybe
name
should be free human-readable text and theslug
should be separate.The text was updated successfully, but these errors were encountered: