Conversation
Replace the Zoom Level select with six always-visible buttons. Keyboard stays local to the row: every level is a Tab stop, Enter/Space activate, and arrows step from the focused button with both ends clamped. Rapid clicks share a small zoom-pane write chain so 3 → 4 → 5 lands in order. Each request has a generation, so late settlement, a region switch, or a failed save can still retry. Fixes getopenscreen#670.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe zoom depth dropdown is replaced with six buttons. Zoom updates now use serialized document writes. The control adds keyboard navigation, request ordering, failure handling, and focus behavior. Tests cover component interactions, undo history, concurrent writes, and end-to-end behavior. ChangesZoom level feature
Priority: ⬇️ Low Estimated code review effort: 4 (Complex) | ~45 minutes Change: Feature · Severity of issue fixed: Low Sequence Diagram(s)sequenceDiagram
participant Editor
participant ZoomLevelControl
participant useTimeline
participant saveDocument
Editor->>ZoomLevelControl: click or press zoom level
ZoomLevelControl->>useTimeline: request zoom depth
useTimeline->>saveDocument: queue and save patched document
saveDocument-->>useTimeline: return save result
useTimeline-->>ZoomLevelControl: resolve request
ZoomLevelControl-->>Editor: update pressed state and focus
Merge Risk: ⚪ Minimal · up to The zoom controls and serialized persistence changes are mergeable with normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Replace the Zoom Level select in the floating zoom inspector with six always-visible level buttons. The six ZOOM_DEPTH_SCALES values stay on one row, the current level is aria-pressed, and the row is a labelled role="group".
Every button is a Tab stop. Click picks a level in one step. Enter and Space activate the focused button. Arrow keys step from the focused button and clamp at both ends. Those keys stay inside the control so the editor shell's seek/play shortcuts do not also handle them. Re-selecting the already requested level is a no-op.
Rapid clicks need ordered zoom-pane writes. Each level change is a whole-document save, so two saves built from the same render can land out of order. The zoom pane's one-field setters (level, 3D tilt, focus mode, hide cursor) share a small chain in useTimeline that reads the committed document inside the queued task. updateZoomDepth returns whether the save took effect, so a failed level can be retried. The control tracks each request by generation, so a late superseded settlement, a region switch, or an external undo cannot leave a stale requested level.
No zoom math, schema, renderer semantics, or unrelated timeline writers change.
Related issue
Fixes #670
Type of change
Release impact
Desktop impact
Renderer/timeline-store change only.
Screenshots / video
Before:
After:
Six always-visible buttons on one row, current level pressed. Layout is covered by the v4-shell e2e case at the editor's 300px inspector width (one row, labels not clipped).
Testing
Known limits
Only the zoom pane's one-field setters share the new chain. Other whole-document writers keep their existing behavior. Broader document serialization is out of this PR's scope.
Summary by CodeRabbit
New Features
Bug Fixes