-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
fix: flush state for accordion component #15993
fix: flush state for accordion component #15993
Conversation
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Hi @riddhybansal great work! 💯 This is the intended specs for the Hover state of Flush Accordion The deploy preview link has the horizontal divider stand out in hover state, is there a way to blend it the way it works for the regular accordion? |
@alina-jacob it seems like the divider is still there on hover when not Should this be removed in the normal, non @riddhybansal it seems like we need to add a |
yes ✅ @tw15egan, @riddhybansal here's a Figma ref file that @laurenmrice has created and here's Accordion's style documentation from the Carbon website indicating the same. |
d8e9b61
to
0600a39
Compare
@alina-jacob the issue regarding the hover states are fixed and the issue of divider for both the flush and non flush states are addressed in the same PR |
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.
Removing the border on hover is causing a layout shift. You may have to update the color of the border to match the background?
Screen.Recording.2024-03-26.at.8.24.59.AM.mov
Taking a closer look I'm still seeing a weird flash/flickr on hover, however I want to confirm with design that the way its hanging outside of the content area is correct. Or should the text align between the two variants with the divider lines moved in, vs. the hover/focus area pushed out. @alina-jacob or @carbon-design-system/design can you weigh in here. This is a screen shot with the padding we add for all our storybook stories removed. You can see that the isFlush variant hangs outside the normal content area. Compared with how we handle something similar with ContainedList |
Hi @alisonjoseph,
|
My opinion is that we wouldn't want any focus/hover to hang outside of the content area. @tw15egan @laurenmrice thoughts? If we got rid of the hang it would either look like this, which is odd. Or it would have to push in, which might not be the intended alignment? Or maybe its totally fine to have the focus/hover outside the content area. |
@laurenmrice thank you so much for the example! That clears things up for me. @riddhybansal If you see the in-context example above from Lauren you'll see how it should display in a container. So you'll want to adjust the styles so that the appearance of the border shifts inward by 1rem on either side instead of the entire accordion shifting outward by 1rem. Currently the border is set on |
@riddhybansal whats the status on this one? Let me know if you need to pair up. |
@riddhybansal I pushed some updates to this PR, we can talk through in a webex if needed. I added a test story so we can view the flush variant side by side, I also updated/fixed skeleton states. (will need to remove test story before merging) |
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.
Oh wow lots of comments in this PR but it looks like everything has been addressed. Final demo is working as expected.
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
19f1400
Hey there! v11.58.0 was just released that references this issue/PR. |
Closes #15849
Accordion with flush alignment does not meet design spec
Changed
Testing / Reviewing
Go to Playground for accordion component, enable flush property, border should come in shorter to match flush spec