refactor(configurator): dedupe mobile fold-toggle button markup - #465
Conversation
Extract the near-identical Controls/Preview toggle buttons into a single foldToggleButton snippet, parameterized by view, icon, and label. No behavior change — same active-state styling, same overrides badge on Preview only. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SQXr34nocCi1jrGcp5TPVm
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe two mobile fold-toggle buttons in App.svelte were refactored into a shared Svelte snippet, parameterized by target view, icon, and label, with the override-count badge shown only for the preview toggle. Duplicate inline markup was replaced with two snippet render calls. ChangesFold Toggle Refactor
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
Pulls in the App.svelte change from codeslash-dev/SLASHED#465: extracts the near-duplicate Controls/Preview mobile toggle buttons (CodeRabbit nitpick on this PR) into a single foldToggleButton snippet. No behavior change. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SQXr34nocCi1jrGcp5TPVm
PR Summary by QodoRefactor configurator mobile fold toggle buttons into a reusable snippet
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Summary
foldToggleButtonsnippet parameterized byview,icon, andlabel. No behavior change — same active-state styling, same overrides-count badge shown only on the Preview button.Test plan
npx svelte-check— 0 errors (had to type the icon param astypeof SlidersHorizontalsince lucide-svelte's icons areSvelteComponentTyped-based, not Svelte 5Component-typed).npm run build— builds cleanly.🤖 Generated with Claude Code
https://claude.ai/code/session_01SQXr34nocCi1jrGcp5TPVm
Generated by Claude Code
Summary by CodeRabbit