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

Navigation Screen: put a limit on the name of the menu #34512

Closed
annezazu opened this issue Sep 2, 2021 · 2 comments · Fixed by #35188
Closed

Navigation Screen: put a limit on the name of the menu #34512

annezazu opened this issue Sep 2, 2021 · 2 comments · Fixed by #35188
Assignees
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@annezazu
Copy link
Contributor

annezazu commented Sep 2, 2021

Description

One can currently input an extremely long name into the menu title field causing a cascading number of issues wherever the name is used. It seems as though a limit should be put on the field.

Step-by-step reproduction instructions

  1. Head to the navigation editor.
  2. Name the menu something really long.
  3. See various errors :)

Screenshots, screen recording, code snippet

Screen Shot 2021-09-02 at 3 42 54 PM

Screen Shot 2021-09-02 at 3 42 49 PM

https://user-images.githubusercontent.com/26996883/131906562-af84c8fb-3e8d-412e-802f-6eca851e2fda.mov

Environment info

  • WordPress 5.8
  • Gutenberg 11.4
  • Desktop MacOs

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@annezazu annezazu added [Type] Bug An existing feature does not function as intended [Feature] Navigation Screen labels Sep 2, 2021
@Mamaduka
Copy link
Member

@javierarce Do you have a character limit in mind? We can have different for small screen and desktop.

@Mamaduka
Copy link
Member

It looks like the character limit for Menu names is 200. It is the same limit as for term names.

The editor will display the error notice if you create a menu using a name > 200 chars. We have the same behavior on the current screen, so we don't have to change anything here.

I can create PoC PR that truncates menu names after a specific limit, and we can iterate on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants