26 Commits

Author SHA1 Message Date
Aymeric Rabot
d3e17cac04 Add editor preview mode for in-place viewer experience
Adds a Preview button next to Radio Pascal that switches the editor
into a viewer-like experience without leaving the page. The preview
mode swaps in the viewer's selection manager (hierarchical drill-down),
zone system, camera controls (left-click pan, auto-navigate), and
interactive item system while hiding editor-only UI (tools, panels,
sidebar, grid). Back arrow in the viewer overlay returns to the editor.

Also widens the default sidebar from 288px to 432px for better
project title visibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-06 23:43:10 -05:00
wass08
8d26a4d81c fix issue when switching phase/structure layer 2026-03-06 13:09:25 +01:00
Aymeric Rabot
441517424d
Feat/ux polish round2 (#123)
* Polish editor UI, radio, and state logic

Multiple UI and state updates across the editor and viewer:

- PascalRadio: Move radio play state into audio store (isRadioPlaying), update icons/behaviors (Volume2/VolumeX), remove autoplay UI, ensure pause/resume respects muted and radio playing state.
- use-audio: Add isRadioPlaying, setRadioPlaying and toggleRadioPlaying to store; initialize state accordingly.
- Action menu: Add layout/motion to container, refine transition, only show furnish/structure rows in build mode, tweak transition classes and hover/opacity behavior.
- Furnish/Structure tools: Simplify inactive styling, change click behavior to only select tools (no direct deselect), remove "click to deselect" tooltip text.
- Sidebar/Icon rail: Update logo link styling and image sizing; AppSidebar: add inline editable project title (optimistic local update + server update via updateProjectName), keyboard handling, and minor header layout changes.
- Site panel: Add visual tree/branch lines, replace some icons, reorganize levels list and provide an Add level button, adjust spacing and layout for property/levels sections.
- InlineRenameInput: Small height/spacing adjustments for inline inputs.
- use-editor: Reset mode to 'select' when switching phases, ensure reasonable default tools when entering build mode, simplify setStructureLayer to reset mode/tool and viewer selection.
- use-viewer: Improve selection hierarchy guard so children are only reset when not explicitly provided in updates.

These changes improve UX consistency, state predictability when switching modes, and add inline project renaming with optimistic update.

* Introduce isEditor mode and editor UX updates

Add an isEditor flag (Viewer prop + store) and wire it from the Editor to enable editor-specific behaviors. Ceiling system: show ceiling grids per-level (or when ceiling tool active) by walking node ancestry and respecting active level/selection. Zone renderer: only show site edge labels in editor and add inline editable zone names (with hover/edit UI and save/escape handling). Auto-name new walls/doors/windows (incremental counts scoped by level) and simplify default names shown in various panels/tree nodes. Sidebar/site-panel: reverse level rendering, adjust tree-line styling, auto-expand parents when descendants are selected, and refactor zone row actions (camera view/capture/clear). UI polish: updated action-menu button styles and ensure keyboard shortcut 'b' switches to build mode. Misc: various tree node and item selection/hover improvements and minor refactors to support the above.

* Fix sidebar flex layout and scrolling

Adjust sidebar panel flexbox classes to ensure headers/controls don't collapse and content areas scroll correctly. Changes include adding shrink-0, flex-1 and min-h-0 to BuildingItem and buildings list containers, restructuring the active building panel so LevelsSection/LayerToggle are fixed height while ContentSection gets an overflow-y-auto scroll area, and making the site header non-shrinking with conditional overflow for the main panel when phase === "site". Uses the cn helper for conditional classes.

* Fix TypeScript build errors with AnyNodeId indexing and type narrowing

Cast string-typed node IDs and parentIds to AnyNodeId when indexing
into the nodes Record, fix motion transition type literal, and remove
redundant mode check in setMode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 01:05:34 -05:00
wass08
27e4afb757 draft custom door 2026-02-25 13:28:42 +09:00
wass08
96865a8ce7 window move tool + duplicate 2026-02-20 17:24:52 +09:00
wass08
dd5f63df64 wall tool draft 2026-02-17 16:22:45 +09:00
wass08
13070a5630 ceiling holes 2026-02-16 08:59:28 +09:00
wass08
83cd28b01b clear selection when switching to build mode 2026-02-12 10:50:02 +09:00
wass08
29e7fa09ef slab holes 2026-02-12 10:41:37 +09:00
wass08
40e3ce8d84 site boundary editor 2026-02-05 15:07:49 +09:00
wass08
a15952055a wall sides feed with floo fill algorithm 2026-02-03 12:03:03 +09:00
Aymeric Rabot
6c99851006 Refactor asset types and improve UI primitives
Replaces usage of the Asset type with AssetInput across editor components and hooks for consistency with core types. Adds default dimensions fallback for asset placement logic. Refactors UI primitives (button, sidebar, opacity control) to support forwarding refs and asChild prop, and updates imports for primitives. Updates Radix UI dependencies in package.json and bun.lock.
2026-01-30 22:01:25 -05:00
wass08
9501971c80 fix drag zone issue 2026-01-29 13:25:16 +09:00
wass08
c94f661bf9 scans and ref image 2026-01-29 09:38:24 +09:00
wass08
82a18de88c move + item corrections 2026-01-28 10:54:12 +09:00
wass08
1861173428 nice state switch 2026-01-26 08:24:10 +09:00
wass08
3b66e1c214 auto-selection of level / building 2026-01-26 08:08:44 +09:00
wass08
b86537066f revamp sidebar 2026-01-26 08:03:14 +09:00
wass08
5de0818633 biome 2026-01-21 10:03:29 +09:00
wass08
a338bea4e7 rewrite selection system 2026-01-21 08:00:31 +09:00
wass08
980dd4c3dc level items 2026-01-20 08:39:14 +09:00
wass08
8bf933ed36 draft spatial grid 2026-01-18 10:54:02 +09:00
wass08
162c70552c item catalog draft 2026-01-17 15:40:04 +09:00
wass08
59be752eb4 drafting tools 2026-01-17 08:58:17 +09:00
wass08
536c2e94cc draft wall builder 2026-01-16 13:58:01 +09:00
wass08
d657f4125f bringing back ui components 2026-01-16 10:49:22 +09:00