mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-17 16:46:31 +03:00
feat(live + site): preserve variant attr on accept, designing-page redesigns
Runtime fix in live-browser.js: the 2s static-server fallback in handleAccept now swaps the outer wrapper with the `[data-impeccable-variant="N"]` div itself (+ display:contents), matching what live-accept.mjs writes to disk. Scope rules anchored on the variant attribute keep matching on the non-HMR path, so the accepted design no longer flashes unstyled until reload. Propagated to all harness script copies. /designing: - §03 Polish redesigned as drenched magenta masthead: commands live in the band, three title/description columns beneath on cream. - §04 Maintain redesigned as architectural poster diptych: extract + document vizzes become the hero element, caption below. - §05 Interop section removed. - §05 (was §06) "Pick a register" renamed to "Brand, or product." with a two-lane hairline-divided layout and an auto-selected framing in the sub. Live mode status: BETA → ALPHA across the periodic table, magazine spread, and docs callout, reflecting real-world-testing readiness. Skill bootstrap: removed the `<post-update-cleanup>` block from source/SKILL.md (the source repo is the origin; running cleanup-deprecated here would touch legitimate source). CLAUDE.md and AGENTS.md now document the skip. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
37f79cd013
commit
e0ab3a73b7
@@ -11,22 +11,6 @@ allowed-tools:
|
||||
|
||||
Designs and iterates production-grade frontend interfaces. Real working code, committed design choices, exceptional craft.
|
||||
|
||||
<post-update-cleanup>
|
||||
BEFORE doing any design work, run this one-time maintenance step. Tell the user:
|
||||
|
||||
> **Impeccable 3.0 consolidation.** All standalone commands (/audit, /polish, /critique, etc.) are now accessed through /impeccable (e.g., `/impeccable audit`). I'll clean up the old standalone skill files. Use `/impeccable pin <command>` to restore shortcuts for commands you use often.
|
||||
|
||||
Then run:
|
||||
|
||||
```bash
|
||||
node .opencode/skills/impeccable/scripts/cleanup-deprecated.mjs
|
||||
```
|
||||
|
||||
If the script removed files, briefly confirm what was cleaned up. If it found nothing, skip any output and move on.
|
||||
|
||||
After running the script, delete this entire section (from `<post-update-cleanup>` through `</post-update-cleanup>` inclusive) from THIS file so it does not run again until the next update. Save the file.
|
||||
</post-update-cleanup>
|
||||
|
||||
## Setup (non-optional)
|
||||
|
||||
Two steps before any design work. Both are required. Skipping either produces generic output that ignores the project.
|
||||
|
||||
@@ -2818,14 +2818,18 @@ void main() {
|
||||
|
||||
// Static-server / no-HMR fallback: if the wrapper is still around 2s after
|
||||
// the cleanup above, swap it out manually. By now React has either moved
|
||||
// on or the app isn't React at all.
|
||||
// on or the app isn't React at all. Preserve the `data-impeccable-variant="N"`
|
||||
// div (with display:contents) so @scope rules anchored to the variant
|
||||
// attribute keep matching until reload replaces it with the carbonize block.
|
||||
setTimeout(function() {
|
||||
const wrapper = document.querySelector('[data-impeccable-variants="' + acceptedSessionId + '"]');
|
||||
if (!wrapper) return;
|
||||
const accepted = wrapper.querySelector('[data-impeccable-variant="' + acceptedVariant + '"]');
|
||||
if (accepted && accepted.firstElementChild) {
|
||||
const parent = wrapper.parentElement;
|
||||
if (parent) parent.replaceChild(accepted.firstElementChild.cloneNode(true), wrapper);
|
||||
if (!parent) return;
|
||||
accepted.style.display = 'contents';
|
||||
parent.replaceChild(accepted, wrapper);
|
||||
}
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user