Skip to content

Handle jog panel and canvas fit buttons positioning for right rulers - #109

Merged
MarkJB merged 3 commits into
mainfrom
chore/ensure-canvas-fit-controls-and-jog-panel-account-for-right-edge-rulers
Aug 15, 2026
Merged

Handle jog panel and canvas fit buttons positioning for right rulers#109
MarkJB merged 3 commits into
mainfrom
chore/ensure-canvas-fit-controls-and-jog-panel-account-for-right-edge-rulers

Conversation

@MarkJB

@MarkJB MarkJB commented Aug 10, 2026

Copy link
Copy Markdown
Member

This pull request improves the layout responsiveness of the jog panel and canvas controls by dynamically adjusting their right-side insets based on the active machine profile's origin and the visibility of the properties panel. This ensures that UI elements do not overlap with the ruler or reserved UI space when the machine origin changes or when the properties panel is toggled.

Dynamic UI layout adjustments:

  • The jog panel's right inset is now calculated dynamically, accounting for the properties panel width and whether the machine's origin places the ruler on the right side. This prevents overlap with the ruler and ensures correct positioning when the active machine profile changes (src/renderer/src/App.tsx). [1] [2] [3] [4]
  • The canvas controls (PlotCanvasControls) now accept a rightInsetPx prop, allowing their right offset to be adjusted based on the ruler's position, providing consistent spacing and avoiding UI collisions (src/renderer/src/components/PlotCanvas/PlotCanvas.tsx, src/renderer/src/components/PlotCanvas/components/PlotCanvasControls.tsx). [1] [2] [3]

Testing improvements:

  • Added a component test to verify that the jog panel's right inset updates correctly when switching between machine profiles with different origin settings, ensuring correct UI behavior (tests/component/App.test.tsx).

Supporting changes:

  • Imported RULER_W and OriginType where needed to support the new layout calculations (src/renderer/src/App.tsx, src/renderer/src/components/PlotCanvas/PlotCanvas.tsx). [1] [2]

@MarkJB
MarkJB merged commit 73c2ed1 into main Aug 15, 2026
4 checks passed
@MarkJB
MarkJB deleted the chore/ensure-canvas-fit-controls-and-jog-panel-account-for-right-edge-rulers branch August 15, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant