Updated: Comment #1

Problem/Motivation

Routes now uses $module.foo as the route names, so to be more consistent use the same kind of pattern for local actions.

Proposed resolution

use the route name + ".action" as each ID. Keeping the ID distinct from the route name will help avoid mistaken assumptions (especially in tests).

Before

custom_block_type_add:
   route_name: custom_block.type_add
   title: 'Add custom block type'
   appears_on:
     - custom_block.type_list

After 1 (the one in the last patch)

custom_block.type_add.action:
   route_name: custom_block.type_add
   title: 'Add custom block type'
   appears_on:
     - custom_block.type_list

After 2

custom_block.type_add:
   route_name: custom_block.type_add
   title: 'Add custom block type'
   appears_on:
     - custom_block.type_list

After 3

-
   plugin_id: custom_block.type_add
   route_name: custom_block.type_add
   title: 'Add custom block type'
   appears_on:
     - custom_block.type_list

Remaining tasks

User interface changes

API changes

#2095613: Convert all plugin IDs in local_tasks.yml to 'module_name.foo_bar' naming convention to match routing convention

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pwolanin’s picture

Title: Adapt $module.foo pattern for local action/local task plugin IDs » Adapt $module.foo pattern for local action plugin IDs
mr.baileys’s picture

Status: Active » Needs review
Issue tags: +DX (Developer Experience)
FileSize
3.24 KB

First stab. Only replaced the underscore between module and foo with a period (.), there is still some inconsistency left in the local actions names (some have the suffix "_local_action", others "_action" or no suffix. Should that also be changed as part of this issue?

mr.baileys’s picture

Missed one reference.

Status: Needs review » Needs work

The last submitted patch, 2091145-3-local-actions-yml.patch, failed testing.

mr.baileys’s picture

Status: Needs work » Needs review
FileSize
3.24 KB

Local install was not up-to-date with HEAD, patch in #2 was correct after all, re-uploading.

mr.baileys’s picture

Issue summary: View changes

Updated issue summary.

dawehner’s picture

The last submitted patch, 2: 2091145-2-local-actions-yml.patch, failed testing.

dawehner’s picture

Issue summary: View changes
FileSize
3.18 KB
3.08 KB

This should work

pwolanin’s picture

I'd like to keep _action or .action on them - I think having too many thinks named the same as the route by chance is going to be confusing and lead to mistakes & bugs in the future.

pwolanin’s picture

Adds ".action" to each ID

dawehner’s picture

-1

pwolanin’s picture

@dawehner - I really feel using the same name as the route everywhere is going to lead to subtle bugs and mistakes in contrib.

Why not append something distinct?

dawehner’s picture

Issue summary: View changes
pwolanin’s picture

Would it be helpful to also add a comment in the YAML, like:

forum.add_forum.action: # The plugin ID
  route_name: forum.add_forum
  title: 'Add forum'
  appears_on:
    - forum.overview

forum.add_container.action: # The plugin ID
  route_name: forum.add_container
  title: 'Add container'
  appears_on:
    - forum.overview
pwolanin’s picture

FileSize
4.8 KB
4.85 KB

This adds the comment to all the IDs, and also fixes the views_ui one to have "views_ui" not "views" as the prefix.

pwolanin’s picture

15: local_action-2091145-13.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 15: local_action-2091145-13.patch, failed testing.

The last submitted patch, 15: local_action-2091145-13.patch, failed testing.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

apaderno’s picture

Version: 8.6.x-dev » 8.9.x-dev
ravi.shankar’s picture

Issue tags: +Needs reroll

It looks like needs a re-roll.

sokru’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
6.17 KB

Just a reroll.

Status: Needs review » Needs work

The last submitted patch, 27: 2091145-local-action-D8-27.patch, failed testing. View results

sokru’s picture

Status: Needs work » Needs review
FileSize
7.74 KB

Fixing tests.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative, +Needs upgrade path

Think if we are changing the schema for so many things they will need an upgrade path for existing sites. Which will require tests also.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.