-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(cabinet): support exact sizing and run-aware editing #753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
wass08
merged 51 commits into
pascalorg:main
from
sudhir9297:t3code/enhance-kitchen-cabinets
Sep 2, 2026
Merged
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
3731eb3
Add roof surface placement support for items
sudhir9297 ed53bc2
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 fd8e02c
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 7c1e383
fixed conflict
sudhir9297 b3377da
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 f177a65
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 9af7491
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 fd27524
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 b516298
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 ebfc8ce
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 b7b313b
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 b2ad645
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 bffdb4a
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 ee7b10c
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 7d4b474
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 3a3318c
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 26df69f
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 5376e07
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 d2204aa
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 f2a5186
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 5841052
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 a6acaa3
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 e0fec5b
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 7fa9276
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 c3ff9d6
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 00d84d5
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 2c2dabc
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 29f914f
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 1cbf910
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 8f59da7
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 650abd6
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 1f8dc8b
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 7c4b791
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 ef7184f
Merge branch 'main' of github.com:sudhir9297/editor; branch 'main' of…
sudhir9297 c92a376
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 da49781
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 0f66e8f
Merge branch 'main' of github.com:sudhir9297/editor; branch 'main' of…
sudhir9297 0928a63
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 d9f8be9
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 f944cfe
Merge branch 'main' of github.com:pascalorg/editor
sudhir9297 32810ca
Enhance modular cabinet editing and validation
sudhir9297 178e790
Complete cabinet interaction enhancements
sudhir9297 e197ae0
Fix architecture review findings
sudhir9297 bcc93f4
fix cabinet wall opening awareness during moves
sudhir9297 dd59e74
feat cabinet exact dimension placement
sudhir9297 ccc319d
feat cabinet run width equalization
sudhir9297 fff2166
feat cabinet run array duplication
sudhir9297 9d7e9c7
feat add wall cabinet height presets
sudhir9297 3326bdb
chore remove swing check and hinge quick action
sudhir9297 1d2af0d
fix cabinet preview architecture findings
sudhir9297 48add69
fix(cabinet): preview linked L runs during width resize
sudhir9297 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
67 changes: 67 additions & 0 deletions
67
packages/editor/src/components/editor/handles/linear-resize-drag.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| import { | ||
| type AnyNode, | ||
| type AnyNodeId, | ||
| type HandleDragModifiers, | ||
| type LinearResizeHandle, | ||
| type SceneApi, | ||
| useLiveNodeOverrides, | ||
| useScene, | ||
| } from '@pascal-app/core' | ||
| import { replacePreviewOverrideIds } from './preview-overrides' | ||
|
|
||
| export function createLinearResizeDragBinding({ | ||
| descriptor, | ||
| initialNode, | ||
| nodeId, | ||
| sceneApi, | ||
| initialModifiers, | ||
| }: { | ||
| descriptor: LinearResizeHandle<AnyNode> | ||
| initialNode: AnyNode | ||
| nodeId: AnyNodeId | ||
| sceneApi: SceneApi | ||
| initialModifiers: HandleDragModifiers | ||
| }) { | ||
| const overrideId = descriptor.overrideTarget?.(initialNode, sceneApi) ?? nodeId | ||
| let lastModifiers = initialModifiers | ||
| let previewOverrideIds = new Set<AnyNodeId>() | ||
|
|
||
| return { | ||
| overrideId, | ||
| commit: descriptor.commit | ||
| ? (patch: Partial<AnyNode>) => | ||
| descriptor.commit?.(initialNode, patch, sceneApi, lastModifiers) | ||
| : undefined, | ||
| apply(next: number, modifiers: HandleDragModifiers): Partial<AnyNode> { | ||
| lastModifiers = modifiers | ||
| const patch = descriptor.apply(initialNode, next, sceneApi, modifiers) as Partial<AnyNode> | ||
| const previewEntries = descriptor.previewOverrides?.(initialNode, next, sceneApi, modifiers) | ||
| if (!previewEntries) return patch | ||
|
|
||
| previewOverrideIds = replacePreviewOverrideIds( | ||
| previewOverrideIds, | ||
| previewEntries, | ||
| (previewId) => { | ||
| useLiveNodeOverrides.getState().clear(previewId) | ||
| useScene.getState().markDirty(previewId) | ||
| }, | ||
| ) | ||
| useLiveNodeOverrides | ||
| .getState() | ||
| .setMany( | ||
| previewEntries.map(([id, previewPatch]) => [id, previewPatch as Record<string, unknown>]), | ||
| ) | ||
| for (const [previewId] of previewEntries) { | ||
| useScene.getState().markDirty(previewId) | ||
| } | ||
| return patch | ||
| }, | ||
| clearPreview(): void { | ||
| for (const previewId of previewOverrideIds) { | ||
| useLiveNodeOverrides.getState().clear(previewId) | ||
| useScene.getState().markDirty(previewId) | ||
| } | ||
| previewOverrideIds = new Set() | ||
| }, | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2D drop ignores late Alt
Medium Severity
forcePlaceis written only frompointermovealtKey, and the drop path reads that stale flag instead of the pointer-up event. Holding Alt to force a cabinet over an opening after the last move still rejects the drop, while releasing Alt after a forced preview can still commit the invalid pose.Reviewed by Cursor Bugbot for commit 1d2af0d. Configure here.