Problem/Motivation

When only one text format is available, the help link "About text formats" doesn't make much sense, since there is no manifestation of a text format in the UI that could need an explanation. See this screenshot from @LewisNyman (in the context of #784672: Allow text field to enforce a specific text format, which makes the situation of having just a single text format more common):

When only one text format is available, we should remove the link and well as the wrapper around it, not just the dropdown element as is currently the case.

Steps to reproduce

Proposed resolution

As suggested by Sam152 in #3 and supported by benjifisher in #33, Keep the link but change the label. That will allow someone to figure what they are allowed to enter in the field.

It might also be useful to add a test for this or add to some of the existing filter format tests?

Remaining tasks

Decide on text for the label when there is only one text format available.

User interface changes

TBD

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

floretan’s picture

Status: Active » Needs review
FileSize
2.24 KB

Here's a patch that hides the mention of text formats if only one is available:

floretan’s picture

Issue summary: View changes
FileSize
89.67 KB
79.98 KB

Screenshots before patch:

Screenshots after patch:

Sam152’s picture

Is it possible the link is still useful but perhaps with a different label? How would someone figure out what they are allowed to enter in the field? If basic HTML was the only allowed format, what is available to tell me what that includes?

It might also be useful to add a test for this or add to some of the existing filter format tests?

Status: Needs review » Needs work

The last submitted patch, 1: hide-filter-tips-2544188-1.patch, failed testing.

The last submitted patch, 1: hide-filter-tips-2544188-1.patch, failed testing.

swentel’s picture

Related - #2413335: Expose an option to hide the text format information of textarea fields (using a different technique there by using a new property for the text format)

Hiding by default makes sense too of course, there's little use for it, and the filter tips are usually more in the way then anything else.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

jonathanshaw’s picture

hchonov’s picture

Version: 8.1.x-dev » 8.2.x-dev
Category: Task » Feature request
Issue tags: +DevDaysMilan

This could be considered as a disruptive change and should be targeted against 8.2.x-dev and is a feature as well.

pguillard’s picture

@floretan's patch at #1 still applies in 8.2.x branch, also screenshots at #2
Patch uploaded again for the bot.
Do we have some things to do there ?

hchonov’s picture

@pguillard if you want to put a patch for retesting you have to click on the "Add test" link just under the patch and then there you the option to put the patch for retesting and do not need to upload it again.

Status: Needs review » Needs work

The last submitted patch, 10: hide-filter-tips-2544188-1.patch, failed testing.

jonathanshaw’s picture

@floretan provided the patch in #8, so I think that is a much more up to date version of his work than #1.

hchonov’s picture

@jonathanjfshaw from my point of view it is exactly the same file till the last bit, @pguillard just uploaded the same file again with mentioning it is for the drupal test bot. I've commented only to say that this was unnecessary as you can put an already uploaded patch for retesting.

radubutco’s picture

Assigned: Unassigned » radubutco
radubutco’s picture

Assigned: radubutco » Unassigned

The last submitted patch, 10: hide-filter-tips-2544188-1.patch, failed testing.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

The last submitted patch, 10: hide-filter-tips-2544188-1.patch, failed testing.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

leisurman’s picture

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

gordon’s picture

reroll for 8.6.x

gordon’s picture

I have made a change so that you can use a new attribute form text-format in the format api #format_hide and then when using textarea with formatting it will allow you to select if you want the issue or not.

This patch now relies on the #784672 patch.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Issue summary: View changes
Status: Needs work » Needs review

Update the IS.

I'm going to ask in #ux to find out if there are any problems with removing this link.

benjifisher’s picture

I agree with @Sam152 in Comment #3.

Some text formats are boring, and there is not much to say.

Other text formats apply custom filters. As I write this comment, I do not have a choice of format, but if I follow the link, I find

  • To post pieces of code, surround them with <code>... tags. For PHP code, you can use <?php ... ?>, which will also colour it based on syntax.
  • Lines and paragraphs are automatically recognized. The <br /> line break, <p> paragraph and </p> close paragraph tags are inserted automatically. If paragraphs are not recognized simply add a couple blank lines.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: ...
  • References to project issues in the form of [#1234] (or [#1234-2] for comments) turn into links automatically, with the title of the issue appended. The status of the issue is shown on hover. If '@' is appended (e.g. [#1234@]), the user the issue is assigned to will also be printed.
  • Only images hosted on this site may be used in <img> tags. Others are replaced with an error icon.

I wish that more people knew about the filter for linking to issues. ;)

I think that changing the link text, as suggested in #3, is a good idea.

quietone’s picture

Title: Hide the link "About text formats" if only one format is available » Change the label "About text formats" if only one format is available
Issue summary: View changes

@benjifisher, thank you for the review. That gives this issue a way to move forward.

I have updated the IS and the title.

I wish that more people knew about the filter for linking to issues. ;)

Here! Here! And it doesn't help that that information is at the bottom of a long page. At least, I now know where it is documented.

paulocs’s picture

Please let me know if my message looks good.

Gauravvvv’s picture

After patch #35, When only one format is available then, it is showing "About format and others formats."
When multiple formats are available then it is showing "About text formats"

Adding after-patch screenshots for reference. I think this is good to go. Can be move to RTBC.

quietone’s picture

@Gauravmahlawat, I think you missed reading the Issue Summary, the remaining tasks in the issue summary have not been met. This is not ready for RTBC.

@paulocs, thanks for the suggestion but I don't think referring to 'to other formats' when there is only one makes sense.

When I following that link the page title is 'Compose tip'. Maybe we just use that? Any other suggestions?

paulocs’s picture

I understand the point about not add "to other formats" to the label. It makes really no sense.
"Compose tips" is good or maybe something like "Text format tips" would be good as well.
I will wait for a second opinion before write a new patch for it.
The patch should have tests as well, right?

Cheers!

vikashsoni’s picture

Applied patch working fine
for ref sharing screenshot

thomasmurphy’s picture

My UX take, for people entering data in a field which they

a) don't have permission to change field settings
b) don't understand what a text field is

This is an unactionable link, and therefore UX clutter. After the patch ideally there would be no text and no link. Happy to supply one if this is acceptable.

longwave’s picture

Status: Needs review » Needs work

@thomasmurphy as explained in #33 this link is still useful to provide text formatting tips, even when only one format is allowed.

The current patch doesn't use correct English grammar, and I'm not sure that showing the title of the single format is helpful to the user in most cases.

Maybe we can just use the wording "About text formatting" for all cases, which sidesteps the singular/plural issue entirely?

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.