Skip to content

F1: Saddle_Lint_Style_Accessor companion interface + Gutenberg impl - #28

Merged
ifahimreza merged 1 commit into
mainfrom
feat/f1-style-accessor
Jul 10, 2026
Merged

F1: Saddle_Lint_Style_Accessor companion interface + Gutenberg impl#28
ifahimreza merged 1 commit into
mainfrom
feat/f1-style-accessor

Conversation

@ifahimreza

Copy link
Copy Markdown
Contributor

Closes #23 — the closed-loop foundation (epic #22, build step F1). Unblocks F2/F4/F5 and Pro P1/P2.

What

The deeper quality rules need design facts the base lint accessor doesn't expose. Adding methods to Saddle_Lint_Accessor would fatal older Pro accessors against a newer free, so the new facts live on an additive companion interface — rules feature-detect with instanceof and skip silently when an accessor hasn't caught up.

  • interface-saddle-lint-style-accessor.php: border_radius, gap, font_size, image_alt, heading_level, global_preset_ref, variable_refs, design_brief, + the computed_style seam the render pillar fills later. Base contract carries over: resolve what you can, null over guessing.
  • Gutenberg accessor implements it: corner radii serialized clockwise (identity-comparable), blockGap axes joined, font-size slugs resolved via theme.json (mirrors the palette resolver), core/image alt read off the saved <img> (covers stay decorative → null), var(--…) + internal var:preset|… refs normalized.

Tests

tests/style-accessor-test.php — 19 tests: every getter both ways (populated + null), plus the versioning guarantee the split exists for: a base-only legacy accessor runs through Saddle_Lint::run() with zero fatals.

Full suite 263 green (+19); phpcs clean. (CI PHPUnit red is the pre-existing no-WP-core runner issue.)

🤖 Generated with Claude Code

Closed-loop foundation (#23): the deeper quality rules need design facts the
base lint accessor doesn't expose, and adding methods to Saddle_Lint_Accessor
would fatal any older Pro accessor against a newer free. So the new facts live
on an ADDITIVE companion interface; rules feature-detect with instanceof and
skip silently when an accessor hasn't caught up.

- interface-saddle-lint-style-accessor.php: border_radius, gap, font_size,
  image_alt, heading_level, global_preset_ref, variable_refs, design_brief,
  and the computed_style seam the render pillar fills later. Same contract as
  the base interface: resolve what you can, return null over guessing.
- Gutenberg accessor implements it: corner radii serialized clockwise for
  identity comparison, blockGap axes joined, font-size preset slugs resolved
  through theme.json (mirrors the palette resolver), core/image alt read off
  the saved <img> (covers stay decorative -> null), var(--...) plus internal
  var:preset|...| refs collected and normalized.
- tests/style-accessor-test.php (19 tests): every getter both ways
  (populated + null), plus the versioning guarantee the split exists for -
  a base-only legacy accessor runs through Saddle_Lint::run() with zero
  fatals.

Full suite 263 green; phpcs clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ifahimreza
ifahimreza merged commit caf7efe into main Jul 10, 2026
1 of 4 checks passed
@ifahimreza
ifahimreza deleted the feat/f1-style-accessor branch July 10, 2026 00:12
ifahimreza added a commit that referenced this pull request Jul 10, 2026
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ifahimreza added a commit that referenced this pull request Jul 10, 2026
verify-page, render-node, get-preview-url, the a11y lint rules, and the
companion style-accessor interface (PRs #28#32), verified live on a WP 7.0
Studio site (evidence on #22). Suite 300 green.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

F1: Closed-loop foundation — Saddle_Lint_Style_Accessor companion interface + Gutenberg impl

1 participant