fix(#3541) - adjust modal so left side of Checkbox is not cut off#3666
fix(#3541) - adjust modal so left side of Checkbox is not cut off#3666
Conversation
a05b652 to
e0321f4
Compare
d8df608 to
83df705
Compare
| direction="vertical" | ||
| hpadding="var(--scrollable-padding)" | ||
| hpadding={version === "2" ? "var(--goa-space-2xs)" : "var(--scrollable-padding)"} | ||
| vpadding={version === "2" ? "0" : ""} |
There was a problem hiding this comment.
Does it make sense that the vpadding is either 0 or ""?
| <goa-scrollable | ||
| direction="vertical" | ||
| hpadding="var(--scrollable-padding)" | ||
| hpadding={version === "2" ? "var(--goa-space-2xs)" : "var(--scrollable-padding)"} |
There was a problem hiding this comment.
Is this override required? If things are version 2 then the --scrollable-padding should be overridden already.
| padding-left: var(--goa-space-s); | ||
| padding-right: var(--goa-space-s); |
There was a problem hiding this comment.
These padding values should just be moved into the padding above it.
There was a problem hiding this comment.
Instead of modifying the component itself, I suggest that we update the Modal design tokens.
When we move the left/right padding out of --goa-modal-content-padding...
"modal-content-padding": {
"value": "{space.l} 0 {space.xl} 0",
"type": "spacing",
"description": "Content section padding"
},
...and into --goa-modal-scrollable-padding-desktop...
"modal-scrollable-padding-desktop": {
"value": "{space.l}",
"type": "spacing",
"description": "Scrollable component horizontal padding for desktop"
},
...and do the same for the mobile versions...
"modal-content-padding-mobile": {
"value": "{space.l} 0 {space.xl} 0",
"type": "spacing",
"description": "Content section padding for mobile (24px top, 16px sides, 32px bottom)"
},
"modal-scrollable-padding-mobile": {
"value": "{space.m}",
"type": "spacing",
"description": "Scrollable component horizontal padding for mobile"
},
...then we can achieve the same result without altering the component itself.
| <goa-scrollable | ||
| direction="vertical" | ||
| hpadding="var(--scrollable-padding)" | ||
| hpadding={version === "2" ? "var(--goa-space-2xs)" : "var(--scrollable-padding)"} |
There was a problem hiding this comment.
We need to keep --scrollable-padding here. It's being used for responsive padding.
| direction="vertical" | ||
| hpadding="var(--scrollable-padding)" | ||
| hpadding={version === "2" ? "var(--goa-space-2xs)" : "var(--scrollable-padding)"} | ||
| vpadding={version === "2" ? "0" : ""} |
|
|
||
| .v2 .modal-content { | ||
| padding: var(--goa-modal-content-padding-mobile, var(--goa-space-l) var(--goa-space-m) var(--goa-space-xl) var(--goa-space-m)); | ||
| padding-left: var(--goa-space-s); |
There was a problem hiding this comment.
We should update the --goa-modal-content-padding-mobile design token's values instead of overriding it with a static value.
| box-shadow: none; | ||
| } | ||
|
|
||
| .v2 .modal-content { |
There was a problem hiding this comment.
We should update --goa-modal-content-padding instead.

Before (the change)
On focus, left side of the checkbox gets cut off by the modal container.

After (the change)
After adjusting the padding of the Modal and Scrollable container, the left side now displays on modal.

Steps needed to test