Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing a classic menu into a draft post leads to a confusing unsaved state #59685

Open
mboynes opened this issue Mar 7, 2024 · 0 comments
Labels
[Block] Navigation Affects the Navigation Block [Type] Bug An existing feature does not function as intended

Comments

@mboynes
Copy link
Contributor

mboynes commented Mar 7, 2024

Description

Inserting a navigation block into a draft post and importing a classic menu sets the post editor to a "dirty" state, because new navigation menu is in a draft state and needs to be published. This is a confusing UX, particularly on a draft post. Here are a few reasons why this UX should be improved:

  1. As far as the user is concerned, when they save draft, they should be able to exit the screen and come back later without losing any work; seeing a message that "changes you made may not be saved" can be anxiety-provoking, if the user spent hours on their post that they aren't planning to publish today.
  2. The typical user doesn't know the difference between a classic menu and a navigation block menu (nor should they need to understand the difference). It's also not clear to the typical user why they might need to import a classic menu, why the menu imports as a "draft", or why it needs to be "saved" even if they didn't make any changes to it. It's not clear to me either and I've been using WordPress for 15+ years 😅.
  3. After importing a classic menu, the "Publish" button gets a dot, to indicate that some state of the editor is dirty. If a user is not intending to publish their work, it's not intuitive to click "Publish" to "save" a menu.
  4. If a user deletes the navigation block they previously inserted (with the imported classic menu), the editor state is still dirty and the user is still alerted that they will lose unsaved changes if they leave the screen.

Adding to this, if the user does leave the screen, the menu will get stuck in a draft state with no clear way to promote it (see #59688).

Step-by-step reproduction instructions

  1. Create a new post
  2. Insert a Navigation block
  3. Import a classic menu
  4. Save the draft of your post
  5. Attempt to leave the screen, and observe the confirmation dialog, "Changes you made may not be saved"
  6. Delete the block
  7. Again attempt to leave the screen, and observe the confirmation dialog

Screenshots, screen recording, code snippet

changes-not-saved

Environment info

Tested on 6.4.3 as well as 6.5 RC1

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants