Repository navigation
feat: complete Group B — canonical sources for the eight filter demos - #11
Merged
Merged
Conversation
The four-layer background motif was owned by a nine-selector rule spanning
the whole filter family, and every copied snippet carried a stale
three-stop substitute plus all eight filter declarations.
- demos/_delat/filter-motiv.css: one canonical owner of the complete motif
(two radial dots, a stripe field, the diagonal --acc gradient), published
exactly once and reaching only the eight snippets that request it.
- demos/filter-{blur,contrast,saturate,hue-rotate,sepia,grayscale,invert,
drop-shadow}.html: each source requests swatch + swatch-solo + filter-motiv
and owns exactly one declaration, its own filter; the laboratory --lv scale
stays in <style data-live> and is never copied.
- One intentional markup change: the shared class `f-motiv` on the eight
filter swatches, so one selector can own the motif without naming the
seven other demos. Documented per node in tests/demo-parity.mjs
(INTENTIONAL_DIFFS) and locked from both sides by scripts/build.test.mjs.
- Baselines for all eight were captured from the untouched document
(7cd4d27d) before any edit; the 22 historical entries and mergeLog are
unchanged.
Inventory: 133 demos, 134 register entries, 30 canonical sources, 16 of 16
Group B migrated, 0 remaining, zero runtime JavaScript.
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Branch:
arena/01a0dca7-0-js· commit88a6920· base:main@c27b31092cfc275c40dd07f8eeeac5cd5323e3f91. Verified starting commit and inventory
MERGED;mainis still atc27b310, and it is an ancestor of this branch, so no rebase or merge was needed.index.htmlSHA-256:7cd4d27dbe56d0a5e4e381b340fbcfac673b37b7090d6f62db13c8ca5e3214f8.2. CSS ownership map for all eight filters
Full table in
docs/migrering/grupp-b-filter/README.md§2. Summary:demos/_delat/swatch.css(existing).swatch,.swatch-yta,.swatch-lbldemos/_delat/swatch-solo.css(existing).swatch-solo,.swatch-solo > .swatch,.swatch-solo .swatch-ytademos/_delat/filter-motiv.css(new).f-motiv .swatch-yta— the complete four-layer motif, same declaration and layer order, byte for bytedemos/filter-*.htmlfilter:declaration only (.f-blur .swatch-yta { filter: blur(3px); }….f-drop .swatch-yta { filter: drop-shadow(0 0 8px var(--acc)) brightness(.9); })<style>, copied<style data-live>.labbar.f-* .swatch-yta { filter: … calc(var(--lv) …) }— original selectors/declarations retained.labbar,.labb-*,--lvradios,.enh-*counters,.fig, support rows, register, navigation.filter-row .swatch-yta, .f-blur … .f-drop .swatch-yta) and its page comment.filter-row { display:grid; … }— dead (no live element uses the class), not imported into any snippet.grad-rowin PR #103. Motif architecture chosen
Four options were weighed; the shared class was chosen:
.swatch-solo .swatch-yta→ it also matches the five gradient swatches, so correctness would depend on stylesheet order;f-motiv, which has no rule of its own and changes no computed style — it only lets.f-motiv .swatch-ytaown the motif.4. Exact markup change
Eight elements, one per demo (
div:nth-child(5)>span:nth-child(1)in each.demo-yta). Nothing else changed in the DOM. Proven by reconstruction: takingHEAD:index.html, inserting only the markers, and running the generator reproduces the committedindex.htmlbyte for byte.5. The complete motif is preserved
Declaration body compared byte for byte against the pre-migration rule: identical. Asserted in
scripts/build.test.mjs§12b (each layer present, in order, in the fragment; the rule published exactly once; the old selector gone; each layer string occurring exactly once in the whole stylesheet) and §12d (all four layers, in order, in every snippet). Browser-side, each snippet's computedbackground-imageis compared with a probe-computed reference (§8 evidence), and §12c/§8 assert the layers paint.6. Standalone evidence per filter
docs/migrering/grupp-b-filter/standalone/— one screenshot and one computed-style report per filter (Grundpaketet + the real generated textarea content). Painted assertions (Chromium 153.0.8010.0): blur sharpness 5.12 vs 9.26; contrast luma σ 45.86 vs 30.01; saturate mean saturation 142.18 vs 69.65; hue-rotate 248° → 11.7°; sepia r−b 50.28 vs −25.99; grayscale saturation 0 at unchanged luma 161.82; invert mean |px − (255 − original)| 0.13; drop-shadow luma 145.66 vs 161.82 plus a measured warm glow when the ancestor clip is lifted. Table in the migration README §8.7. Before/after evidence for the live demos
144 samples (8 demos × 375/768/1280 px × guld/syra × default/lv-0/lv-8): 144/144 PNG pairs byte-identical; all 144 normalised attribute/text/geometry/computed-style hashes identical; all 144 raw hashes differ only by the documented
f-motivtoken. No tolerance or masking. Four representative pairs and both JSON manifests are committed; the whole matrix is reproducible withevidence.mjs.8. Baseline provenance
Eight separate
--capture --merge --demo IDruns against the untouched document (the utility refuses any other file).tests/baseline/demos.json: 30 entries; all 22 historical entries byte-identical; top-leveldocumentSha256,chromium,viewport,_readmeunchanged; the previous 8mergeLogrecords preserved and 8 appended (each withdocumentSha256 7cd4d27d…, chromium153.0.8010.0). No historical entry was recaptured.9. Intentional DOM differences and their narrowed tests
tests/demo-parity.mjsdeclaresINTENTIONAL_DIFFS: eight records (id, node path, class before, class after).applyIntentionalDiffsnormalises only that token and throws if either side does not match, so a recaptured baseline fails instead of hiding the change. Everything else stays strict.scripts/build.test.mjs§14 locks it from both sides with negative cases: undeclared class on the same node, extra class, removed filter class, recaptured baseline, node not measured, and a non-filter demo (no exemption at all). §12i is the negative regression for the class itself: removingf-motivfrom any one source makesindex.htmlstale and leaves that snippet without the motif.10. Commands and results
npm run build/npm run build:checknpm run checknpm run test:browsernode tests/demo-parity.mjs --strict --require-same-browser --demo ID(×8)node docs/migrering/grupp-b-filter/evidence.mjs compare …Chromium for every capture and comparison:
@sparticuz/chromium@153.0.0(verified153.0.8010.0). No dependency orpackage-lockchange.11. GitHub Actions status
The existing workflow already runs the scripts used here; no workflow change is needed. Checks on this PR are reported below. (Note: earlier in the session push and PR creation failed with
HTTP 401: Bad credentialsbecause the environment token had expired; the connection was reconnected, the branch was pushed, and the results above are unchanged.)12. Updated inventory
133 demonstrations · 134 register entries · 30 canonical sources · 3 shared fragments · 16 of 16 Group B migrated, 0 remaining · zero runtime JS.
README.mdanddocs/demo-kalla.mdupdated accordingly.13. Remaining limitations
.filter-rowlayout rule remains in the stylesheet, deferred exactly as.grad-rowwas in PR feat: finish Group B canonical gradient migration #10..swatch { overflow: hidden }clips thedrop-shadowglow on the live page — pre-existing behaviour, unchanged; measured separately.color-mix-kontinuerligtand the other 103 non-Group-B demos are out of scope.target,appearance-base-select, max 22.09 px) remain; they are unrelated to this batch and do not appear in the eight strict comparisons.