Problem/Motivation
#2922033-33: Use the Layout Builder for EntityViewDisplays raised concerns about the workflow for reverting a layout override:
As it stands, it totally functions and is ok, but going forward, we basically we have to ask ourselves what we think is a more common task, reverting a custom layout and promptly building a new custom layout based on the default, or simply reverting the custom layout. In the case of the latter, we should be going to the canonical url. In the case of the former, we should go to the layout builder url. I think the "revert and done" action will be the far more common action to perform.
Likewise, in the case of reverting and being done, the user has to click revert and THEN cancel. I know this because I understand what those buttons do. I suspect most end users will click "revert" and then click "save" which is actually the opposite of what we want them to do. NOT visiting /layout ui paths as a redirect from reverting would prevent this behavior entirely.
Proposed resolution
Redirect back to the canonical view (/node/5
) after a revert instead of the Layout Builder UI (/node/5/layout
)
Remaining tasks
N/A
User interface changes
No changes to individual pages, just the flow of where you are redirected after reverting.
API changes
N/A
Data model changes
N/A
Comment | File | Size | Author |
---|---|---|---|
#9 | 2936501-postrevert-7-PASS.patch | 1.95 KB | tim.plunkett |
#9 | 2936501-postrevert-7-FAIL.patch | 1.26 KB | tim.plunkett |
Comments
Comment #2
tim.plunkettComment #4
tim.plunkettPostponed on #2988970: Layout Builder should make it easier to modify the default layout for an entity type when viewing an entity
Comment #5
tim.plunkettComment #6
tim.plunkettThis doesn't need to be postponed on that issue, now that we know the scope of the solution there.
Updated the issue summary
Comment #9
tim.plunkettAlso, I should note that there was one other concern about reverting: currently in HEAD if you remove all of the sections from an override, it's the same as reverting. And this is very confusing!
But, that's being fixed in #3030647: Do not add a section when editing an empty layout, or differentiate between new layouts and existing empty layouts which is RTBC.
Comment #10
tim.plunkettComment #12
tim.plunkettI meant to mention: I filled in the issue summary based on both the historical comment from @EclipseGc as well as a conversation today.
Also, I am re-updating the issue summary based on discussion with @DyanneNova where she expressed interest for the redirect fix solution.
Just one additional check to ensure we're in the right place after reverting.
These two strings are asserted multiple times throughout the test. One is used when viewing the Layout Builder UI and one is when viewing the actual result. Because of the changed redirect after reverting, this switches the expectation.
Comment #13
tim.plunkettTagging for usability review
Comment #14
tedbowThe code and test look good here! I think RTBC ready pending the usability reiview
Comment #15
bnjmnmI presented this at the Feb 26 2018 UX meeting and the group agreed the patch functionality was AOK.
Comment #16
xjmComment #20
xjmComment #23
xjmComment #25
xjmI tested this myself and the new behavior is much more intuitive, even though it didn't seem like it would be when I read the IS. Nice work!
Committed to 8.7.x. Thanks!