Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It was a great idea to include a comment field for views displays. Any sitebuilder should use it!
One reason why only few sitebuilders do use it might be that you would hardly recognize that it has been used.
Anyone interested: try now
* Located the field "Comment" under Advanced > Other
* Click on "No comment" and enter what this display is used for (this only applies to the current display)
Once applied, the comment is visible in the UI but trimmed to 10 characters. Easy to miss.
Comment | File | Size | Author |
---|---|---|---|
#17 | Screen Shot 2015-09-25 at 7.04.02 PM.png | 25.86 KB | serundeputy |
#12 | after.png | 120.81 KB | legolasbo |
#12 | before.png | 109.52 KB | legolasbo |
#11 | expand_display-2550287-11.patch | 2.26 KB | cilefen |
#11 | interdiff-testmod.txt | 2.26 KB | cilefen |
Comments
Comment #2
hexabinaerComment #3
hexabinaerComment #4
hexabinaerComment #5
cilefen CreditAttribution: cilefen commentedComment #6
cilefen CreditAttribution: cilefen commentedWhy not also add an ellipsis,
…
, so the views administrator knows the string was truncated?Comment #7
dawehnerGood idea!
So let's use
\views_ui_truncate()
.., which does the ellipsis thingComment #8
cilefen CreditAttribution: cilefen commentedI tacked a regression test onto another test or we could make another one, or rename the test I modified.
Comment #9
cilefen CreditAttribution: cilefen commentedIn the next patch, DisplayPluginBase may have this removed now:
use Drupal\Component\Utility\Unicode;
Comment #10
dawehnerNice ...
Comment #11
cilefen CreditAttribution: cilefen commentedComment #12
legolasboI've reviewed the code, which looks good to me. And manually reviewed the patch, which seems like an improvement to me.
Before:
After:
Comment #13
alexpottWhy are we truncating at all? The description is
'This description will only be seen within the administrative interface and can be used to document this display.'
I guess it is okay and definitely an improvement. Committed 28088f3 and pushed to 8.0.x. Thanks!
Someone can move this to the Views queue for the D7 backport.
Comment #15
cilefen CreditAttribution: cilefen commentedComment #16
cilefen CreditAttribution: cilefen commentedThat is the question.
Comment #17
serundeputy CreditAttribution: serundeputy at Common Media commentedThe comment field is set to 80 for me in D7 views
7.x-3.x
.In the file
views_plugin_dispaly.inc
line: 1153Here is a view:
I believe there is no action required for 7.x-3.x
thanks,
Geoff
Comment #18
serundeputy CreditAttribution: serundeputy at Common Media commentedComment #19
hexabinaerBackport has been taken care of via seperate issue: https://www.drupal.org/node/2559839
So I guess this issue may be closed?
Comment #20
cilefen CreditAttribution: cilefen commented