Remove truncation from parent menu

Created on 23 May 2011, over 13 years ago
Updated 5 August 2024, about 1 month ago

Problem/Motivation

When I add a new link in a menu and I select the parent link. The option list with the links appears truncated.

The function that truncate the title with a maximum of 30 characters is parentSelectOptionsTreeWalk in core/lib/Drupal/Core/Menu/MenuParentFormSelector.php. (Line 163)

$title = $indent . ' ' . Unicode::truncate($link->getTitle(), 30, TRUE, FALSE);

Does this limit exist for some special reason? And what would be the best way to override it?

Steps to reproduce

From #19

Steps to test -
1. Go to the admin site.
2. Go to admin/structure/menu/manage/admin/add?destination=/drupal9.1.x-dev/admin/structure/menu.
3. Create a menu link.
4. Again Go to admin/structure/menu/manage/admin/add?destination=/drupal9.1.x-dev/admin/structure/menu.
5. Verify the parent link field.

Proposed resolution

#24 :

we should just remove the truncation altogether.

Before:

After:

Remaining tasks

Write tests

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

None

πŸ“Œ Task
Status

Needs work

Version

11.0 πŸ”₯

Component
Menu moduleΒ  β†’

Last updated 23 days ago

Created by

πŸ‡ͺπŸ‡ΈSpain mordonez

Live updates comments and jobs are added and updated live.
  • Needs usability review

    Used to alert the usability topic maintainer(s) that an issue significantly affects (or has the potential to affect) the usability of Drupal, and their signoff is needed. When adding this tag, make it easy to review the issue. Make sure the issue summary describes the problem and the proposed solution. Screenshots usually help a lot! To get sign-off on issues with the "Needs usability review" tag, post about them in the #ux channel on Drupal Slack, and/or attend a UX meeting to demo the patch and get direct feedback from designers/UX folks/product management on next steps. If an issue represents a significant new feature, UI change, or change to the general "user experience" of Drupal, use Needs product manager review instead. See the scope of responsibilities for product managers.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024