-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add disabled groups #1764
Add disabled groups #1764
Conversation
86d5390
to
208ddad
Compare
size-limit report 📦
|
208ddad
to
60a9356
Compare
<g> | ||
<rect | ||
x={x + BACKGROUND_GAP / 2} | ||
y={y + BACKGROUND_GAP / 2} | ||
width={adjustedWidth} | ||
height={adjustedHeight} | ||
fill={fill} | ||
rx="4" | ||
ry="4" | ||
opacity={opacity} | ||
/> | ||
{isDisabled && ( | ||
<rect | ||
x={x + BACKGROUND_GAP / 2 + 1} | ||
y={y + BACKGROUND_GAP / 2 + 1} | ||
width={adjustedWidth - 2} | ||
height={adjustedHeight - 2} | ||
fill="none" | ||
stroke="#E3E3E3" | ||
strokeWidth="1" | ||
strokeDasharray="4 4" | ||
rx="3" | ||
ry="3" | ||
/> | ||
)} | ||
</g> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of curiosity, is needed to return both <rect />
even when isDisabled
is true
, or can we just return the disabled style <rect />
only when this is true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good question! so the inner <rect
simulates an inner dashed border for the disabled groups. I tried to add the strokeDashArray on the parent rect, but the dashed border doesn't appear inside, instead appears outside, and in the designs the dashed borders are inside the rectangle.
It basically simulates a container for an inner border when the group is disabled.
60a9356
to
4ead2cd
Compare
4ead2cd
to
beccc58
Compare
What does this implement/fix?
This PR adds support for showing groups that are disabled (filtered out) in the RFM grid with a greyed out background and a dashed border.
Storybook link
https://dhvi79nyj9utsllw.tunnel.shopifycloud.tech/?path=/story/polaris-viz-charts-grid-playground--missing-groups
Before merging
Check your changes on a variety of browsers and devices.
Update the Changelog's Unreleased section with your changes.
Update relevant documentation, tests, and Storybook.
Make sure you're exporting any new shared Components, Types and Utilities from the top level index file of the package