feat: add imperial unit support for measurements in UI controls and t…#310
Open
PRAVEEN7230 wants to merge 2 commits into
Open
feat: add imperial unit support for measurements in UI controls and t…#310PRAVEEN7230 wants to merge 2 commits into
PRAVEEN7230 wants to merge 2 commits into
Conversation
…ools, and remove unused env example file
…tool and measurement utilities
boboidvtw
pushed a commit
to boboidvtw/editor
that referenced
this pull request
May 17, 2026
…ss (pascalorg#284) Backport from monorepo PR pascalorg#310 (fix/april-pass): 1. WebGPU renderer race on Canvas remount Cache the in-flight WebGPURenderer promise per canvas element so concurrent configure() calls from R3F's useLayoutEffect await the same init() instead of creating duplicate renderers. Fixes intermittent 'resolve target size does not match' errors when navigating between projects and home. 2. Duplicate item loses its scale Add scale to the field set in useDraftNode.commit() so duplicated items preserve their original scale instead of falling back to [1,1,1]. Co-authored-by: Pascal <open@pascal.app>
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.
What does this PR do?
This PR fixes the bug where toggling the unit only affected the display of dimensions and not the input itself, specifically in the object editing panels. It also adds keyboard-based dimensional input to the Wall tool during drafting.
Fixes #308
Specific changes:
measurements.tsutility to handle parsing and formatting between metric and imperial values (e.g., converting10'6"to meters).SliderControl: UpdatedSliderControl(used in the Properties panels) to fetch the active unit state. It now properly formats values and parses imperial strings so that dimensions update correctly instead of silently reverting to metric.WallTool. While drawing a wall, users can now type dimensions (e.g.,10') and pressEnterto snap the wall length in the current pointer direction exactly.How to test
15'2". Ensure the wall length updates accurately.10'(a text input overlay should appear near your cursor). PressEnterand verify the wall is created at exactly10'length in the direction of the cursor.Escapeto ensure it clears the text input without prematurely canceling the wall drawing itself.Screenshots / screen recording
Checklist
bun devbun checkto verify)mainbranch