Skip to content

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

Open

Description

@mboynes

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.
    • Update 11/21/2024: this area of the UX has improved (in my opinion). Instead of "Publish" with a dot, the button now says "Save". Everything else in this description and the below video still applies, just note that your experience will differ visually from the video in this regard.
  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.7.1 (Updated 11/21/2024).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] NavigationAffects the Navigation Block[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions