Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293207

Provide an optional destination parameter for local actions

$
0
0

Problem/Motivation

Currently local actions do not provide a destination which results in an inconsistent UX because users expect to return to the page where they clicked the button.

Steps to reproduce:

  1. Sign in as an administrator
  2. Go to admin/people
  3. Click the 'Add user' local action
  4. Fill out the form to add a new user.
  5. You get 'stuck' on the Add user page, when most people would have wanted to return to the People listing.

Proposed resolution

Provide a local action option parameter so the user is 'returned' to the page from where the click on the action link originated.

Remaining tasks

  • Fix deprecation (#36 point 4)
  • Expand documentation in menu.api.php
  • Expand functionality allowing to set a destination? (see #36 point 5)
  • Review
  • Create change record

User interface changes

When the option is provided in a specific local action *.links.action.yml, the user who clicks the action will be redirected to the destination parameter path. @alexpott in comment #36.5 proposes that the destination route could be specified in the yml entry.

API changes

There is a new option 'add_destination' available for local action plugins. @alexpott in comment #36.5 proposes that option should have the form: destination: some.route_name allowing developers to specify any route for the destination.

Data model changes

None.

Release notes snippet

Needs change record.


Viewing all articles
Browse latest Browse all 293207

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>