Addons-frontend: Create collection form doesn't indicate that there is a 30 character limit for collection slug prior to submitting the form

Created on 24 Jan 2019  路  4Comments  路  Source: mozilla/addons-frontend

Describe the problem and steps to reproduce it:

What happened?

I received an error saying "Ensure this field has no more than 30 characters."

What did you expect to happen?

  • help text near "collection name" slug stating a character limit
  • validation cues prior to clicking create collection
  • maybe make the "create collection" button insensitive to user input if more than 30 characters is entered edit: we won't do that

Anything else we should know?

For QA: I (@willdurand) believe the bug is in fact related to the slug field. When one creates a new collection, the collection name is used to create the slug. A collection name with more than 30 chars is allowed but not a slug. When the slug is auto-generated from the name, we should limit this generated value to 30 chars.

collections ux assigned maybe good first bug welcome p4 verified fixed

Most helpful comment

So this limit applies on the slug and not on the name of the collection. I have updated the title/description to reflect that.

All 4 comments

I guess we could add a maxlength attribute to the input at least: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/text#maxlength.

So this limit applies on the slug and not on the name of the collection. I have updated the title/description to reflect that.

@willdurand I think there is no limit right now on AMO dev and AMO stage - I tried with more than 30+ chars and I do not receive any message. Not reproducible on AMO prod.

too many chars

@willdurand Sorry for misunderstanding. This is how it should be : the slug is automatically set at 30 chars max even if the name of the collection will be way longer than that.
The warning message is no longer displayed now.
Verified on AMO dev and AMO stage with FF65 (Win10).

Was this page helpful?
0 / 5 - 0 ratings