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

The functionality of the Cancel button on the confirmation step for discarding changes is unexpected

$
0
0

Problem/Motivation

Let's say you've reordered the blocks for the article content type in Layout Builder from the default:

  • Image
  • Body
  • Tags
  • Links
  • Comments

to

  • Tags
  • Body
  • Image
  • Links
  • Comments

You click now the Discard changes button. Let's say you have a small working memory, you then get distracted and pull away from the computer and you cant remember what the changes were you've made when you return. Now you want to discard those changes. On the confirmation page for discarding the changes you have two buttons as options: Confirm and Cancel.

Clicking the confirm button brings you back to the Manage display page and an info admin message informs you that the changes to the layout have been discarded. You are back to the default order of blocks.

If you click the Cancel button instead the outcome is different and sort of unexpected. Technically to cancel something means to stop the started task and go back to the starting point/revert a step. But instead you are also getting forwarded back to the Manage display page, but in contrast clicking the confirm button, you don't have any info admin message but the changes to the layout get saved anyway.

Steps to reproduce

  1. Go to /admin/structure/types/manage/article/display/default
  2. Activate Layout Builder
  3. Change the order of the default blocks to Tags, Body, Image, Links, Comments
  4. Click the Discard changes button
  5. Click confirm
  6. Reapply the changes to the block order for the layout
  7. Click the Discard changes button again
  8. Click the Cancel button

Proposed resolution

i would lean towards the following when the Cancel button is pressed/clicked. Instead of saving the layout and forwarding back to the Manage display page redirect back to the page of the layout so the user is able to continue with the already made changes.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 295818

Trending Articles



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