Problem/Motivation

Text in the Views interface doesn't follow suggestions and guidelines documented in User interface guidelines: Interface text. Most of this originates from the desire to have descriptions for everything. Ideally there is only a description where its truly needed. I suggest at large we evaluate this help text.

This text can be found when you for example "Add fields", "Add contextual filters". "Relationships". Its the text in those UI's we are trying to solve.

  • Display all taxonomy terms associated with a node from specified vocabularies.
  • The date the content was posted.
  • Appears in: node:article, node:recipe. Also known as: Content: Image, Content: Picture of recipe.
  • Date and time of when the last comment was posted.

Proposed resolution

Evaluate and write new descriptions for all of this, we should quickly analyze what trends are going wrong. For example:

  • Post date:The date the content was posted. -> Remove description
  • Appears in: node:article, node:recipe. Also known as: Content: Image, Content: Picture of recipe. -> Appears in content types Recipe and Article.

At large it should remain within 140 characters a rule of thumb we use for most descriptions to make sure people read them and in this case also to make sure the table doesn't wrap.

Remaining tasks

This issue needs to be split off in achievable novice tasks. For example evaluating per category.

Issue fork drupal-1832858

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Bojhan’s picture

Title: Revamp descriptions of handlers » Revamp descriptions of items in handler listings
yoroy’s picture

Here's a first go at a couple of these descriptions for the 'Add fields' listing to give an idea of what we're aiming to do here:

---

## Current:

Content: Add comment link
Display the standard add comment link used on regular nodes, which will only display if the viewing user has access to add a comment.

Content: All taxonomy terms
Display all taxonomy terms associated with a node from specified vocabularies.

Content: Author uid
The user authoring the content. If you need more fields than the uid add the content: author relationship

Content: Body
Appears in: node:page, node:article.

Content: Comment count
The number of comments a node has.

Content: Comment status
Whether comments are enabled or disabled on the node.

---

## Rewrite

Add comment link
Display the standard add comment link used on content.

All taxonomy terms
Display all terms assigned to a piece of content.

Author uid
The user authoring the content.

Body
Used in the Page, X, Y and Article content types.

Comment count
The number of comments to a piece of content.

Comment status
Whether comments are enabled or disabled.

dawehner’s picture

Issue tags: +Novice

Patching these in seems to be a good novice task.

eddie_c’s picture

I'd be happy to have a go at this. I have a few questions though:

@yoroy Do you really mean that it's better to leave the word denoting the filter category off the item name, e.g. "Content: "? It seems to me that we need that to distinguish between items with the same name in different categories, right? E.g. "Content: Title" and "Content revision: Title".

Also, for the Body item description - "Used in the Page, X, Y and Article content types." - do you suggest including a list of every content type that has a body? I know it does that at the moment but may be far too verbose with a lot of content types?

@Bojhan Would you suggest creating subtasks for this? Split by category - Content, Content Revision, Comment, Global etc?

I've included a patch with yoroy's suggestions - more to check that I've understood correctly than because I think it contains enough to be useful at the moment.

Thanks all!

eddie_c’s picture

Ah - it looks as though listing every content type a field appears on is well established functionality, so I guess that answers my question regarding the Body item description.

dawehner’s picture

+++ b/core/modules/comment/comment.views.incundefined
@@ -525,7 +525,7 @@ function comment_views_data_alter(&$data) {
-      'help' => t('Display the standard add comment link used on regular nodes, which will only display if the viewing user has access to add a comment.'),

Oh yes, noone cares about that detail.

+++ b/core/modules/node/node.views.incundefined
@@ -384,7 +384,7 @@ function node_views_data() {
-    'help' => t('The user authoring the content. If you need more fields than the uid add the content: author relationship'),

The question is why this information is not helpful for the user? Many people struggle with that, so why not give them a hint here.

+++ b/core/modules/taxonomy/taxonomy.views.incundefined
@@ -372,7 +372,7 @@ function taxonomy_views_data_alter(&$data) {
+      'help' => t('Display all terms assigned to a piece of content.'),

Great improvement!

lisarex’s picture

Thanks eddie_c! Patch looks good to me so far.

As for splitting, Content is by far the biggest category, and since this is such a simple patch it might be easier to keep it as one issue for now?

Per #1832862: Make views add field scannable proposes to split category into it's own column (yay) hence why yoroy wrote the item names without the category in front.

lisarex’s picture

'The user authoring the content. If you need more fields than the uid add the content: author relationship'

How about something like 'The user that wrote the content. 'author relationship' provides additional fields'

dawehner’s picture

That's fine for me!

Bojhan’s picture

@eddie_c Yes, we need to split this up. Lets focus this one on "content". @lisarex Its simple/small now, but I assume if we start to fix more it will become quite large to review.

Xano’s picture

The first technical hurdle is probably to make descriptions optional in the first place. Views now sets a default "this item has no description lalalalaa" description for every handler in views_fetch_fields().

Xano’s picture

Status: Active » Needs review
FileSize
712 bytes

The attached patch prevents the default Error: missing help message from being shown as handler help.

dawehner’s picture

#12: 1832858_00.patch queued for re-testing.

dawehner’s picture

Issue tags: +Needs tests

But then we probably need some testing.

dawehner’s picture

Would be cool to have #1962234: [Change notice] Move views_fetch_fields into an autoloadable class in first, as it touches exactly the same code. Once it's ported writing tests would be potentially better to do.

Bojhan’s picture

Does it need to be? that issue has been stalled for a while.

dawehner’s picture

Well, bring people to the other issue, but this issue also just have a really old patch, which will not apply at all,
need tests, for some reasons etc. Well, let's work on both at the same time.

jibran’s picture

Status: Needs review » Needs work

NW as per #14.

jibran’s picture

Issue summary: View changes

add link to related parent issue

klonos’s picture

Issue summary: View changes
Parent issue: » #1832862: Make views add field scannable

...parent issues now have a dedicated metadata section ;)

sidharrell’s picture

Status: Needs work » Needs review
FileSize
7.77 KB

I went through the add field ui. I was hesitant to change some of the ones that were defined as descriptions instead of help, cause that text may show up somewhere else.
Note that removing descriptions may no longer be necessary, because of the table layout introduced in the parent issue. That may make it even more necessary to have short help text, to fit into a smaller space in the table column.
Didn't go through the remaining UI screens other than Add Field. Felt like I should get some feedback before investing more time into this.

nuwe’s picture

FileSize
7.8 KB

i have rerolled the patch in #20 it was an automerge

Status: Needs review » Needs work

The last submitted patch, 21: rerollworked-21.patch, failed testing.

Status: Needs work » Needs review

rpayanm queued 21: rerollworked-21.patch for re-testing.

Status: Needs review » Needs work

The last submitted patch, 21: rerollworked-21.patch, failed testing.

dajjen’s picture

working on this on drupaldevdays

dajjen’s picture

Status: Needs work » Needs review
FileSize
7.88 KB

I rerolled the patch from #21

Status: Needs review » Needs work

The last submitted patch, 26: shorten_help_text-1832858-23.patch, failed testing.

dajjen’s picture

Issue tags: +drupaldevdays
dajjen’s picture

Status: Needs work » Needs review
FileSize
9.55 KB

Made a new patch that also check if there is any description before trying to add it to the description field.

dajjen’s picture

Re-roll patch from #29

Status: Needs review » Needs work

The last submitted patch, 30: shorten_help_text-1832858-30.patch, failed testing.

dajjen’s picture

no_angel’s picture

Issue tags: -BADCamp2012UX

queued for re-testing

no_angel’s picture

Would be cool to have #1962234: [Change notice] Move views_fetch_fields into an autoloadable class in first, as it touches exactly the same code. Once it's ported writing tests would be potentially better to do.

Issue 1962234 Committed b15e921 and pushed to 8.x. But is Active: pending change record

Does this impact how the patch 1832858-31.patchis re-rolled??

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.

yoroy’s picture

Version: 8.1.x-dev » 8.2.x-dev
Issue tags: +ux-interfacetext

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.

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.

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.

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.

bisonbleu’s picture

Re-rolling and slightly refactoring patch from #32.

Lendude’s picture

Just a quick scan of the current changes

  1. +++ b/core/modules/comment/comment.views.inc
    @@ -35,7 +35,7 @@ function comment_views_data_alter(&$data) {
    +          'help' => t('Display comment link if user has permission.', $args),
    

    this no longer has args, so the $args can be removed

  2. +++ b/core/modules/comment/src/CommentViewsData.php
    @@ -265,7 +265,7 @@ public function getViewsData() {
    +      'help' => $this->t('Datetime when posted.'),
    

    Datetime is too technical a term for help text I would say, I kinda like the original text here.

  3. +++ b/core/modules/comment/src/CommentViewsData.php
    @@ -279,7 +279,7 @@ public function getViewsData() {
           'title' => $this->t("Last comment author"),
    -      'help' => $this->t('The name of the author of the last posted comment.'),
    +      'help' => $this->t('Author name.'),
    

    Mew. The title is pretty bad, but with the bad title I feel the more verbose help is needed

  4. +++ b/core/modules/comment/src/CommentViewsData.php
    @@ -309,7 +309,7 @@ public function getViewsData() {
    +      'help' => $this->t('Most recent comment or entity update.'),
    

    Shouldn't we try to stay away from the term 'enitity'? Also might be nice to mention if this is a date or a 'date and time' (don't know what it is).

  5. +++ b/core/modules/comment/src/CommentViewsData.php
    @@ -339,7 +339,7 @@ public function getViewsData() {
           'title' => $this->t('Last comment uid'),
    -      'help' => $this->t('The User ID of the author of the last comment of an entity.'),
    +      'help' => $this->t('User ID.'),
    

    wouldn't it be better to not use 'uid' in user facing text? So maybe update the title?

I'm pretty sure there are more things we can fix here. The first list was made a while back, so might be good if somebody looked through this again to see if we can update some more.

Also, not sure about the 'needs tests' here, I don't think we want to add tests that test the correct help text. As long as we have coverage that setting the 'help' key in views data displays the message (pretty sure we do), we are fine I think.

bisonbleu’s picture

Thanks for the unexpected quick response @Lendude. A new patch is attached with the following changes.

  1. Removed $args
  2. Changed to: 'Date and time when the last comment was posted.'
  3. Changed to: 'Name of the author of the last comment.'
  4. Changed to: 'Most recent comment.'
  5. Changed to: 'The User ID of the author of the last comment.'

About 5, I don't think this is user-facing text. We are dealing with Help texts here, right? These are for admins and editors. So I think we're good.

I agree that there are «more things we can fix here». I'm open to suggestions, where should I look? What can I do about «not sure about the 'needs tests' here», can you expand?

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.

kkalashnikov’s picture

#47 patch is also working fine for drupal 9.1

Goot to move to RTBC

comment

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.

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.

smustgrave’s picture

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.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
FileSize
144 bytes

The Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

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

kkalashnikov’s picture

Patch #54 is working fine for Drupal version 10.1.x

kkalashnikov’s picture

Status: Needs work » Needs review
nod_’s picture

Status: Needs review » Needs work

It does not apply with git apply, which is what the bot uses to check.

Bhanu951’s picture

Assigned: Unassigned » Bhanu951

Bhanu951’s picture

smustgrave’s picture

Status: Needs review » Needs work

Was previously tagged for tests which still need to happen.

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.