fix(admin-app): fix CSS loading and modernise sidebar for mobile - #31
Conversation
…ability - Add `import './styles/app.css'` to main.js so all --cfg-* CSS custom properties resolve correctly (root cause of invisible sliders, dark sidebar, and unreadable inputs on mobile) - Clear loading placeholder before mounting so the SPA replaces rather than appends to the #slashed-admin-app fallback text - Redesign WpSidebar with light surface-2 background, 8 px border-radius items, inset 3 px active accent stripe, 40 px min-height touch targets (44 px on mobile), and no hardcoded dark fallback colours - Rebuild assets https://claude.ai/code/session_017Q5NUFKipcefaCeWSfwQib
|
Warning Review limit reached
More reviews will be available in 51 minutes and 51 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe admin SPA entry point ( ChangesWP Admin App: Sidebar Restyle & Entry Point Fix
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
SLASHED-for-WP/admin-app/src/components/WpSidebar.svelte (1)
42-42: 💤 Low valueSimplify redundant ternary.
Both branches return
d.label, so the ternary can be removed.♻️ Proposed simplification
- title={ui.sidebarOpen ? d.label : d.label} + title={d.label}🤖 Prompt for 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. In `@SLASHED-for-WP/admin-app/src/components/WpSidebar.svelte` at line 42, Remove the redundant ternary operator in the title attribute of the WpSidebar.svelte component. Since both the true and false branches of the ternary expression return the same value `d.label`, the conditional logic is unnecessary. Replace the entire ternary `ui.sidebarOpen ? d.label : d.label` with just `d.label`.
🤖 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.
Nitpick comments:
In `@SLASHED-for-WP/admin-app/src/components/WpSidebar.svelte`:
- Line 42: Remove the redundant ternary operator in the title attribute of the
WpSidebar.svelte component. Since both the true and false branches of the
ternary expression return the same value `d.label`, the conditional logic is
unnecessary. Replace the entire ternary `ui.sidebarOpen ? d.label : d.label`
with just `d.label`.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: b8259bb5-6a93-41c4-a7b5-a38031298ebe
📒 Files selected for processing (4)
SLASHED-for-WP/admin-app/src/components/WpSidebar.svelteSLASHED-for-WP/admin-app/src/main.jsSLASHED-for-WP/assets/admin-app/app.cssSLASHED-for-WP/assets/admin-app/app.js
Both branches of `ui.sidebarOpen ? d.label : d.label` returned the same value — simplify to `d.label`. https://claude.ai/code/session_017Q5NUFKipcefaCeWSfwQib
Generated by sync-core.mjs during admin-app build. https://claude.ai/code/session_017Q5NUFKipcefaCeWSfwQib
The sync-core.mjs prebuild picked up newer local framework tokens that aren't yet documented in the cheatsheet, breaking check:cheatsheet CI. These data files are unrelated to this PR's changes (WpSidebar + main.js). https://claude.ai/code/session_017Q5NUFKipcefaCeWSfwQib
Summary
main.jswas missingimport './styles/app.css', so every--cfg-*CSS custom property resolved to an empty string on the.shellelement. This caused transparent/invisible sliders, dark sidebar fallback colour, and unreadable inputs on mobile.mount()in Svelte 5 appends to the target rather than replacing it; addedtarget.innerHTML = ''before mounting so the "Loading SLASHED settings…" fallback text disappears when the SPA boots.WpSidebar.svelterewritten:var(--cfg-surface-2)background (light),border-radius: 8pxitems,inset 3px 0 0 var(--cfg-accent-strong)active stripe,min-height: 40px/44pxon mobile, no hardcoded dark colour fallbacks anywhere.Test plan
https://claude.ai/code/session_017Q5NUFKipcefaCeWSfwQib
Generated by Claude Code
Summary by CodeRabbit