You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(app,components): Simplifications to CalibrationBlockRender (#18548)
## Overview
Some refactors and light fixes to simplify the `CalibrationBlockRender`
component. This component is used in OT-2 calibration flows to render a
top-down view of the calibration block.
Helps with EXEC-1573.
## Changelog
Notable changes:
* Move the component from `app` to `components/hardware-sim`. This lets
us make a Storybook story for it, and it lets us keep it next to the
spiritually similar `LabwareAdapter` component.
* Simplify the way we position the rotated "SHORT" and "TALL" labels.
Formerly, they were positioned in outer space, and then an SVG
`rotate()` transform swung them in a wide arc around the labware origin
to land in their final position. So you had to choose the outer-space
coordinates carefully, and you'd have to reason through things like x-
and y-coordinates being swapped. Now, we position the text where we want
it and rotate it in-place.
* Exactly vertically align the middle of the "SHORT" and "TALL" labels
to the middle of the labware.
The former code was positioning the labels by their edge and seemingly
trying to align them by hard-coded offsets, which was visibly off-center
once you noticed it.
0 commit comments