Skip to content

Refactor builder panels: modularize controls and split left/right panels#53

Open
a5sh wants to merge 1 commit into
mainfrom
codex/refactor-builder-architecture-and-layout-ufib8x
Open

Refactor builder panels: modularize controls and split left/right panels#53
a5sh wants to merge 1 commit into
mainfrom
codex/refactor-builder-architecture-and-layout-ufib8x

Conversation

@a5sh
Copy link
Copy Markdown
Collaborator

@a5sh a5sh commented May 8, 2026

Motivation

  • Reduce duplication and bloat in the builder UI by extracting reusable control primitives and splitting large monolithic panel files into focused modules.
  • Improve maintainability and consistency between the simple and advanced builder experiences by providing a shared panel-switching API and a single simple/advanced toggle.
  • Prepare the codebase for future UI/UX improvements (per-panel advanced editor, easier tests, and smaller reviewable units).

Description

  • Extracted shared builder UI primitives into src/components/builder/components/controls/BuilderControls.tsx (Section, SliderRow, ToggleRow, SegmentedRow, TextInputRow, SelectBox, ColorRow) and replaced many inline copies in PropertyPanel and LayerPanel with these controls.
  • Split the left and right panel surfaces into individual modules under src/components/builder/components/panels/ (left/SourcePanel, left/LayersPanel, left/PosterPanel, right/BadgesPanel, right/SelectionPanel) and added AdvancedPanelHost + AdvancedPanelList to drive the advanced left rail.
  • Added a compact PanelSwitcher (components/layout/PanelSwitcher.tsx) and a BuilderModeToggle (components/layout/BuilderModeToggle.tsx) and wired the header to use the new mode toggle instead of the previous support CTA.
  • Updated LayerPanel, PropertyPanel, Inspector, AdvancedBuilderApp, and the simple BuilderApp composition to load the new per-panel modules (desktop sidebars and mobile sheet), and introduced a forcedPanel prop so the same panel can be hosted in different layouts without duplicating logic.

Testing

  • Ran a production build with npm run build, which completed successfully and produced static pages (build ✓).
  • Ran unit test runner with npm test; Vitest returned “No test files found” (exit indicates no tests were executed).
  • Ran type checking with npm run typecheck; TypeScript reported remaining type errors unrelated to the refactor (pre-existing repo type debt in admin analytics, command palette/preview canvas unused symbols, and a few other files), so typecheck did not fully pass.

Codex Task

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 8, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
posterium-frontend ee5a418 Commit Preview URL

Branch Preview URL
May 08 2026, 06:17 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant