fix(configurator): stop full-viewport sizing from clipping inside WP admin - #463
Conversation
…admin w-screen/h-screen are correct for the standalone hosted configurator, which owns the whole page. Embedded in WP admin, the app mounts inside the host's normal document flow, so the viewport-sized root overflowed past the right edge of the content area while the host's own layout chrome left a visible gap above and to the left of it. Switch to w-full/h-full when running embedded, matching the existing isEmbedded() boundary already used for persistence. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SQXr34nocCi1jrGcp5TPVm
|
Warning Review limit reached
Next review available in: 55 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughApp.svelte now detects host embedding through a persistence helper and switches its root sizing classes accordingly. ColorsPanel adds shared swatch hover labels, updates brand/curve/mini palette text and markup, and replaces the status palette strip with derived status variants. ChangesEmbedded sizing behavior
Colors panel rendering
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
PR Summary by QodoFix configurator root sizing when embedded in WP admin
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
6 rules 1.
|
isEmbedded() specifically checks REST persistence availability (window.slashedApp.rest.url), but a host can mount window.slashedApp without configuring rest (it's optional in the type). Layout sizing needs the broader boundary loadInitialOverrides() already uses — any host-mounted boot — so add hasWpBoot() and use that for the w-full/h-full vs w-screen/h-screen decision instead. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SQXr34nocCi1jrGcp5TPVm
Status families (success/warning/info/danger) have no numeric palette scale in the framework — core/tokens.css only derives -subtle, -muted, and -strong variants for them, unlike brand families which get a real 11-step -50..-950 ramp. The Status colors section was unconditionally rendering an 11-swatch strip using the brand mix-curve formula anyway, implying tokens like --sf-color-success-500 that don't exist. Replace it with a preview of the four values that actually exist (resolved color, subtle, muted, strong), resolved from the real CSS custom properties via the existing themed-probe resolver instead of re-implementing the formulas in JS. Also add brief in-panel notes clarifying two behaviors that are correct-but-surprising, not bugs: brand tints/shades intentionally mix toward Base/Text so editing those shifts every family's ramp, and Base's ramp uses the same lightness steps in light and dark mode so it looks similar until you add chroma. And upgrade palette swatches' hover state from a slow native title tooltip to an instant floating label with the token name. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SQXr34nocCi1jrGcp5TPVm
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@configurator/src/components/panels/ColorsPanel.svelte`:
- Around line 453-459: The swatchTip snippet in ColorsPanel.svelte renders a
visual-only hover label that is still exposed to assistive tech because it only
uses opacity-based hiding. Update the tooltip span in swatchTip(name) to be
aria-hidden so the floating label stays purely decorative and does not add
duplicate text to screen readers.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 05a55ad2-1467-4f66-82f1-475e1ebc9f68
📒 Files selected for processing (3)
configurator/src/App.svelteconfigurator/src/components/panels/ColorsPanel.svelteconfigurator/src/lib/persistence.ts
opacity-0/group-hover:opacity-100 only visually hides the floating tooltip label — it stayed in the accessibility tree, so screen readers would announce duplicate text for every palette swatch. Mark it aria-hidden since it's a purely decorative visual affordance (the title attribute already carries the accessible name). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SQXr34nocCi1jrGcp5TPVm
Summary
w-screen h-screen(viewport units), which is correct for the standalone hosted app that owns the whole page..wrapmargin,#wpcontentpadding) left a visible gap above and to the left of it.w-full h-fullwhen running embedded, reusing the existingisEmbedded()boundary already used for persistence (window.slashedApppresence), and keepw-screen h-screenfor the standalone case.codeslash-dev/SLASHED-Plugins) re-syncs this change and adds plugin-side CSS to give the app's WP-admin ancestor chain a real height soh-fullhas something to fill.Test plan
npx svelte-check— 0 errorsnpm run build(configurator) — builds cleanlynpm run check:version— in sync (no version-related files touched)🤖 Generated with Claude Code
https://claude.ai/code/session_01SQXr34nocCi1jrGcp5TPVm
Generated by Claude Code
Summary by CodeRabbit