Skip to content

Automatically utilise classic menu when switching from classic Theme #42600

@getdave

Description

@getdave

What problem does this address?

When switching from a Classic Theme (with a Menu assigned to a Menu Location) to a Block Theme with a Navigation block, the block is currently empty.

This provides a suboptimal UX and could be improved.

What is your proposed solution?

On theme switch, the block should:

  1. Attempt to find the classic Menu that was assigned to the primary Menu Location.
  2. Convert the Menu into a block Navigation Post wp_navigation.
  3. Automatically use the new Navigation Post in the block.

This should happen without user interaction and should work in the same way across both the Editor and the front of the site.

Note however, that this should be considered part of the auto-assignment mechanic. Therefore, if the block detects that a wp_navigation already exists in the database, it should prefer that over converting the classic menu. This is however, likely to be an edge case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] NavigationAffects the Navigation Block[Focus] Blocks AdoptionFor issues that directly impact the ability to adopt features of Gutenberg.[Type] FeatureNew feature to highlight in changelogs.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions