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.
Comment | File | Size | Author |
---|---|---|---|
#56 | 1832858-nr-bot.txt | 144 bytes | needs-review-queue-bot |
#49 | Screenshot 2020-05-29 at 2.43.33 PM.png | 206.54 KB | kkalashnikov |
Issue fork drupal-1832858
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
Comment #1
Bojhan CreditAttribution: Bojhan commentedComment #2
yoroy CreditAttribution: yoroy commentedHere'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.
Comment #3
dawehnerPatching these in seems to be a good novice task.
Comment #4
eddie_c CreditAttribution: eddie_c commentedI'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!
Comment #5
eddie_c CreditAttribution: eddie_c commentedAh - 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.
Comment #6
dawehnerOh yes, noone cares about that detail.
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.
Great improvement!
Comment #7
lisarex CreditAttribution: lisarex commentedThanks 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.
Comment #8
lisarex CreditAttribution: lisarex commented'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'
Comment #9
dawehnerThat's fine for me!
Comment #10
Bojhan CreditAttribution: Bojhan commented@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.
Comment #11
XanoThe 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().
Comment #12
XanoThe attached patch prevents the default Error: missing help message from being shown as handler help.
Comment #13
dawehner#12: 1832858_00.patch queued for re-testing.
Comment #14
dawehnerBut then we probably need some testing.
Comment #15
dawehnerWould 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.
Comment #16
Bojhan CreditAttribution: Bojhan commentedDoes it need to be? that issue has been stalled for a while.
Comment #17
dawehnerWell, 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.
Comment #18
jibranNW as per #14.
Comment #18.0
jibranadd link to related parent issue
Comment #19
klonos...parent issues now have a dedicated metadata section ;)
Comment #20
sidharrell CreditAttribution: sidharrell commentedI 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.
Comment #21
nuwe CreditAttribution: nuwe commentedi have rerolled the patch in #20 it was an automerge
Comment #25
dajjenworking on this on drupaldevdays
Comment #26
dajjenI rerolled the patch from #21
Comment #28
dajjenComment #29
dajjenMade a new patch that also check if there is any description before trying to add it to the description field.
Comment #30
dajjenRe-roll patch from #29
Comment #32
dajjenAnother reroll
Comment #34
no_angel CreditAttribution: no_angel as a volunteer commentedqueued for re-testing
Comment #35
no_angel CreditAttribution: no_angel as a volunteer commentedIssue 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??
Comment #37
yoroy CreditAttribution: yoroy commentedComment #45
bisonbleu CreditAttribution: bisonbleu commentedRe-rolling and slightly refactoring patch from #32.
Comment #46
LendudeJust a quick scan of the current changes
this no longer has args, so the $args can be removed
Datetime is too technical a term for help text I would say, I kinda like the original text here.
Mew. The title is pretty bad, but with the bad title I feel the more verbose help is needed
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).
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.
Comment #47
bisonbleu CreditAttribution: bisonbleu commentedThanks for the unexpected quick response @Lendude. A new patch is attached with the following changes.
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?
Comment #49
kkalashnikov CreditAttribution: kkalashnikov at Srijan | A Material+ Company for Drupal India Association commented#47 patch is also working fine for drupal 9.1
Goot to move to RTBC
Comment #54
smustgrave CreditAttribution: smustgrave at Mobomo commentedRerolled for 9.5
Comment #56
needs-review-queue-bot CreditAttribution: needs-review-queue-bot as a volunteer commentedThe 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.
Comment #57
kkalashnikov CreditAttribution: kkalashnikov at Srijan | A Material+ Company for Drupal India Association commentedPatch #54 is working fine for Drupal version 10.1.x
Comment #58
kkalashnikov CreditAttribution: kkalashnikov at Srijan | A Material+ Company for Drupal India Association commentedComment #59
nod_It does not apply with git apply, which is what the bot uses to check.
Comment #60
Bhanu951 CreditAttribution: Bhanu951 as a volunteer commentedComment #62
Bhanu951 CreditAttribution: Bhanu951 as a volunteer commentedComment #63
smustgrave CreditAttribution: smustgrave at Mobomo commentedWas previously tagged for tests which still need to happen.