27 Commits

Author SHA1 Message Date
Aymeric Rabot
48d5091bb3
UX polish: selection behavior, styling, and site panel improvements (#119)
* Remove .env.local guard; add portless dep

Remove the check that blocked a local .env.local in apps/editor's dev script and simplify the dev startup to source the root .env. Add portless@^0.4.2 to the project dependencies in package.json. Lockfile updated accordingly.

* Improve tool cursors, previews, and contextual tools

Revamp editor tool visuals and behaviour: replace mesh cursors with a new CursorSphere Group (adds ground marker, vertical indicator and optional tool icon tooltip), unify preview colors to #818cf8, add ground-level previews and ghost lines for ceiling and roof tools, and update slab/zone/wall visuals to match. Add automatic build-mode switching and contextual highlighting for structure tools via a new useContextualTools hook, and relax action-menu visibility checks so tool rows are shown even when not in build mode. Minor typing/import adjustments and small opacity/placement tweaks across multiple tool components.

* Keep tools active and refine action-menu styles

Stop auto-deactivating tools in RoofTool and ZoneTool by removing setTool(null) (and setMode('select') in roof). Add hasActiveTool checks and small layout padding to FurnishTools and StructureTools, and update button classes to improve visual emphasis: smoother transitions, stronger active rings/scale, and dimming/grayscale of non-active tools when another tool is active. These changes improve UX by keeping the selected tool active and giving clearer visual feedback in the action menu.

* Improve selection behavior and refresh UI styling

SelectionManager: add global enter/leave/double-click handlers to support cross-phase hovering and auto-switching into structure/furnish on double-click; normalize click handling (explicitly coalesce shiftKey). Remove per-strategy enter/leave listeners.

UI panels & controls: unify and modernize styles across many panels (ceiling, door, item, reference, roof, slab, wall, window) and action buttons — rounded-md, neutral borders, subtle shadows, translucent headers and consistent hover/focus states. Update view toggles icons and toggle styling.

NumberInput: integrate @number-flow/react NumberFlow for formatted value display, add visual drag progress indicator and refine input/label interactions and styling.

Sidebar: replace rename-popover with inline-rename-input and update tree nodes to use inline editing. Add slider-demo and tweak slider implementation. Update package.json accordingly.

* Use Barlow font across editor UI

Add the Google Barlow font and expose it as a CSS variable, update theme font variables in globals.css, and apply the new font across the editor UI. Imports: add Barlow in app/layout.tsx and include its variable on <html>, set body to use font-sans. Apply font-barlow or font-mono classes to headings, labels, numeric readouts and buttons across multiple panels and primitives to standardize typography. Also update button base variant to include font-barlow. Remove the PhaseSwitcher component and its import/usage from the action menu.

* Replace button wrapper with div in LevelItem

Replace the outer <button> around the LevelItem content with a <div> to avoid nesting interactive button elements (and the resulting invalid HTML/interaction issues). Preserves the original classes and onClick/onDoubleClick handlers so behavior remains the same and allows the PopoverTrigger/button children to function correctly.

* Refine site panel list styles and spacing

Update the SitePanel and TreeNode UI to use compact, border-bottom list rows instead of rounded, card-like items. Simplified active/hover states to use bg-accent variants and reduced shadow/ring styles for a cleaner look. Adjusted paddings (pl/px/py) and container layouts (many sections switched to flex-col) and increased tree node indent/paddingRight for consistent alignment. These changes unify spacing and visual hierarchy across levels, buildings, zones and tree nodes.

* Add auto-scroll to selected items and refine icon styles

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 18:05:02 -05:00
wass08
d3ef5fc08a door panel 2026-02-25 16:10:21 +09:00
wass08
ced76b0475 fix placement 2026-02-25 15:21:19 +09:00
wass08
b114e60df7 fix hinge + materials 2026-02-25 14:50:17 +09:00
wass08
7608cad748 nice progress on doors 2026-02-25 14:05:32 +09:00
wass08
27e4afb757 draft custom door 2026-02-25 13:28:42 +09:00
wass08
d15f601107 item scale 2026-02-23 10:59:42 +09:00
wass08
33c81045bb duplicate item 2026-02-20 18:06:59 +09:00
wass08
96865a8ce7 window move tool + duplicate 2026-02-20 17:24:52 +09:00
wass08
47373eadef adjusting wall system + adding panel 2026-02-18 13:35:12 +09:00
wass08
be013d26e5 window panel 2026-02-18 13:14:55 +09:00
wass08
076faae7df window building 2026-02-18 10:41:12 +09:00
wass08
13070a5630 ceiling holes 2026-02-16 08:59:28 +09:00
wass08
0797a828f8 fix build issues 2026-02-12 10:56:56 +09:00
wass08
cfa7b8bfc1 handle holes in spatial grid manager 2026-02-12 10:46:07 +09:00
wass08
29e7fa09ef slab holes 2026-02-12 10:41:37 +09:00
wass08
ae3af4318e better placing tools 2026-02-12 10:17:22 +09:00
wass08
be7e86975e radio & sfx 2026-02-12 08:57:37 +09:00
wass08
b4375792ab fix extra rebuild 2026-02-10 14:07:56 +09:00
wass08
8ded112da3 fix item panel 2026-02-10 13:28:47 +09:00
wass08
daf41f7da5 figma like tools 2026-02-10 10:45:42 +09:00
wass08
310a4ae335 fix build 2026-02-02 14:52:45 +09:00
wass08
72a0e3952a slab panel 2026-02-02 11:17:47 +09:00
wass08
07dee4aefc rename items 2026-01-29 15:37:51 +09:00
wass08
f1a61350c7 roof 2026-01-29 12:52:35 +09:00
wass08
406a4f51b5 fix issue elipsis 2026-01-29 09:55:25 +09:00
wass08
c94f661bf9 scans and ref image 2026-01-29 09:38:24 +09:00