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.

Comments

scott_euser created an issue. See original summary.

scott_euser’s picture

Status: Active » Needs review
StatusFileSize
new1.42 KB
timmillwood’s picture

Issue tags: +Needs UX review, +Needs screenshots

Wonder if we have a precedent for this anywhere else in core, tagging for UX review for advice.

A screen shot might help.

scott_euser’s picture

StatusFileSize
new87.13 KB
new90.93 KB

Before
Before screenshot without save and edit button
After
After screenshot with save and edit button

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.

scott_euser’s picture

Issue tags: -Needs screenshots
timmillwood’s picture

I 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.

scott_euser’s picture

That 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:

    // This will take us to the list of workflows, so we need to edit the
    // workflow again.
    $this->clickLink('Edit');

Found in web/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php

sam152’s picture

Status: Needs review » Needs work

I 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.

scott_euser’s picture

Status: Needs work » Needs review
StatusFileSize
new1.96 KB

Sounds 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.

scott_euser’s picture

Title: Provide an option to remain on the workflow edit page when saving » Remain on the workflow edit page when saving

Issue title change.

sam152’s picture

Status: Needs review » Needs work
+++ b/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php
@@ -176,10 +176,6 @@ public function testWorkflowCreation() {
-    // This will take us to the list of workflows, so we need to edit the
-    // workflow again.
-    $this->clickLink('Edit');

Lets replace these with $this->assertSession()->addressEquals(...)

scott_euser’s picture

Status: Needs work » Needs review
StatusFileSize
new2.1 KB
new1.3 KB

Sure no problem, added.

sam152’s picture

Status: Needs review » Reviewed & tested by the community
xjm’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: -Needs UX review +Needs usability review

This still needs a usability review. Fixing to the correct tag so they can find it. :) Thanks!

yoroy’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs usability review +Usability

Checking 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.

cilefen’s picture

Issue summary: View changes

I 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.

  • cilefen committed 4e88982 on 8.4.x
    Issue #2850554 by scott_euser, Sam152, yoroy: Remain on the workflow...
cilefen’s picture

Status: Reviewed & tested by the community » Fixed

Committed 4e88982 and pushed to 8.4.x. Thanks!

Status: Fixed » Closed (fixed)

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