Skip to content

refactor(overlap): drop inline-axis directional variants - #628

Merged
jackgranatowski merged 2 commits into
mainfrom
claude/overlap-framework-retention-5sei7g
Jul 17, 2026
Merged

refactor(overlap): drop inline-axis directional variants#628
jackgranatowski merged 2 commits into
mainfrom
claude/overlap-framework-retention-5sei7g

Conversation

@jackgranatowski

@jackgranatowski jackgranatowski commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Remove .sf-overlap--start and .sf-overlap--end. The horizontal-overlap
variants had no demonstrated real-world use case (negative inline margins
overlapping a sibling is rarely what you want versus absolute positioning)
and inflated the public API on the same axis the framework was deliberately
disciplined about elsewhere (the corner recipes cut before 1.0).

Keeps the base pair .sf-overlap (pull-up) + .sf-overlap-host — the
recipe's real value (isolated stacking context + automatic padding
compensation) — plus the block-axis .sf-overlap--down variant.

Updated CSS, macro docs, annotations, tests, configurator preview, and the
demo coverage gallery; regenerated derived docs/registry/API index.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01Q1XiJo184xVAv18qsyVvDH

Summary by CodeRabbit

  • New Features
    • Added the .sf-overlap--down utility for vertical overlap below an element.
  • Changes
    • Removed the .sf-overlap--start and .sf-overlap--end utilities and their horizontal overlap behavior; overlap behavior now uses the vertical modifier.
  • Documentation
    • Updated demos, previews, API references, and class/token docs to reflect the revised overlap utilities and coverage.
  • Bug Fixes
    • Updated overlap spacing validation and coverage to match the new vertical variant.
    • Updated the reported optimized (“gzip”) bundle size from 19.6 kB to 19.5 kB.

Remove `.sf-overlap--start` and `.sf-overlap--end`. The horizontal-overlap
variants had no demonstrated real-world use case (negative inline margins
overlapping a sibling is rarely what you want versus absolute positioning)
and inflated the public API on the same axis the framework was deliberately
disciplined about elsewhere (the corner recipes cut before 1.0).

Keeps the base pair `.sf-overlap` (pull-up) + `.sf-overlap-host` — the
recipe's real value (isolated stacking context + automatic padding
compensation) — plus the block-axis `.sf-overlap--down` variant.

Updated CSS, macro docs, annotations, tests, configurator preview, and the
demo coverage gallery; regenerated derived docs/registry/API index.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q1XiJo184xVAv18qsyVvDH
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: af66df3f-c2e6-4287-b565-02aaadf3aae5

📥 Commits

Reviewing files that changed from the base of the PR and between 64aa9c2 and 06da4b1.

📒 Files selected for processing (1)
  • demo/index.html

📝 Walkthrough

Walkthrough

The overlap utility now supports the default and --down directions, removing --start and --end. CSS, tests, previews, demos, documentation, generated catalogs, and counts are updated accordingly. The optimal badge gzip value is also revised.

Changes

Overlap utility update

Layer / File(s) Summary
Update overlap behavior and tests
core/macros.css, tests/macros.spec.js
The CSS and parameterized tests now cover vertical overlap behavior, including .sf-overlap--down, while removing inline directional offsets.
Update previews and demonstrations
configurator/src/lib/preview/sections.ts, demo/index.html, docs/macros.md
Preview swatches, demo text, and variant documentation now show .sf-overlap and .sf-overlap--down.
Regenerate overlap catalogs
docs/api-index.*, docs/classes.md, docs/registry.json, docs/token-annotations.json
Generated class lists and counts remove .sf-overlap--start and .sf-overlap--end, add the retained variants, and update totals.

Badge metadata update

Layer / File(s) Summary
Adjust reported badge size
badges/badge-optimal.json
The reported gzip size changes from 19.6 kB gzip to 19.5 kB gzip.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: codex

Suggested reviewers: claude

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing the inline-axis overlap variants.
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 claude/overlap-framework-retention-5sei7g

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.

@coderabbitai coderabbitai Bot added the codex label Jul 16, 2026
@greptile-apps

greptile-apps Bot commented Jul 16, 2026

Copy link
Copy Markdown

Greptile Summary

This PR removes the .sf-overlap--start and .sf-overlap--end inline-axis overlap variants from the public API, retaining only the block-axis pair (.sf-overlap / .sf-overlap--down) and the host recipe. All derived artifacts — CSS, docs, registry, configurator data, tests, and the demo gallery — are updated in lockstep.

  • core/macros.css: Two CSS rules deleted; the shared selector group for position: relative / z-index is tightened to the two surviving classes.
  • Docs & registry (api-index.json/md, classes.md, macros.md, registry.json, token-annotations.json): Class counts decremented by 2 everywhere and table rows for the removed classes pruned.
  • Demo & configurator: Gallery <figure> cards removed; preview swatches updated; classes.generated.json cleaned up — but the embedded #cov-data JSON in demo/index.html still lists the deleted classes (see inline comment).

Confidence Score: 4/5

Safe to merge with one follow-up: the embedded coverage-data JSON in demo/index.html needs the two deleted class names removed so the displayed class counter matches the rest of the updated artifacts.

The CSS removal and all derived docs/registry/configurator artifacts are internally consistent. The one gap is the #cov-data JSON blob in demo/index.html, which still lists sf-overlap--end and sf-overlap--start; the page's inline script uses that list to drive the displayed class count, so the demo will advertise 289 classes where every other updated artifact agrees on 287.

demo/index.html — the #cov-data JSON blob (line 5020) needs sf-overlap--end and sf-overlap--start removed from the classes array.

Important Files Changed

Filename Overview
demo/index.html Figure cards for sf-overlap--end/start correctly removed from gallery, but the embedded #cov-data JSON still lists both deleted classes, causing the demo's class counter to report 289 instead of 287.
core/macros.css Cleanly removes .sf-overlap--start and .sf-overlap--end rules; keeps .sf-overlap and .sf-overlap--down intact.
tests/macros.spec.js Removes test cases for the two deleted variants; remaining overlap tests are intact and correct.
configurator/src/lib/preview/sections.ts Preview swatches updated to replace --start/--end with --down; comment updated to reflect block-axis-only variants.
docs/api-index.json Removes both class entries and correctly decrements all derived counts (total, by_type, by_tier, by_category).
docs/api-index.md Header counts and table entries updated consistently to reflect 1069 elements, 323 classes.
docs/macros.md Variant table cleaned up; --start and --end rows removed cleanly.
docs/token-annotations.json Annotation entries for both removed classes deleted.
docs/registry.json sf_classes count and class list updated correctly.
docs/classes.md Class count heading and table rows updated to match the removal.
configurator/src/data/classes.generated.json Both class entries removed from the generated JSON; no dangling references remain.
badges/badge-optimal.json Badge message updated to 19.5 kB gzip, reflecting the reduced bundle size from removing two rules.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    CSS[core/macros.css\nremove --start / --end rules]
    CSS --> DOCS[docs/\napi-index · classes · macros\nregistry · token-annotations]
    CSS --> CFG[configurator/\nclasses.generated.json\npreview/sections.ts]
    CSS --> BADGE[badges/badge-optimal.json\n19.6 → 19.5 kB]
    CSS --> TESTS[tests/macros.spec.js\nremove --start/--end cases]
    CSS --> DEMO[demo/index.html\nfigure cards removed ✓\ncov-data JSON ⚠ stale]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    CSS[core/macros.css\nremove --start / --end rules]
    CSS --> DOCS[docs/\napi-index · classes · macros\nregistry · token-annotations]
    CSS --> CFG[configurator/\nclasses.generated.json\npreview/sections.ts]
    CSS --> BADGE[badges/badge-optimal.json\n19.6 → 19.5 kB]
    CSS --> TESTS[tests/macros.spec.js\nremove --start/--end cases]
    CSS --> DEMO[demo/index.html\nfigure cards removed ✓\ncov-data JSON ⚠ stale]
Loading

Comments Outside Diff (1)

  1. demo/index.html, line 5020 (link)

    P1 Stale class list in coverage data JSON

    The embedded #cov-data JSON at this line — used by the page's inline script to compute and display the live class count — still includes "sf-overlap--end" and "sf-overlap--start" in its classes array. The figure cards for those classes were correctly removed from the gallery above, but the JSON wasn't updated to match. As a result, the coverage counter shown in the demo will report 289 classes instead of 287, drifting from every other artifact in the PR (docs/api-index.md, docs/classes.md, docs/registry.json) that was correctly updated to 287.

Reviews (1): Last reviewed commit: "refactor(overlap): drop inline-axis dire..." | Re-trigger Greptile

The embedded #cov-data JSON still listed sf-overlap--start and
sf-overlap--end in its classes array, so the demo's live class counter
drifted from every other artifact (reporting the two removed classes as
still present). Remove both entries to match the pruned gallery and the
regenerated docs/registry.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q1XiJo184xVAv18qsyVvDH
@jackgranatowski
jackgranatowski merged commit bb27974 into main Jul 17, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants