Problem/Motivation

Follow up from #3317769: Add support for linking to entities in CKEditor 5

When node titles matching the pattern are long (e.g. greater than 40 characters), the editing interface width expands to accommodate the content without expanding beyond the container.

Steps to reproduce

  1. Install Drupal
  2. Enable the entity links filter
  3. Create a node with a title that is longer than 40 chars
  4. Try to create a link and search for the node, see that the editing interface expands

Screenshot of Link dialog demonstrating text overflowing the containing element

Proposed resolution

1. Set long titles to break on word boundaries so that the title can wrap within the predefined CKEditor balloon widget width.
2. Set a max-width, scoped specifically to this element, limit the automatic calculation provided by CKEditor to a usable length.

Screenshot of Link dialog demonstrating text being contained within the containing element

Remaining tasks

N/A

User interface changes

N/A

Introduced terminology

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

Issue fork drupal-3558934

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

pameeela created an issue. See original summary.

pameeela’s picture

charles belov’s picture

I'd like to review this as to whether I agree with the proposed solution, but I'm having trouble getting the relevant patch to apply on simplytest.me. I've posted a comment on #3317769: Add support for linking to entities in CKEditor 5 concerning that failure. Hopefully it will be easy to resolve so that I can proceed with my test.

My specific concern would be that if the node title is to be truncated, and there are two similar titles which only differ from one another in the truncated portion, it would be difficult to tell which was the correct page.

pameeela’s picture

Status: Active » Postponed

This should be postponed until the other issue is merged, my bad. There is nothing to review just yet as we can’t work on this until it’s committed.

mark_fullmer made their first commit to this issue’s fork.

mark_fullmer’s picture

Issue summary: View changes
mark_fullmer’s picture

Status: Postponed » Needs review
smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs screenshots

Can we get screenshots added to the summary please.

mark_fullmer’s picture

Issue summary: View changes
Status: Needs work » Needs review
Issue tags: -Needs screenshots
StatusFileSize
new81.42 KB
new71.99 KB

Screenshots added. Setting back to "Needs review."

charles belov’s picture

Thank you for the screen capture. I was misunderstanding what you wanted to happen to the long titles.

I just tested this and simplytest.me, and it works well with regard to the proposed change.

pameeela’s picture

Issue summary: View changes
StatusFileSize
new26.65 KB

I just pushed a slight styling tweak to the line height of the title, updated screenshot in the IS.

smustgrave’s picture

Status: Needs review » Needs work

Screenshots look good!

Moving to NW for the stylint issue

Thanks for the screenshots

pameeela’s picture

Status: Needs work » Needs review

Oops, fixed.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Thanks! LGTM

needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new682 bytes

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

smustgrave’s picture

Status: Needs work » Reviewed & tested by the community

Small styelint issue.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new734 bytes

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

smustgrave’s picture

Status: Needs work » Reviewed & tested by the community

Bot rebellion

longwave’s picture

Version: main » 11.3.x-dev
Status: Reviewed & tested by the community » Fixed

Backported down to 11.3.x as an eligible bug fix. Doesn't apply to 10.6.x, not sure it's worth it (if it's even a problem there)

Committed and pushed 8e33db3d8c4 to main and ee17dd9fc49 to 11.x and 21c5ec4dca4 to 11.3.x. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • longwave committed 21c5ec4d on 11.3.x
    fix: #3558934 Fix styling of link autocomplete with long titles
    
    By:...

  • longwave committed ee17dd9f on 11.x
    fix: #3558934 Fix styling of link autocomplete with long titles
    
    By:...

  • longwave committed 8e33db3d on main
    fix: #3558934 Fix styling of link autocomplete with long titles
    
    By:...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.