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:
- Sign in as an administrator
- Go to admin/people
- Click the 'Add user' local action
- Fill out the form to add a new user.
- 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.