Skip to content

Feat/controls ux enhancement - #7

Merged
wass08 merged 6 commits into
mainfrom
feat/controls-ux-enhancement
Oct 27, 2025
Merged

Feat/controls ux enhancement#7
wass08 merged 6 commits into
mainfrom
feat/controls-ux-enhancement

Conversation

@wass08

@wass08 wass08 commented Oct 27, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

@vercel

vercel Bot commented Oct 27, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
editor Error Error Oct 27, 2025 9:13pm

@wass08
wass08 merged commit 2af1590 into main Oct 27, 2025
1 of 2 checks passed
@Aymericr
Aymericr deleted the feat/controls-ux-enhancement branch October 29, 2025 17:03
tahacagrimen pushed a commit to tahacagrimen/editor that referenced this pull request Aug 13, 2026
…alorg#7)

Named bookmarks that restore a camera pose, per-collection visibility and
lock, the active section plane, and the view/level/wall/theme presentation
state. SketchUp calls these "Scenes"; that word is the scene graph here, so
they are `SavedView`.

Scene-side state like `collections` and `materials` — persisted with the
document, not a node — which means it had to be carried across every
persistence boundary, the bug class CHANGELOG pascalorg#597 shipped twice:

  save        `use-auto-save` graph construction *and* its `beforeunload`
              flush, which builds a second graph a few lines down
  load        `applySceneGraphToEditor` + `setScene`'s extra bag
  clone/fork  `cloneSceneGraph` (see below) and `forkSceneGraph`
  live sync   `sceneGraphSignature`, whose comment already warned that an
              unsigned field makes a local edit read as an echo
  history     `SceneSnapshot` + `areSceneSnapshotsEqual`, so a view edit
              is undoable like a collection edit

Cloning is not a copy: a view points at a section-plane node and at
collections, both of which get renumbered, so `cloneSceneGraph` remaps both
and records "no cut" when the plane didn't survive a fork.

Core stores the viewer/editor half of a view as an opaque `presentation`
bag — view mode, level mode, wall mode and theme are rendering and editing
concepts core is not allowed to know about. `packages/editor/src/lib/
saved-views.ts` is the only place that gives the bag a shape, and it drops
values it doesn't recognise rather than restoring nonsense.

Restoring writes the scene inside one `runAsSingleSceneHistoryStep`: a view
that flips three collections and swaps the cut is one action to the user,
not four undos. An absent `sectionPlaneId` (a view saved before section
planes existed) leaves the current cut alone; an explicit `null` clears it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VhnKW1ZmnSjGdLZCx5kvY7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant