Skip to content

Migrate Work section patterns to the Core Icon block (LS-3229) - #47

Open
brandonmarshal wants to merge 6 commits into
feature/ls-3229-icon-block-homepagefrom
feature/ls-3229-icon-block-work
Open

Migrate Work section patterns to the Core Icon block (LS-3229)#47
brandonmarshal wants to merge 6 commits into
feature/ls-3229-icon-block-homepagefrom
feature/ls-3229-icon-block-work

Conversation

@brandonmarshal

Copy link
Copy Markdown
Collaborator

Summary

Replaces outermost/icon-block (third-party "Icon Block" plugin) instances in the Work section patterns with WordPress 7.1's native Core Icon block (core/icon), referencing icons from the lightspeed collection registered in ls-plugin. Third of 5 stacked batches migrating all 38 outermost/icon-block usages across the theme (see LS-3229). Stacked on feature/ls-3229-icon-block-homepage (#45).

Files changed (8 files, 19 icon instances — all converted, no gaps)

  • patterns/hero/work-hero.phpdot
  • patterns/hero/work-single-hero.phpdot
  • patterns/cards/work-capability-list.phpcategory, cart, cube
  • patterns/cards/work-next-steps-card.phparrow-right
  • patterns/sections/work-categories.phpcategory, cart, cube
  • patterns/sections/work-discuss-project.phpdot
  • patterns/sections/work-related-routes.phpdot + arrow-right ×7
  • patterns/sections/work-selected-projects.phpdot

No missing icons in this batch — nothing added to LS-3229's tracking list.

Markup change

Same pattern as Batches 1–2 — core/icon is dynamic (server-rendered), so every instance collapses to a single self-closing comment, e.g.:

<!-- wp:icon {"icon":"lightspeed/category","style":{"dimensions":{"width":"18px"}}} /-->

Icon mapping verification

Every icon assignment was verified by exact-path-matching the source <svg> against the real files in ls-plugin/assets/icons/lightspeed/. work-capability-list.php and work-categories.php both had an icon exact-match lightspeed/cart in a slot the mapping doc had attributed to folder — same doc-correction pattern already confirmed in Batch 2's homepage-what-we-build.php, verified against the actual collection file, not guessed.

Test plan

  • outermost/icon-block count is 0 across all 8 changed files (scripted check)
  • wp:icon instance count matches the verified 19-instance mapping table exactly, per file
  • Every wp:icon JSON attribute payload parses as valid JSON (scripted check across all 8 files)
  • PHP block-rendering test (parse_blocks + render_block via wp eval-file) on all 8 files — zero errors, correct <svg>/.wp-block-icon count per file, including nested-pattern inflation (work-hero.php pulling in work-capability-list.php's icons; work-categories.php pulling in the still-unconverted eyebrow-badge.php, correctly left alone as a Batch 4 file) confirmed as expected rather than a bug
  • Manual visual QA in the Site Editor and live frontend (light and dark) — pending Brandon's review

Part of LS-3229 (Batch 3 of 5). Next: Batch 4 (Blog, cards & misc content) on a branch stacked on top of this one, once this PR is reviewed.

Icon block conversion
- Replace outermost/icon-block with core/icon across 8 nav files
- Reference lightspeed/{name} icons instead of inline SVG
- Cover all 81 instances: mega-menus, mobile menu, menu-item-card pattern

Icons used
- about-mega-menu: lightbulb, rocket, shield, trend-up, seal-check, wheelchair
- insights-mega-menu: cube, brain, arrows-clockwise, tray, palette, book
- pricing-mega-menu: stack, building-office, archive, trending-up, calculator, seal-check
- solutions-mega-menu: credit-card, newspaper, brain, chat, cart, airplane-tilt, palette
- work-mega-menu: folder (x2), puzzle-piece, cart, database, quote
- mobile-menu, services-mega-menu: dot (per lifecycle phase) + chevron-right
- All mega-menus, menu-item-card: arrow-right (chevron)

Verification
- Zero remaining outermost/icon-block references across all 8 files
- PHP block-rendering test confirms correct SVG output, no errors
- Manual QA in Site Editor and live frontend, light and dark
Icon block conversion
- Replace outermost/icon-block with core/icon across 8 homepage files
- Reference lightspeed/{name} icons instead of inline SVG
- Cover 35 of 37 instances (2 skipped, see below)

Icons used
- home-hero, home-hero-static, homepage-cta, homepage-featured-work: dot
- home-hero: special-interests, arrow-right
- homepage-what-we-build: category, cart, puzzle-piece, arrows-clockwise
- homepage-where-to-fit: house, trending-up, building-office, check (x12)
- homepage-where-to-start: folder
- homepage-why-lightspeed: check (x5)

Known gaps
- homepage-where-to-start.php: 2 instances left as outermost/icon-block
  (notepad and clipboard-text shapes have no lightspeed collection match
  yet); tracked in LS-3229's "Missing icons" list for a later bulk pass

Verification
- Zero unintended remaining outermost/icon-block references (2 expected exceptions)
- PHP block-rendering test confirms correct SVG output, no errors
Icon block conversion
- Replace outermost/icon-block with core/icon across 8 Work files
- Reference lightspeed/{name} icons instead of inline SVG
- Cover all 19 instances, zero remaining outermost/icon-block

Icons used
- work-hero, work-single-hero, work-discuss-project, work-selected-projects: dot
- work-capability-list, work-categories: category, cart, cube
- work-next-steps-card, work-related-routes: arrow-right (x8 total)

Verification
- Zero remaining outermost/icon-block references across all 8 files
- PHP block-rendering test confirms correct SVG output, no errors
- Nested pattern includes (work-capability-list, eyebrow-badge) verified
  to inflate render counts as expected, not indicative of any issue
@brandonmarshal brandonmarshal added area:theme Theme & styles (templates, template parts, FSE) comp:block-patterns Patterns library/registration lang:php PHP code priority:normal Default priority for most issues. status:needs-review Awaiting code review labels Sep 9, 2026
@linear-code

linear-code Bot commented Sep 9, 2026

Copy link
Copy Markdown

LS-3229

@brandonmarshal brandonmarshal self-assigned this Sep 9, 2026
@brandonmarshal
brandonmarshal added this pull request to stack #46 September 9, 2026 08:58
@brandonmarshal
brandonmarshal requested a lite review from Copilot September 9, 2026 08:59

Copilot AI 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.

🟢 Approval recommended

The migrations are consistent with existing wp:icon usage in the repo and the updated pattern markup remains valid and self-contained.

Pull request overview

This PR continues the LS-3229 migration away from the third-party outermost/icon-block plugin block by converting all Work-section pattern icon instances in this batch to the native core/icon (wp:icon) block, using the lightspeed/* icon collection.

Changes:

  • Replaced decorative “dot” icons in Work hero/section headers with wp:icon instances using semantic colour tokens.
  • Replaced “category/cart/cube” capability icons with wp:icon instances sized via style.dimensions.width.
  • Replaced all “arrow-right” trailing icons in Work route cards with wp:icon instances, preserving semantic colour usage and sizing.
File summaries
File Description
patterns/hero/work-hero.php Migrates the hero eyebrow dot from outermost/icon-block to wp:icon (lightspeed/dot).
patterns/hero/work-single-hero.php Migrates the single-work hero eyebrow dot to wp:icon (lightspeed/dot).
patterns/cards/work-capability-list.php Migrates the three capability icons to wp:icon (lightspeed/category, lightspeed/cart, lightspeed/cube).
patterns/cards/work-next-steps-card.php Migrates the trailing arrow icon to wp:icon (lightspeed/arrow-right) with semantic colour token.
patterns/sections/work-categories.php Migrates the three category card icons to wp:icon with consistent sizing.
patterns/sections/work-discuss-project.php Migrates the section eyebrow dot to wp:icon (lightspeed/dot).
patterns/sections/work-related-routes.php Migrates the section eyebrow dot and all trailing arrows to wp:icon (lightspeed/dot, lightspeed/arrow-right).
patterns/sections/work-selected-projects.php Migrates the section eyebrow dot to wp:icon (lightspeed/dot).
Review details
  • Files reviewed: 8/8 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

brandonmarshal added a commit that referenced this pull request Sep 9, 2026
…ration (LS-3720) (#49)

* Fix legacy outermost/icon-block CSS selectors broken by Core Icon migration (LS-3720)

Bug fix
- Add .wp-block-icon alongside .wp-block-outermost-icon-block in
  _menu-motion.scss (mega-menu chevron hover/focus color + reduced-motion)
- Add .wp-block-icon alongside .wp-block-outermost-icon-block .icon-container
  in work-archive-sections.scss (card-link-row hover/focus icon color)
- Both fixes are additive: any not-yet-converted outermost/icon-block
  instance keeps working, core/icon instances now get the same treatment

Cleanup
- Remove dead .site-footer .icon-container svg{fill:currentColor} rule
  from _footer-motion.scss — redundant now that every lightspeed/*
  icon bakes fill="currentColor" into its own path, and WP core's
  default stylesheet already forces .wp-block-icon svg{fill:currentColor}
- Delete assets/css/animations.min.css — stale, unenqueued build
  artifact with no reference anywhere in the codebase

Context
- Found via audit LS-3719, filed as bug LS-3720
- Not stacked on the LS-3229 batch PR chain (#44/#45/#47/#48) since
  none of these files overlap with those diffs; branched off develop

Verification
- npm run build:css run in full; only animations.css and
  work-archive-sections.css changed
- Compiled CSS selector counts verified (4+4 and 2+2 respectively)
- Confirmed zero remaining references to animations.min.css before deleting

* Move mega-menu icon hover colour out of the motion partial (LS-3720)

Bug fix
- Relocate `.is-style-mega-menu-item-default` icon hover/focus `color`
  rule from `src/scss/animations/_menu-motion.scss` to
  `src/scss/structural/_mega-menu.scss`
- Animations partial now only holds the `transition` property and its
  reduced-motion override, per AGENTS.md's motion-only rule for
  `src/scss/animations/**`

Context
- Addresses Copilot review feedback on PR #49: the colour swap is a
  non-motion property and belongs in the structural partial alongside
  the existing `.is-style-mega-menu-item-default` rules
- Rebuilt `assets/css/animations.css` to reflect the change

* Updating CHANGELOG.md
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 lang:php PHP code priority:normal Default priority for most issues. status:needs-review Awaiting code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants