At some point the bulk operations label was changed from "Operations" to "With selection".

That label isn't very intuitive, but also is hardcoded in the handler itself.

We should expose that in the UI.

Drupal\system\Plugin\views\field\BulkFormBase::views_form() is the relevant method.

Comments

irinaz’s picture

The common label is "Bulk Actions"

a_c_m’s picture

StatusFileSize
new1.91 KB

Patch included.

But i wasn't able to confirm the title/label is translatable, as it didn't seem to get picked up by the config translation module.

Also, i expect this needs some tests to check it all works the way it should, but i might need some guidance there on where to start / direction to take etc.

a_c_m’s picture

Status: Active » Needs review
dawehner’s picture

Issue tags: +Needs tests
+++ b/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkFormBase.phpundefined
@@ -24,6 +24,24 @@
+  protected function defineOptions() {
...
+  public function buildOptionsForm(&$form, &$form_state) {

The codestyle (which is not properly done by views itself) is to put /** {@inheritdoc} */ on the functions.

Adding a tag.

a_c_m’s picture

adding docs inherit.

a_c_m’s picture

I would like to add the tests for this, but i'm not sure where to start.
Are there any good examples of how similar tests were done?

dawehner’s picture

Issue tags: -Needs tests
StatusFileSize
new1.04 KB
new3.04 KB

Let's add some tests.

damiankloip’s picture

+++ b/core/modules/action/lib/Drupal/action/Tests/BulkFormTest.phpundefined
@@ -86,6 +86,16 @@ public function testBulkForm() {
+    $this->drupalGet('test_bulk_form');
+    $result = $this->xpath('//label[@for="edit-action"]');
+    $this->assertEqual('Test title', (string) $result[0]);

I think it is worth asserting the default label before changing it and saving the view.

dawehner’s picture

StatusFileSize
new831 bytes
new3.24 KB

There we go.

damiankloip’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new712 bytes
new3.24 KB

Otherwise, I just manually tested again - this is working well. RTBC.

I just changed the test comment from label to comment just to keep things uniform, and felt bad asking you to reroll again because of that!

Status: Reviewed & tested by the community » Needs work
Issue tags: -VDC

The last submitted patch, 2020111-10.patch, failed testing.

damiankloip’s picture

Status: Needs work » Needs review
Issue tags: +VDC

#10: 2020111-10.patch queued for re-testing.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

And back.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

We need to update the views config schema so that it's translatable.

dawehner’s picture

Issue tags: +Novice, +Needs reroll, +Needs config schema

Sometimes you eat tags, sometimes you spit them out.

joachim’s picture

> We need to update the views config schema so that it's translatable.

What does that mean? I don't see anything else in views.field.schema.yml that is marked as translatable.

Patch currently applies with fuzz, so we're probably fine without a reroll for now.

damiankloip’s picture

Status: Needs work » Needs review
Issue tags: -Novice, -Needs reroll, -Needs config schema
StatusFileSize
new3.15 KB

Rerolled, this patch already has the schema definition for the action_title property. So I think we are good?

damiankloip’s picture

StatusFileSize
new586 bytes
new2.98 KB

Actually, the schema definition for this should live in action module, as that's where the field handler comes from.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Back to rtbc

xano’s picture

18: 2020111-18.patch queued for re-testing.

webchick’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.