Repository navigation
fix(a2ui-renderer,vue): keep full-width components inside their container - #8567
justin-john wants to merge 1 commit into
Conversation
…iner A basic catalog component that fills its container was styled `width: 100%` and also given an 8px margin on each side, so it was wider than the container by twice the margin. In a Column or a List its right edge ran 8px past the container and was clipped: a TextField lost its right border. The width now leaves room for the margin (`LEAF_FULL_WIDTH`), in the React and Vue basic catalogs alike: Image, Video, AudioPlayer, Card, Tabs, Divider, TextField, ChoicePicker, Slider and DateTimeInput. Fixes CopilotKit#8565
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
What does this PR do?
Fixes basic catalog components that run 8px past their container.
A component that fills its container was styled
width: 100%and also given an 8px margin on each side, so it was 16px wider than the container. In a Column or a vertical List its right edge ran 8px past the container and was clipped by the surface. Inside a Card it ran into the Card's right padding.This adds
LEAF_FULL_WIDTH(calc(100% - 2 * LEAF_MARGIN)) and uses it for the ten components that had both the margin andwidth: 100%: Image, Video, AudioPlayer, Card, Tabs, Divider, TextField, ChoicePicker, Slider and DateTimeInput. The React and Vue basic catalogs get the same change.The issue reports the TextField only. The other nine have the same cause, so they are fixed together.
How it was checked
Visible changes
Not changed here: two Videos or two DateTimeInputs side by side in a narrow Row still overflow, because of the elements' own minimum widths.
Related PRs and Issues
width: 100%plusmargin: 8px) #8565Checklist
!(for examplefeat(react-core)!: ...) and the description has aBREAKING CHANGE:line with migration steps. See VERSIONING.md (not applicable: not a breaking change)Summary by CodeRabbit