Closed (fixed)
Project:
Drupal core
Version:
8.5.x-dev
Component:
action.module
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Jul 2016 at 14:31 UTC
Updated:
5 Nov 2017 at 13:54 UTC
Jump to comment: Most recent, Most recent file


Comments
Comment #3
prashant.cAdding patch to truncate the label although not sure about what
$max_legthshould be given, for now i have hard-coded it to30.Comment #4
naveenvalechaI believe this would be the feature request as everything works fine and nothing broken.
Comment #5
hass commentedNo it's not. It is a not used Drupal API and these are bugs.
Comment #6
20th commentedActually, the label here is not being truncated, the ellipsis is just being appended to it without any apparent reason...
It looks like this code has been around for a while:
modules/actions/actions.modulefile back in 2007;modules/system/system.admin.incfile;core/modules/system/system.admin.incwhen D8 development started;core/modules/action/action.admin.inc;core/modules/action/lib/Drupal/action/Controller/ActionController.php;core/modules/action/src/Form/ActionAdminManageForm.php.If we truncate action label here, we will have to truncate it in every other place where it is displayed, for consistency. This string cannot be very long anyway. I suggest that we simply remove the ellipsis.
Comment #7
hass commentedI'm fine with removing ellipsis, too. Is there really enough space for the label on all devices?
Comment #8
20th commentedActions are defined as plugins with the help of annotations. For example:
This way the length of action labels is limited by Drupal coding standards, so it cannot be very long.
Furthermore, the list of actions is displayed in a select list and on mobile defices it will be rendered with a native UI widget that can properly handle long strings.
So I think, there won't be any problems with the space.
Comment #9
20th commentedComment #10
20th commentedComment #12
Munavijayalakshmi commentedRerolled the patch.
Comment #14
chi commentedThe patch no longer applies to 8.x.5. Probably because of #2911806: Remove unnecessary Crypt::hashBase64() call from Action UI.
Comment #15
harsha012 commentedre-rolled the patch
Comment #16
hass commentedComment #17
alexpottHere's a screenshot of the affected select list.

And after the patch is applied:

One thing this does bring up is that we're slightly reducing the usability here because the selectable options before always added a
...and now the empty optionChoose an advanced actionlooks like all the others. The default empty text for a required field is select is- Select -. Adding the - makes it look different. I think we should discuss changing the#empty_optionto- Select -because in the context of theCREATE AN ADVANCED ACTIONbox on a select empty labelledActionI'm not sure that the textChoose an advanced actionactually adds anything.I'll ping the @yoroy as the product manager with the most usability experience to make a call.
Removing the fake ellipsis is definitely the right thing to do.
Comment #19
xjmThanks @20th for documenting the history of why the ellipsis was there in the first place; that's always really helpful.
It took me a bit of hunting to find where this ellipsis actually was. On
/admin/config/system/actions, it's in the "Create an advanced action" fieldset at the bottom of the page, appended to each item in the select list:So I agree it is fine to just remove this. With the patch applied:
Committed to 8.5.x. It's not a string change, but it is a slight change to the UI, so I didn't backport it for now.
Thanks all!
Comment #20
xjmCrossposted with #17. I don't think this issue is regressing that, because "Choose an advanced action" already looked exactly the same as the other options regardless. I'd propose a followup issue for that.
Comment #21
xjmNot reverting for now. Feel free to revert it for more discussion if you feel strongly about it, but I don't think it's necessary for the reasons in #20.
Comment #22
chi commentedCreated a followup #2917916: Improve usability of create action dropdown.
Comment #23
alexpottRe #20 - works for me. I debated whether a followup was okay when writing #17. I went with no because I thought they might be a very small usability regression but happy that #2917916: Improve usability of create action dropdown has been filed.