Problem/Motivation

Filter tips show up on every text field by default in Drupal. There is no way to switch it off via the UI.

#3063877: Add access control to /filter/tips adds a way to hide it (don't give anyone the permission), but I wonder if we really need it at all.

Drupal has shipped with ckeditor for years, and hand editing HTML is at best discouraged with ckeditor5.

When formatting tips are actually needed, we already provide field descriptions which site admins can edit - this would allow them to give a couple of markdown examples, link to external resources etc.

Apart from being mostly redundant, the page also looks extremely dated.

filter tips screenshot with lots of examples of how to use basic HTML tags

Another filter tips screenshot, this time including text like 'No help given for li'

Steps to reproduce

Proposed resolution

Entirely remove the functionality in a minor release of Drupal core.

Remove the 'tips' method from the interface for filter plugins, open a follow-up issue to remove it from the base class for Drupal 12.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3505370

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

catch created an issue. See original summary.

catch’s picture

dqd’s picture

+1 for raising this. My vote for it and 100% agree with the argumentation and reasons. And it would close a group of other issues. Additionally it minimizes the efforts to keep track with those tips and all possible combinations of allowed tags etc and it never really looked well seated under the textareas of body and comment fields and was kind of circumventing to style. And since we do not have any hard wired dependencies in core with this part of filter.module it would be mainly removing the respective parts in web/core/modules/filter (tips) and making sure that it does not break contrib in case that modules use tips to place their own (if any?)

When formatting tips are actually needed, we already provide field descriptions which site admins can edit - this would allow them to give a couple of markdown examples, link to external resources etc.

And which gives far more flexibility. Also in how it looks or how it is implemented (markup). Only drawback is that it do not change it's tips automatically regarding the allowed tags when switching between formats, I worry? Maybe we should provide a token which picks up the allowed tags from the formats to be used in the field description?

lauriii’s picture

+1 for the removal as discussed during the Burgas onsite. The content on this page isn't relevant in the world of CKEditor 5.

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

catch’s picture

Status: Active » Needs work

MR looks good so far, except I think we probably need to remove the method from FilterInterface rather than deprecate it.

We also need to remove the filter tips link from Drupal\filter\Element and should deprecate the route that it points to (which we can do now after https://www.drupal.org/node/3317784).

There are some templates in claro/stable etc. not sure if we can remove those yet or if it would need to happen in a 12.x-only issue.

chi changed the visibility of the branch 3505370-remove-filter-tips to hidden.

eelkeblok’s picture

What is the reason for hiding the branch?

quietone changed the visibility of the branch 3505370-remove-filter-tips to active.

longwave’s picture

Are we intending to remove just /filter/tips and the "long" format of tips here, or the "short" format and guidelines as well?

If we remove the guidelines/short format, then (when multiple formats are allowed) it's not necessarily clear to end users what the difference is if they select different text formats from the dropdown.

If we keep the guidelines, we could hide them in the case that only one format is available?

catch’s picture

I think when I opened this, I didn't realise that the ::tips() method provides both the long and short versions of the tips. The main purpose of the issue was to remove the 'long' tips.

Having said that:

If we remove the guidelines/short format, then (when multiple formats are allowed) it's not necessarily clear to end users what the difference is if they select different text formats from the dropdown.

This is no longer the case for ckeditor-enabled formats because you get a different toolbar depending on the configuration. But it is the case where there's no wysiwyg editor and could be pretty confusing. Although if there's only one available format, it's possible to add a description in the field config to say you can use markdown etc.

Given all that I think this issue should be about removing the $long argument from the interface method, and the route, and the link to the route. But we should open a follow-up to try to streamline the short tips behaviour too as you mentioned.

longwave’s picture

Title: Remove 'filter tips' and deprecate the API » Remove 'filter tips' page and deprecate the long format API
Version: 11.x-dev » main
Status: Needs work » Needs review

Pipeline is green, also wrote a change record, think this is ready for review.

catch’s picture

Two small comments on the MR, otherwise looks great!

longwave’s picture

Responded - I think we should leave /filter/tips working for end users in 11.x but it can go away in 12.

catch’s picture

Status: Needs review » Reviewed & tested by the community

OK that makes sense, don't think there is anything left to do here.

quietone’s picture

needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new2.81 KB

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.

longwave’s picture

Status: Needs work » Reviewed & tested by the community

  • larowlan committed 44ec56df on 11.x
    task: #3505370 Remove 'filter tips' page and deprecate the long format...

  • larowlan committed 03b4ba43 on main
    task: #3505370 Remove 'filter tips' page and deprecate the long format...
larowlan’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Fixed
Issue tags: -11.4.0 release priority +11.4.0 release highlights

Committed to main and backported to 11.x
Kind of feels odd to add to main when we'll want to turn around and delete it shortly, but 🤷 this is our process

Thanks folks, glad to see this confusing feature removed, as a bonus will also confound a few fingerprinting tools that hit this open path to see if a site is running Drupal.

Here's a kitten 🐈️

Adding tag for release notes, published the change record

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.

Status: Fixed » Closed (fixed)

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

smustgrave’s picture

Wanted to verify if preprocessFilterTips() is suppose to be deprecated? That would mean filter-tips.html.twig would be deprecated too right?