Empty description results in empty markup

Created on 21 April 2021, over 3 years ago
Updated 9 May 2024, 5 months ago

Problem/Motivation

When an autocomplete suggestion with an empty description is output, the suggestion markup will contain an empty < span > for the description.

The empty span does not really hurt, but is unnecessary. I noticed it because it with our (custom) admin theme the empty span was highlighted when hovering over a suggestion leading to a weird visual glitch.

Steps to reproduce

  1. Add a Linkit profile with a matcher, but leave the "Description" field of the matcher empty
  2. Enable the Linkit profile in an editor and open the Linkit dialog form an instance of that editor
  3. Enter something that will yield an autocomplete suggestion
  4. Inspect the markup of the autocomplete suggestions

Notice how each suggestion will contain an empty < span class="linkit-result--description" > element.

Proposed resolution

?

The suggestion response contains an empty string as the description value, if the description is empty, but the autocomplete JS checks for a null value and only omits the description markup in that case. Somehow these two need to be synced up, not sure which side should be adapted and how.

Remaining tasks

  • Agree on solution
  • Implement solution

User interface changes

?

API changes

?

Data model changes

?

πŸ› Bug report
Status

Closed: won't fix

Version

4.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany tstoeckler Essen, Germany

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

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

  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    For some time now, as indicated by the Linkit project page β†’ , the 8.x-4.x branch of Linkit is not undergoing active development.

    To help the maintainers of the Linkit module better steward tasks under active development, I'm going to mark this issue as closed (wontfix). Sites using 8.x-4.x can certainly continue to do so, but should make plans for updating to the latest supported version of Linkit.

    Even better: Drupal core will soon provide link autocomplete suggestions in CKEditor similar to what this module does. Sites using or considering using Linkit should follow this core issue ✨ Drastically improve the linking experience in CKEditor 5 Needs work to evaluate whether they can use the core solution instead of Linkit. See feature differences below to compare what Linkit includes that will not initially be in Drupal core.

    If this issue relates to a problem or feature request that is applicable to the latest supported version of Linkit, please create a new issue, associated with that branch, describing the bug or enhancement.

    For participation and information in Linkit's roadmap, see 🌱 LinkIt Release Roadmap and Issue Prioritization Active .

    Thanks, community, for you collaboration and consideration!

Production build 0.71.5 2024