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

Generate unique slug for the group when provided group slug exists #289

Open
wants to merge 1 commit into
base: 1.2.x
Choose a base branch
from

Conversation

Mamaduka
Copy link
Member

@Mamaduka Mamaduka commented Apr 29, 2020

@boonebgorges update the logic as you suggested.

  • AJAX error now returns a unique slug. This is used to replace the suggested one.
  • There 5-second delay and if a user starts typing new slug. Replacement action will be canceled.

Closes: cuny-academic-commons/commons-in-a-box#210

@boonebgorges
Copy link
Member

Thanks for working on this, @Mamaduka.

I find the 5 second delay to be a bit confusing, as a user. It only takes a second or so for the AJAX request, at which point the 'That URL is already taken' notice is already shown. It's only after a few seconds that the new suggestion is popped into the box, without any indication that it's happening. I understand as the developer that the delay is to allow me time to begin making my own adjustments, but that doesn't feel clear as a user.

Maybe we can rethink this a bit. Instead of replacing the slug after 5 seconds, how about:

  1. The AJAX request sends back a unique URL, as you've written it.
  2. Instead of showing the generic 'That URL is already taken', have a message like That URL is already taken. [Use "foo-2" instead] or enter a new URL. The bracketed text would be styled as a link, and when clicked, it'd do the replacement.

In other words, we require manual intervention from the user before doing any replacement. @bree-z @jennaspevack what do you think about this approach?

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.

2 participants