Feat/controls ux enhancement - #7
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.