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
{{ message }}
Repository navigation
[codex suggestion] Make ruler corner placements axis-specific #209
Depends on #192 landing, because this suggestion builds on the zero-corner/orientation placement work from that feature.
Background
The current RulerCornerPlacement stores both axes as RulerSide:
xSide: RulerSide
ySide: RulerSide
That works at runtime because ZeroCornerGeometry only creates valid combinations, but the type can still represent invalid states such as xSide == .top or ySide == .left. Because of that, callers like UnitLabelView.labelFrame(...) still need defensive fallback/assertion cases even after their valid corner cases are covered.
Suggestion
After #192 lands, consider making the placement axes explicit, for example:
Then impossible states become unrepresentable: xSide could only be left/right, and ySide could only be top/bottom.
Expected Benefit
This should simplify consumers such as UnitLabelView and ResizeHandleView, make placement switches genuinely exhaustive, and remove some fallback assertion branches that only exist because invalid side combinations are currently type-representable.
Activity