fix(studio): surface gesture recording controls#1390
Merged
Conversation
2e43fa4 to
976e335
Compare
976e335 to
6f0c25c
Compare
2 tasks
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.
Problem
Fixes #1383. Gesture recording is a key Studio keyframe interaction, but the control was buried below the design-panel fold and the on-canvas selection had no visible record affordance. The
Rshortcut existed, but users had no clear canvas-level cue that the selected element could be recorded.What this fixes
Adds a selected-element record badge to the DOM edit overlay when keyframes are enabled, wired to the same gesture recording toggle as the existing panel action. The badge flips to a stop control while recording is active.
Hoists the right-panel gesture recording control above the property sections so it is visible immediately after selecting an element.
Keeps selected DOM bounds visible while gesture recording is active so the on-canvas stop affordance remains available, while existing movement editing remains disabled through
allowCanvasMovement={false}during recording.Root cause
Gesture recording was only discoverable from the lower Design panel action. During recording, Studio also hid selected DOM bounds through
useInspectorState, which would remove any selection-level controls even though movement handles were already disabled separately.Verification
Local checks
bun run --filter @hyperframes/studio test -- src/components/editor/DomEditOverlay.test.tsbunx oxlint packages/studio/src/hooks/useStudioContextValue.ts packages/studio/src/App.tsx packages/studio/src/components/editor/GestureRecordControl.tsx packages/studio/src/components/editor/DomEditOverlay.tsx packages/studio/src/components/editor/DomEditOverlay.test.ts packages/studio/src/components/editor/PropertyPanel.tsx packages/studio/src/components/StudioPreviewArea.tsxbunx oxfmt --check packages/studio/src/components/editor/GestureRecordControl.tsx packages/studio/src/components/editor/DomEditOverlay.tsx packages/studio/src/components/editor/DomEditOverlay.test.ts packages/studio/src/components/editor/PropertyPanel.tsx packages/studio/src/components/StudioPreviewArea.tsx packages/studio/src/App.tsxbun run --filter @hyperframes/studio typecheckBrowser verification
VITE_STUDIO_ENABLE_KEYFRAMES=1 bun run --filter @hyperframes/cli dev preview /tmp/hf-1383-studio-project --port 3103 --no-openagent-browserto load Studio, select the fixture element, verify the on-canvasRecord gesture (R)badge and hoisted panel button, pressR, and verify both controls switch to the stop state.artifacts/1383/studio-record-badge.pngartifacts/1383/studio-recording-active.pngartifacts/1383/gesture-record-discoverability.webmNotes
The fixture used for browser verification lives under
/tmp/hf-1383-studio-projectand is not part of this PR. The recurring LFS pointer noise inpackages/producer/tests/webm-transparency/output/output.webmwas left unstaged.