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.
Follow-up to #1828410: Provide a bulk_form element for actions
Tasks
- Rename button label "Update" to "Apply".
@todo
Comment | File | Size | Author |
---|---|---|---|
#37 | drupal8.action-vbo-ux.37.patch | 6.16 KB | sun |
#30 | drupal8.action-vbo-ux.30.patch | 6.49 KB | sun |
#29 | drupal8.action-vbo-ux.29.patch | 6.46 KB | sun |
#29 | action-vbo-ux.29.png | 10.72 KB | sun |
#20 | drupal-1845840-20.patch | 2.59 KB | wuinfo - Bill Wu |
Comments
Comment #1
dawehnerAdd tag
Comment #2
damiankloip CreditAttribution: damiankloip commentedGet the usability guys involved too, we might want more than just the button value change...
Comment #3
IshaDakota CreditAttribution: IshaDakota commentedPatch with renamed button label. No usability review considered.
Comment #4
sunThanks :)
If we added proper tests in the original issue, then I can only hope that #3 will fail ;)
Comment #6
damiankloip CreditAttribution: damiankloip commented@sun, are you saying we didn't or you hope we did (without looking)? There are fails, so I guess that's good then? :)
Comment #7
sunYup, and additionally, the correct test failed. :)
I didn't look at the actual user interface myself yet — neither the "backend" configuration of the bulk form element, nor the frontend appearance/usage. Would be good to perform some testing there to verify whether this makes sense for an ordinary site admin and user.
Comment #8
dawehnerSure we have tests which click the button.
Just in general i'm wondering whether it makes sense to allow to rename the button, so similar to the way you can do it on exposed forms.
Comment #9
wuinfo - Bill Wu CreditAttribution: wuinfo - Bill Wu commentedIt is working. Tested in Drupal8.x with latest code, some test nodes and a view.
Comment #10
sunIs that "Actions bulk form" the default label of the view plugin?
I could imagine that most site admins will just make that label invisible, leaving the default label - which would be detrimental for visually impaired users using a screenreader.
So if that is the default label, would it make sense to rename it to "Bulk Update"?
Second, do we need that description below the select element? I think that can be happily removed.
I also wonder whether we shouldn't apply .container-inline to the Action select widget container by default, so the Apply button appears next to it?
Lastly, anyone any ideas whether the "Action" label can be improved?
Comment #11
yoroy CreditAttribution: yoroy commentedFor the label: "With selection"
Comment #12
wuinfo - Bill Wu CreditAttribution: wuinfo - Bill Wu commented"Actions bulk form" is the default label of the view plugin.
Comment #13
wuinfo - Bill Wu CreditAttribution: wuinfo - Bill Wu commentedI have changed the default label from "Actions bulk form" to "Bulk Update". Removed description below the select element.
Here is the patch and inter-diff between this patch and the patch at #8
Comment #14
sunThanks! :)
I guess the .container-inline part requires some more insight into views, since we'd only want to apply that to the first/upper select + button combo, but not to the second button at the end of the form — so probably a topic for @dawehner. :)
@yoroy additionally asked to rename this into "With selected" (or "With selection"? Not sure which of both is linguistically correct and works best in the interface)
Comment #15
sunBTW, I'm not sure whether we actually need any kind of label for the select box.
We might want to change it to "With selection", but additionally set #title_display to 'invisible'.
Here's where I'm coming from:
Comment #17
yoroy CreditAttribution: yoroy commentedOh sorry, I meant to say 'With selection' yeah. I like how it explicitly links the actions to the selected items. 'Bulk actions' only implies that. And, 'With selection' allows itself to be "autocompleted by the actual actions:
With selection: promote to front page
With selection: unpublish
Bulk actions: promote to front page
Bulk actions: unpublish
The latter just doesn't flow as much as the first. Subtle, but I think there's a difference in the amount of brain cycles needed to grasp what applies to what.
Not sure if we should leave out the label. It's worth investigating if we could do that in more places (or are already doing it)
Comment #18
IshaDakota CreditAttribution: IshaDakota commentedTo me, while "With Selection" may be more elegant, "Bulk Actions" seems more straightforward (as a label, at least).
Another semantic point: The 'help' text in the action_views_data() is in the second person (you):
Outside of one other ( Content: Author uid), it is the only field help text that is in the second person. Also, you don't need to apply actions to "multiple items" - you could apply to just one. Might it be better as:
Not sure if there is a prevailing norm, as there isn't really guidance on second or third person in the Interface Text Stye Guide
Comment #19
wuinfo - Bill Wu CreditAttribution: wuinfo - Bill Wu commentedSmall change from #13. Since patch 13 failed in test, the inter-diff file is between #7 and this patch.
Comment #20
wuinfo - Bill Wu CreditAttribution: wuinfo - Bill Wu commentedThis patch include addition change for @sun's comment at #15
Comment #21
dawehnerAdding a tag :)
Comment #22
wuinfo - Bill Wu CreditAttribution: wuinfo - Bill Wu commentedScreenshot after apply patch #20
Comment #24
dawehnerIt's invisible so i think we should describe for that this is actually used.
Comment #25
wuinfo - Bill Wu CreditAttribution: wuinfo - Bill Wu commented#20: drupal-1845840-20.patch queued for re-testing.
Comment #26
wuinfo - Bill Wu CreditAttribution: wuinfo - Bill Wu commented@dawehner, what is a better way to describe it? Or just leave it empty.
Comment #27
dawehnerWhat about 'Bulk Update'?
Comment #28
sunHold on, I'm working on this as we speak.
Comment #29
sunAttached patch implements everything. ;)
I additionally looked up what the regular tableselect Form API processing code is doing to ensure accessible checkboxes.
Proof:
I also think I found an architectural/functional bug in the actions/VBO implementation, so I added @todos there, but those are obviously left for another issue.
Comment #30
sunRealized it might be better to use the plugin ID instead of 'action' as parent array key in the form header.
Comment #31
dawehnerThanks for working on that!
We could introduce a configuration option on the field, but i'm not sure this is worth to do and wouldn't confuse the site builder a lot (because most will never see it).
Still not sure whether this is actually helpful for people.
You could maybe explain it, who you most not be based on row index. I guess you would need some kind of hash as value on the row, and determine that on the $result as well?
No need for @count in format_plural
Comment #33
sun1) Yeah, I don't think that an extra configuration option is necessary there.
2) Definitely helpful for screen-readers to make sense of the select options. Also allows people to unset/undo the #title_display property and actually show the label in their themes.
3) The problem I see is that the bulk operations are performed based on row indexes instead of entity IDs — This means that you can run into race conditions very very easily; i.e., 1) You access the view page, 2) While you're selecting items... 3) The site is actively under use, so items may be updated and new items may be created, but 4) The bulk operations are based on views result row indexes, and thus 5) The items [rows] you selected can mean entirely different things when the form is submitted. I probably shouldn't have added the @todo comments here, but should have created a separate issue instead.
4) Oops, yeah. ;)
Comment #34
dawehnerSure absolutly, i'm wondering about the actual string. What about "With action" or something more direct.
Regarding the usage of row index: it's no problem to fix this in another issue.
Comment #35
yoroy CreditAttribution: yoroy commentedKinda surprising to see a move towards no visible label at all. What makes this so obvious to everybody that we don't need to show one? I still think 'With selection' is the best option :) Not because of elegance but because it helps people connect the dots, linking the operations to the checkboxes.
Comment #36
dawehnerAdding a tag, i don't think "with selection" is an accessible label.
Comment #37
sunExposing the select label inherently means that .container-inline cannot be used.
But OK, I've removed #title_display and also .container-inline, and instead, we can leave that to themes, and I've added a comment to explain why the bulk form widget is wrapped in a separate container.
I think this is ready.
Comment #38
Bojhan CreditAttribution: Bojhan commentedComment #39
Bojhan CreditAttribution: Bojhan commentedbe gone
Comment #40
dawehnerThis indeed is a huge improvement.
Comment #41
catchCommitted/pushed to 8.x, thanks!
Comment #42
mgifford@dawehner I'm trying to understand your concern with
'#title' => t('With selection'),
- is it just that it isn't clear in context?Comment #43
dawehner#42
It doesn't seem to be obvious for me that "with selection" gives you enough context to understand that this is an action you want to select.