Mobile navigation trigger is dropped on single-capture routes

Open
#4,630 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
php, wordpress
Domain
frontend

Research direction

Start by tracing how capture dialog trigger markers are preserved when a route is emitted as a single capture, then compare that path with the device variant route that retains its trigger. Check the same behavior when the header is extracted into a shared template part and add the requested contract test. Done means the phone width shows a working menu trigger, desktop hides it, and the captured menu remains accessible.

Written by the indexing model from the issue text.

Description

Summary

On single-capture routes (one document per route), the mobile navigation trigger (hamburger button that opens the captured menu dialog) is dropped. The captured documents carry the dialog trigger markers (data-blocks-engine-capture-dialog-trigger, 5 per document), but the emitted pages, templates and parts contain none. At phone width the imported header shows only the site title, so the navigation can't be reached.

Observed

  • Desktop: the trigger is emitted as a 16x16 button that should be hidden; the source hides it (display:none).
  • Phone (390px): the trigger collapses to 0x0, while the source shows a 40x40 visible button.
  • A route that captured separate device variants keeps its trigger. The front page lost it once it became reflow-only (4 emitted triggers before, 2 after).
  • The emitted navigation uses overlayMenu:"never", so core's responsive overlay doesn't replace it either.

Acceptance

  • On a reflow-only/single-capture route, the phone-width header shows a visible menu trigger that opens the captured menu (or a core navigation overlay with equivalent items), and desktop hides it as the source does.
  • This also holds when the header is extracted into a shared template part.
  • Contract test with a single-capture header that hides the trigger at desktop and shows it under a max-width media query.

AI assistance: filed by Claude (Claude Code via Roadie) while investigating a site-builder capture import; findings verified against a private local fixture and rendered output.

Dominant language
PHP
Stars
25
Forks
3
Avg merge
3h 25m
Merged PRs (30d)
935

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Automattic/blocks-engine

All issues in Automattic/blocks-engine

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.