Problem/Motivation
There are two places where the order can be saved on the page and the "You have unsaved changes." warning is shown (states and transitions). Within for instance the Views edit form, when you reorder elements, you can save and remain on the page. In the case of workflow, you save and leave the page and have to navigate back to it.
Proposed resolution
Change the behavior of the save button to stay on the same page.
User interface changes
The user can choose to hit the save and edit button to remain on the page to for instance just save their reordering of states and transitions.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | interdiff-2850554-9-12.txt | 1.3 KB | scott_euser |
| #12 | remain_on_the_workflow-2850554-12.patch | 2.1 KB | scott_euser |
| #9 | provide_an_option_to-2850554-9.patch | 1.96 KB | scott_euser |
| #4 | after.png | 90.93 KB | scott_euser |
| #4 | before.png | 87.13 KB | scott_euser |
Comments
Comment #2
scott_euser commentedComment #3
timmillwoodWonder if we have a precedent for this anywhere else in core, tagging for UX review for advice.
A screen shot might help.
Comment #4
scott_euser commentedBefore


After
Looking at views, the save button simply keeps the user on the page and they must use the menu or breadcrumbs to navigate back to the list of views. That would of course be a simple change as well.
Comment #5
scott_euser commentedComment #6
timmillwoodI wonder if we should take the example of views and stay on the edit page after saving. Another example of this is `/admin/structure/taxonomy/manage/tags/overview` where after reordering and saving you stay on the same page.
Comment #7
scott_euser commentedThat should be straightforward enough to do, but I'll leave patching it until we have a decision on it as it also involves some changes to the tests, namely these bits will need removing:
Found in web/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php
Comment #8
sam152 commentedI think staying on the workflow might be the better option here. Two buttons wont pass a UX review and I can't think of that pattern having been applied elsewhere.
Comment #9
scott_euser commentedSounds good to me; the user can use the breadcrumb to go back up to the list of workflows as they need to do when saving views for instance.
No interdiff provided as there is nothing to compare, completely different approach.
Comment #10
scott_euser commentedIssue title change.
Comment #11
sam152 commentedLets replace these with $this->assertSession()->addressEquals(...)
Comment #12
scott_euser commentedSure no problem, added.
Comment #13
sam152 commentedComment #14
xjmThis still needs a usability review. Fixing to the correct tag so they can find it. :) Thanks!
Comment #15
yoroy commentedChecking in simplytest and looking at the patch it seems that we're only changing the behaviour of the existing "Save" button, not adding another one (issue summary still says to add one).
Latest patch seems to be the right approach. Compare with rearranging/adding items on a menu edit screen or on a "Manage display" screen for a content/entity type. (Always useful to take a look at what core does in similar situations elsewhere :-)
So yes, change the behaviour of the existing Save button to stay on the same page.
Comment #16
cilefen commentedI am updating credit and the summary. Please be reminded that demonstrating that test modifications work is a core gate. This is a straightforward issue but I just ran the tests alone locally to be sure.
Comment #18
cilefen commentedCommitted 4e88982 and pushed to 8.4.x. Thanks!