Skip to content

Rebuild mega menus, header, and footer to match Figma (LS-1618)#13

Merged
brandonmarshal merged 9 commits into
developfrom
feature/LS-1618-mega-menus-header-footer
Jul 24, 2026
Merged

Rebuild mega menus, header, and footer to match Figma (LS-1618)#13
brandonmarshal merged 9 commits into
developfrom
feature/LS-1618-mega-menus-header-footer

Conversation

@brandonmarshal

@brandonmarshal brandonmarshal commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Added 6 mega menu template parts for Ollie Menu Designer's Dropdown Menu block (Default item styling for Work/Solutions/Pricing/Insights/About, plus Service item styling with 6 lifecycle-phase columns), registered in theme.json.
  • Rebuilt the site header (patterns/header.php) and footer (patterns/footer.php) to match the Figma design.
  • Fixed the header search field and light/dark toggle button rendering incorrectly in the Site Editor — the toggle had no base button shell, and animations.css wasn't reaching the Site Editor's iframed canvas (add_editor_style() now covers it).
  • Fixed the footer nav link grid so its two rows use a consistent auto-equal column pattern instead of mismatched fixed/auto widths, so columns line up like a proper grid.
  • Fixed the footer's phase-colour nav dots and social icons rendering black in both light and dark mode (missing fill="currentColor" on their SVGs).
  • Added a site-logo--dark / site-logo--light CSS swap convention for the header logo, matching the existing sun/moon icon-swap pattern (applied per-environment in the Site Editor, since it depends on each site's own Media Library).

Closes LS-1618

Test plan

Static checks:

  • npm run patterns:escape — no escaping issues
  • npm run security:scan — passed
  • npm run theme:validate — no new failures introduced
  • npm run schema:validate — no new failures introduced
  • npm run build:css compiles cleanly, new CSS present in compiled output

Verified live on a local WordPress instance:

  • Header search field collapses by default and toggle button renders correctly in the Site Editor
  • Footer nav columns align consistently in both rows
  • Footer phase dots and social icons render the correct colour in both light and dark mode

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added mega menus for Work, Solutions, Pricing, Insights, About, and Services.
    • Introduced a redesigned header with logo, navigation, expandable search, and project CTA.
    • Added a comprehensive footer with notes, statistics, social links, and legal navigation.
    • Added new button, card, icon, menu, and footer styling options.
  • Enhancements
    • Added phase-based colors and improved hover, focus, and reduced-motion interactions.
  • Bug Fixes
    • Improved footer layouts, icon colors, breadcrumbs, header search behavior, and Site Editor styling.

brandonmarshal and others added 6 commits July 22, 2026 21:21
- patterns/menu/mega-menu-default.php: new pattern for the Default
  mega menu (Work-style dropdown) — two-column featured item grid
  with icon wells, header/footer CTA rows. Flagged with
  Block Types: core/template-part/menu and Categories: menu so it
  registers as starter content for Ollie's Dropdown Menu block.
- patterns/menu/mega-menu-service.php: new pattern for the Service
  mega menu — six lifecycle-phase columns (Discover/Create/Build/
  Launch/Grow/Evolve), each colour-coded via the new phase.* tokens.
- styles/sections/menu/mega-menu-panel.json: new section style
  (is-style-mega-menu-panel) for the dropdown panel shell — card
  surface, popover shadow, card-family border.
- styles/blocks/groups/icon-frame-glow-link-accent.json: new
  companion style overriding Icon Frame Glow's accent colour via
  link.accent, for the mega menu's icon wells.
- theme.json: added phase-one..phase-six palette presets (plus
  -strong variants for AA-safe light-mode contrast), the phase.*
  semantic token family, text.subtle, and a shadow.popover token.
- styles/dark.json: mirrored phase.*, text.subtle, and
  shadow.popover for dark mode (using the vivid, non-strong presets).
- styles/presets/shadows.json: added a "popover" shadow preset
  wrapping shadow.popover.menu for use via var:preset|shadow|popover.
- assets/css/animations.css: added the mega menu panel/divider
  border colours (using border.card, not the glass-card highlight
  trick, so dividers stay visible in both light and dark mode),
  icon-well sizing, item hover/click-target styling, and the
  phase-dot utility (fixed 8px circle, padding reset to counter
  WordPress's default has-background padding).
- CHANGELOG.md: documented the above under [Unreleased].
…underline fix (LS-1618)

Builds out the 6 mega menu template parts to final content and settles the row/icon interaction model after a few false starts.

- Consolidated each row to one registered style (`mega-menu-item-default.json`); the icon well is now a plain inline-styled group with no style/className of its own, so it can't independently react to hover, and is capped at 36px instead of inheriting the shared icon-frame-glow class's 5rem minimum.
- Row hover/focus (background highlight + arrow reveal) moved to `_menu-motion.scss`: WordPress's global-styles engine only generates `:hover`/`:focus` CSS for the `elements` allowlist, not arbitrary block style variations, so this couldn't live in JSON.
- Rebuilt `animations.css`, which had drifted out of sync with its SCSS source and still carried dead rules from an earlier `.ls-mega-menu__*` approach.
- Added 22 Phosphor icons across About/Insights/Pricing/Solutions, matched to each row (no `wordpress-logo` in Phosphor, so `browser` substitutes for Solutions' "WordPress" row).
- Fixed link underline-on-hover: WordPress core's default `core/navigation` link-hover style overrides the theme's generic link fix due to higher specificity; added the matching override in `links.json`.
- Deleted the two superseded pattern files (`mega-menu-default.php`/`mega-menu-service.php`) and an orphaned style file (`icon-frame-glow-link-accent.json`), and corrected the CHANGELOG entry to match what actually shipped.
…nel sizing (LS-1618)

Brings `parts/services-mega-menu.html` in line with the approved Figma frame, following the same JSON-first/SCSS-only-when-required approach as the Default menu.

- Replaced invisible phase dots and separator arrows (empty placeholders) with real Phosphor icons (`circle-fill` dots, `caret-right` arrows at 50% opacity).
- Fixed the outer panel to hug its own content (`width: fit-content`) instead of clamping to a fixed contentSize and clipping the columns.
- Fixed `core/columns` squeezing phase labels mid-word: added a 120px column minimum with flex-wrap, so a column wraps to a new row instead of the label wrapping.
- Added per-phase hover colour — each phase's header pill and its rows below now hover in that column's own phase colour, scoped via `:nth-child` rather than a per-instance attribute (avoids the block-validation break from an earlier attempt).
- Reverted the CTA links ("See all services"/"See our process") to the same brand accent as the eyebrow label, instead of the Figma-literal cyan.
Rewrites `patterns/footer.php` (previously an LS-1226 placeholder stub) into the full approved design: notes panel, company summary with proof points, 5-column nav grid, and legal/social bottom bar. `parts/footer.html` already injected this pattern, so no template-part changes needed.

- Real Phosphor icons throughout, including social logos (not Figma's literal "in/gh/fb" text placeholders).
- New style files hold structural JSON only; hover states and decorative background gradients live in a new `_footer-motion.scss` (WordPress doesn't generate `:hover` CSS for block style variations, and there's no width/fit-content property in theme.json).
- New tokens `status.success` and `shadow.footer.notes`, both with light/dark parity, reusing existing presets rather than inventing colours.
- Fixed the "LightSpeed notes" badge stretching full-width instead of hugging its text.
Rewrites `patterns/header.php` (previously an LS-1226 placeholder stub): logo, nav, search, CTA. Nav uses plain `navigation-link` items so Ollie's Dropdown Menu blocks can be attached manually, same as the other menus.

- Adds a fully functional light/dark toggle: new `theme-utils.mjs generate-theme-toggle` command auto-generates `assets/css/theme-toggle.css` from `theme.json` + `styles/dark.json`, plus JS for click/persistence.
- Search uses native `core/search`, with a small JS assist for expand-on-click (core has no built-in behavior for that).
- New reusable button/icon styles and hover states in `_header-motion.scss`.
- Fixed a gradient-in-wrong-property bug and the header being clamped to content-width instead of full-width.
- Header: added the missing base circular-button shell for the
  light/dark toggle (.is-style-header-icon-button had only hover CSS),
  and enqueued animations.css via add_editor_style() so it reliably
  reaches the Site Editor's iframed canvas, fixing the toggle button
  and the always-expanded search field in the backend editor.
- Footer: fixed the nav link grid's second row (Company/Studio) using
  a fixed 226px column against an auto column, so it split differently
  than the first row's three auto-equal columns. Both rows now use the
  same auto-equal column pattern with a spacer column completing the
  second row.
- Footer: fixed the phase-colour nav dots and social icons rendering
  black in both light and dark mode — their SVGs never declared
  fill="currentColor", so the browser's default SVG fill (black) was
  used instead of the semantic colour token already set via inline
  style.
- Added a site-logo--dark / site-logo--light CSS swap convention for
  the header logo, matching the existing sun/moon icon-swap pattern.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@brandonmarshal brandonmarshal added area:theme Theme & styles (templates, template parts, FSE) comp:block-patterns Patterns library/registration comp:template-parts Header/footer/loop/nav parts lang:css Stylesheets lang:php PHP code priority:normal Default priority for most issues. labels Jul 24, 2026
@linear-code

linear-code Bot commented Jul 24, 2026

Copy link
Copy Markdown

LS-1618

@brandonmarshal brandonmarshal self-assigned this Jul 24, 2026
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@brandonmarshal, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 2 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 6b86910d-ceef-4051-8413-b3067d1b44cb

📥 Commits

Reviewing files that changed from the base of the PR and between 57fe332 and 0087ef3.

📒 Files selected for processing (9)
  • CHANGELOG.md
  • assets/css/animations.css
  • parts/about-mega-menu.html
  • parts/insights-mega-menu.html
  • parts/pricing-mega-menu.html
  • parts/solutions-mega-menu.html
  • parts/work-mega-menu.html
  • patterns/menu/menu-item-card.php
  • src/scss/animations/_footer-motion.scss

Note

.coderabbit.yml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "version"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
📝 Walkthrough

Walkthrough

The theme adds semantic color and shadow tokens, six mega-menu template parts, reusable block styles, a redesigned header with expandable search, and a structured footer with interactive styling and decorative effects.

Changes

Site experience

Layer / File(s) Summary
Theme tokens and style contracts
theme.json, styles/...
Adds phase/status/text tokens, shadow presets, mega-menu and footer panel styles, plus header, footer, and CTA block style contracts.
Mega-menu templates and interactions
parts/*-mega-menu.html, src/scss/animations/_menu-motion.scss, assets/css/animations.css
Adds six mega-menu panels with grouped content, lifecycle phases, calls to action, responsive layout rules, hover/focus states, and reduced-motion handling.
Header search and controls
patterns/header.php, assets/js/header-search.js, inc/header.php, functions.php, src/scss/animations/_header-motion.scss
Adds the composed header, enqueues expandable search behavior, wires editor styles, and styles header buttons, CTA motion, and search transitions.
Footer pattern and presentation
patterns/footer.php, src/scss/animations/_footer-motion.scss, styles/sections/footer/*
Replaces the minimal footer with notes, proof cards, navigation, legal links, and social icons, then adds decorative effects, SVG color fixes, link reveals, and interaction states.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

Suggested labels: comp:section-styles, comp:theme-json, lang:js

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: rebuilding mega menus, header, and footer to match Figma.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/LS-1618-mega-menus-header-footer

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mergify

mergify Bot commented Jul 24, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
patterns/footer.php (1)

1-10: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add @package tag to the file docblock.

CI (PHPCS WordPress ruleset) is failing on this file for a missing @package tag.

🐛 Proposed fix
 /**
  * Title: Footer
  * Slug: ls-theme/footer
  * Categories: footer
  * Block Types: core/template-part/footer
  * Description: Full site footer — editorial notes panel, company summary with proof points, 5-column link grid, and legal/social bottom bar.
+ * `@package` ls-theme
  */
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@patterns/footer.php` around lines 1 - 10, Add the required `@package` tag to
the file-level docblock in patterns/footer.php, using the package name
established by the surrounding theme files and leaving the existing metadata
unchanged.

Source: Pipeline failures

patterns/header.php (1)

2-8: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add the required package annotation.

PHPCS fails because this file-level docblock lacks @package ls-theme.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@patterns/header.php` around lines 2 - 8, Add the required `@package` ls-theme
annotation to the file-level docblock in patterns/header.php, alongside the
existing Title, Slug, Categories, Block Types, and Description metadata.

Source: Pipeline failures

🧹 Nitpick comments (4)
patterns/footer.php (3)

268-268: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Hardcoded copyright year will go stale.

© 2026 lightSpeedwp.agency. is hardcoded; consider generating the year dynamically so it doesn't need a manual edit every year.

♻️ Proposed fix
-<p class="has-text-color has-100-font-size" style="color:var(--wp--custom--color--text--subtle);margin-top:0;margin-bottom:0;text-transform:uppercase">© 2026 lightSpeedwp.agency. All rights reserved.</p>
+<p class="has-text-color has-100-font-size" style="color:var(--wp--custom--color--text--subtle);margin-top:0;margin-bottom:0;text-transform:uppercase">© <?php echo esc_html( gmdate( 'Y' ) ); ?> lightSpeedwp.agency. All rights reserved.</p>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@patterns/footer.php` at line 268, Replace the hardcoded year in the footer
copyright paragraph with a dynamically generated current year, using the
project's existing PHP escaping conventions if applicable. Keep the agency name,
rights text, styling, and surrounding markup unchanged.

94-96: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Nav-column category labels ("Services", "Solutions", "Systems", "Company", "Studio") use plain paragraphs, not headings.

Each of these five footer nav-column groups labels its link list with a styled <p> rather than a heading element, so screen-reader users navigating by heading/landmark structure won't see these as section labels.

As per coding guidelines for {templates/**/*.html,parts/**/*.html,patterns/**/*.{php,html}}: "Use semantic HTML, maintain correct heading hierarchy, and use ARIA attributes where needed for accessibility."

Also applies to: 134-136, 166-168, 200-202, 232-234

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@patterns/footer.php` around lines 94 - 96, Replace the styled paragraph
labels for the footer navigation groups—“Services,” “Solutions,” “Systems,”
“Company,” and “Studio”—with semantic heading elements while preserving their
existing typography, color, and text-transform styling. Update each
corresponding closing block consistently and maintain the surrounding link-list
structure.

Source: Coding guidelines


13-313: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Static copy isn't wrapped in translation functions.

None of this pattern's ~40 text strings (badge label, heading, proof-card copy, nav-column labels/links, legal links, copyright) use __()/esc_html__() with the ls-theme text domain, so the footer can't be localized.

As per path instructions, "This is a WordPress block pattern file... Review for correct translation function usage," and per coding guidelines, "Use translation functions correctly: __(), esc_html__(), esc_attr__() in PHP files."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@patterns/footer.php` around lines 13 - 313, Wrap every static footer string
in the pattern markup with the appropriate WordPress translation function using
the ls-theme text domain, including badge text, headings, proof-card copy,
navigation labels and links, legal links, and copyright text. Update the
surrounding PHP so translated values are safely escaped with esc_html__() for
text and esc_attr__() where translated attributes are used, while preserving the
existing block structure and styling.

Sources: Coding guidelines, Path instructions

theme-utils.mjs (1)

208-260: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add a light/dark token symmetry check.

lightFlat/darkFlat are only checked for non-emptiness (line 227), not for having the same key set. A token present in theme.json's settings.custom.color/shadow but missing from styles/dark.json (or vice versa) is silently dropped from that mode's :root[data-theme=...] block — the property then falls back to the other mode's value instead of surfacing an error, which can produce a silent theme-toggle regression.

♻️ Proposed symmetry check
 	if ( 0 === Object.keys( lightFlat ).length || 0 === Object.keys( darkFlat ).length ) {
 		error( 'No settings.custom.color/shadow tokens found in theme.json or styles/dark.json.' );
 		process.exit( 1 );
 	}
+
+	const lightKeys = new Set( Object.keys( lightFlat ) );
+	const darkKeys = new Set( Object.keys( darkFlat ) );
+	const missingInDark = [ ...lightKeys ].filter( ( k ) => ! darkKeys.has( k ) );
+	const missingInLight = [ ...darkKeys ].filter ( ( k ) => ! lightKeys.has( k ) );
+	if ( missingInDark.length || missingInLight.length ) {
+		error( `Light/dark custom token mismatch. Missing in dark: ${ missingInDark.join( ', ' ) || 'none' }. Missing in light: ${ missingInLight.join( ', ' ) || 'none' }.` );
+		process.exit( 1 );
+	}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@theme-utils.mjs` around lines 208 - 260, Add a symmetry validation in
generateThemeToggleCss after the existing non-empty checks, comparing the key
sets of lightFlat and darkFlat and failing with error plus process.exit(1) when
they differ. Preserve generation only when both modes contain identical token
keys, while keeping the existing toBlock and output behavior unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@assets/css/animations.css`:
- Around line 1498-1538: Update the header-search.js logic that toggles
site-header__search--expanded to also manage the search input’s tabindex: set it
to -1 while collapsed and restore its normal tab order when expanded and
focusable. Ensure the visible submit button remains the keyboard-accessible
control that triggers expansion.

In `@patterns/header.php`:
- Line 36: Update the “Start a project” CTA anchor in the button markup to use
the actual project/contact destination instead of the placeholder href="#".
Preserve the existing button classes and link text.
- Around line 14-16: Update the header image in the pattern to use a deployable
theme asset via the escaped theme URL helper instead of the hard-coded localhost
attachment URL, and replace the empty alt attribute with descriptive alternative
text that identifies the site brand.
- Line 22: Localize the visitor-facing strings in the header pattern, including
the Search label/placeholder/button text, Toggle light and dark mode, and Start
a project →, using the appropriate translation/context helpers with the ls-theme
domain. Escape each translated value at the rendered attribute or text output
boundary while preserving the existing markup and behavior.

In `@src/scss/animations/_footer-motion.scss`:
- Around line 100-102: Update the fill declaration in the .site-footer
.icon-container svg rule to use the lowercase currentcolor keyword required by
Stylelint.
- Around line 60-90: Replace the ambiguous `.site-footer
.wp-block-columns:nth-of-type(2)` selector with a dedicated class targeting only
the intended Company/Studio nav-column grid. Add that class to the corresponding
`wp:columns` block in `patterns/footer.php`, then update `_footer-motion.scss`
to apply the blur and child layering through the new class while leaving the
rest of the footer unchanged.

In `@styles/blocks/groups/mega-menu-item-default.json`:
- Around line 22-48: Remove the unsupported :hover, :focus, and
outermost/icon-block entries from mega-menu-item-default.json, leaving only the
supported structural variation properties such as padding and radius. Preserve
the interactive hover/focus behavior in the existing menu-motion styles rather
than defining it in the variation schema.

---

Outside diff comments:
In `@patterns/footer.php`:
- Around line 1-10: Add the required `@package` tag to the file-level docblock in
patterns/footer.php, using the package name established by the surrounding theme
files and leaving the existing metadata unchanged.

In `@patterns/header.php`:
- Around line 2-8: Add the required `@package` ls-theme annotation to the
file-level docblock in patterns/header.php, alongside the existing Title, Slug,
Categories, Block Types, and Description metadata.

---

Nitpick comments:
In `@patterns/footer.php`:
- Line 268: Replace the hardcoded year in the footer copyright paragraph with a
dynamically generated current year, using the project's existing PHP escaping
conventions if applicable. Keep the agency name, rights text, styling, and
surrounding markup unchanged.
- Around line 94-96: Replace the styled paragraph labels for the footer
navigation groups—“Services,” “Solutions,” “Systems,” “Company,” and
“Studio”—with semantic heading elements while preserving their existing
typography, color, and text-transform styling. Update each corresponding closing
block consistently and maintain the surrounding link-list structure.
- Around line 13-313: Wrap every static footer string in the pattern markup with
the appropriate WordPress translation function using the ls-theme text domain,
including badge text, headings, proof-card copy, navigation labels and links,
legal links, and copyright text. Update the surrounding PHP so translated values
are safely escaped with esc_html__() for text and esc_attr__() where translated
attributes are used, while preserving the existing block structure and styling.

In `@theme-utils.mjs`:
- Around line 208-260: Add a symmetry validation in generateThemeToggleCss after
the existing non-empty checks, comparing the key sets of lightFlat and darkFlat
and failing with error plus process.exit(1) when they differ. Preserve
generation only when both modes contain identical token keys, while keeping the
existing toBlock and output behavior unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 76750026-1bb2-474a-879a-d6ad670a6b98

📥 Commits

Reviewing files that changed from the base of the PR and between e8253e1 and d47011e.

📒 Files selected for processing (35)
  • CHANGELOG.md
  • assets/css/animations.css
  • assets/css/theme-toggle.css
  • assets/js/header-search.js
  • assets/js/theme-toggle.js
  • functions.php
  • inc/header.php
  • inc/theme-toggle.php
  • package.json
  • parts/about-mega-menu.html
  • parts/insights-mega-menu.html
  • parts/pricing-mega-menu.html
  • parts/services-mega-menu.html
  • parts/solutions-mega-menu.html
  • parts/work-mega-menu.html
  • patterns/footer.php
  • patterns/header.php
  • src/scss/animations.scss
  • src/scss/animations/_footer-motion.scss
  • src/scss/animations/_header-motion.scss
  • src/scss/animations/_menu-motion.scss
  • styles/blocks/buttons/button-cta-gradient.json
  • styles/blocks/groups/footer-proof-card.json
  • styles/blocks/groups/footer-social-icon.json
  • styles/blocks/groups/header-icon-button.json
  • styles/blocks/groups/mega-menu-item-default.json
  • styles/blocks/groups/mega-menu-item-service.json
  • styles/blocks/paragraphs/footer-nav-link.json
  • styles/dark.json
  • styles/presets/links.json
  • styles/presets/shadows.json
  • styles/sections/footer/footer-notes-panel.json
  • styles/sections/menu/mega-menu-panel.json
  • theme-utils.mjs
  • theme.json

Comment thread assets/css/animations.css
Comment thread patterns/header.php
Comment thread patterns/header.php
Comment thread patterns/header.php Outdated
Comment thread src/scss/animations/_footer-motion.scss
Comment thread src/scss/animations/_footer-motion.scss
Comment thread styles/blocks/groups/mega-menu-item-default.json Outdated
- Fix keyboard access to the collapsed header search field: set
  tabindex="-1" while collapsed, clear it on expand, so keyboard
  users don't land on an invisible, unreachable control.
- Add missing alt text to the header logo image.
- Wrap the theme-toggle aria-label and "Start a project" CTA text in
  translation functions, matching existing pattern conventions.
- Fix :nth-of-type(2) in the footer's decorative blur selector
  accidentally matching the nested Company/Studio sub-grid as well
  as the intended nav-column grid; target an explicit
  site-footer__columns class instead.
- Remove unsupported :hover/:focus/blocks keys from
  mega-menu-item-default.json that were failing schema validation
  (behaviour already implemented in _menu-motion.scss).

Not changed: the header logo's hardcoded Media Library URL (deliberate
per-environment approach, decided earlier on this branch), the CTA's
href="#" (matches the theme-wide placeholder convention used on every
nav link), and currentColor casing (no stylelint enforcement in this
repo, inconsistent with existing usage elsewhere).

@ZaredRogers ZaredRogers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great @brandonmarshal

…cher (LS-1618)

The header's light/dark toggle was a temporary CSS/JS workaround built
before discovering the site already has a proper switcher: the
ls-plugin/style-switcher block, registered by the LightSpeed Site
Plugin (inc/class-style-switcher.php), which reads styles/*.json
variations directly and requires no theme-side duplicate mechanism.

Removed:
- inc/theme-toggle.php, assets/js/theme-toggle.js,
  assets/css/theme-toggle.css
- the generate-theme-toggle command in theme-utils.mjs (and its
  now-unused flattenCustomTree/presetRefToCssVar helpers, the
  DARK_JSON_PATH/THEME_TOGGLE_CSS_PATH constants) and its
  package.json script/build:css reference
- the toggle button markup in patterns/header.php
- the .ls-theme-toggle, sun/moon icon-swap, and site-logo--dark/light
  CSS in src/scss/animations/_header-motion.scss (the logo swap keyed
  off the same [data-theme] mechanism and needs to be re-keyed to
  .dark-mode when the ls-plugin block is wired in)

The header currently has no light/dark toggle until the
ls-plugin/style-switcher block is wired in as follow-up work. Nothing
here is lost — it's fully recoverable from this commit's parent via
`git show <parent-sha>:inc/theme-toggle.php` etc., or
`git checkout <parent-sha>^{commit} -- inc/theme-toggle.php
assets/js/theme-toggle.js assets/css/theme-toggle.css`.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
CHANGELOG.md (1)

104-104: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Remove or rewrite the superseded toggle entry.

Line 98 says the theme-side light/dark toggle, related CSS, and header markup were removed, but Line 104 still presents the toggle button fix as part of the final unreleased state. Delete this entry or explicitly mark it as superseded so the changelog does not imply that the removed toggle still ships.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CHANGELOG.md` at line 104, Remove the superseded toggle-button fix entry from
the changelog, or rewrite it to clearly indicate that it no longer ships. Update
the entry around the header icon button fix while preserving the existing
changelog structure and ensuring it does not contradict the removal note near
line 98.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@CHANGELOG.md`:
- Line 104: Remove the superseded toggle-button fix entry from the changelog, or
rewrite it to clearly indicate that it no longer ships. Update the entry around
the header icon button fix while preserving the existing changelog structure and
ensuring it does not contradict the removal note near line 98.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: c4447aab-df0b-4d89-8430-a977ecd8184d

📥 Commits

Reviewing files that changed from the base of the PR and between 063baf0 and 57fe332.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • assets/css/animations.css
  • functions.php
  • patterns/header.php
  • src/scss/animations/_header-motion.scss
💤 Files with no reviewable changes (4)
  • functions.php
  • patterns/header.php
  • src/scss/animations/_header-motion.scss
  • assets/css/animations.css

…-1618)

Footer icon fix:
- Neither .is-style-footer-social-icon nor .is-style-footer-proof-card
  had real base CSS, only a shared hover rule. Split them into
  separate rules matching their own JSON specs, and gave the social
  icon explicit equal min-inline-size/min-block-size (44px) — a
  circular border-radius only produces a circle if the box is square
  first; without a matching height it was stretching into a pill on
  both desktop and mobile.

Mega-menu item card:
- Added patterns/menu/menu-item-card.php as the single reusable
  source of the mega-menu list item (icon well, title/description,
  hover-reveal arrow), used across Work, Solutions, Pricing, Insights,
  and About (Services excluded — it uses its own per-phase item
  style). A plain registered pattern, not a Synced Pattern, so each
  insertion stays independently editable.
- Applied the same structural fix to all 31 existing item rows across
  those 5 menus: the icon, text block, and arrow were direct siblings
  all vertically centered together, so aligning the icon to the top
  would also have incorrectly pushed the arrow to the top. Wrapped the
  text block and arrow together in their own centered group so the
  icon aligns to the top independently while the arrow stays centered
  against the text. No content changed — every item's icon, title,
  description, and link preserved exactly as authored.

Also cleaned up two CHANGELOG entries left over from the theme-toggle
removal that no longer matched shipped code.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@brandonmarshal

Copy link
Copy Markdown
Collaborator Author

Pre-merge checklist status:

  • ✅ Removed the temporary CSS/JS colour switcher (fully recoverable via git history)
  • 🔜 Investigating ls-plugin myself first
  • ✅ Fixed mobile/desktop icon stretching (footer social icons + proof cards)
  • ✅ Re-aligned icons to top
  • ✅ Extracted mega-menu item into a reusable pattern (patterns/menu/menu-item-card.php), applied across all 31 items in Work/Solutions/Pricing/Insights/About — content untouched

@brandonmarshal
brandonmarshal merged commit 91643c1 into develop Jul 24, 2026
5 of 7 checks passed
@brandonmarshal
brandonmarshal deleted the feature/LS-1618-mega-menus-header-footer branch July 24, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:theme Theme & styles (templates, template parts, FSE) comp:block-patterns Patterns library/registration comp:template-parts Header/footer/loop/nav parts lang:css Stylesheets lang:php PHP code priority:normal Default priority for most issues.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants