Skip to content
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

ui V2: fix accordion overflow #863

Merged
merged 2 commits into from
Jan 7, 2021
Merged

Conversation

scarlettperry
Copy link
Contributor

@scarlettperry scarlettperry commented Jan 7, 2021

Description

Fixes issue when accordion overflows its parent container, which happens when there are long strings of text that do not have an acceptable break (ie space, hyphen).

before
Screen Shot 2021-01-07 at 4 58 06 PM

Screen Shot 2021-01-07 at 4 58 30 PM

now
Screen Shot 2021-01-07 at 4 59 08 PM

Testing Performed

Locally and checked stories to make sure it didn't break other functionality/designs

@scarlettperry scarlettperry marked this pull request as ready for review January 7, 2021 22:06
@scarlettperry scarlettperry requested a review from a team as a code owner January 7, 2021 22:06
@@ -17,6 +17,8 @@ const StyledAccordion = styled(MuiAccordion)({
boxShadow: "none",
border: "1px solid transparent",
boxSizing: "content-box",
maxWidth: "100%",
overflowWrap: "anywhere",
Copy link
Contributor Author

@scarlettperry scarlettperry Jan 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breaks the string at an arbitrary point or where there is a natural break. otherwise, the cells in the row won't share the space evenly in scenario like the one below

Screen Shot 2021-01-07 at 5 13 42 PM

@scarlettperry
Copy link
Contributor Author

scarlettperry commented Jan 7, 2021

@danielhochman it's ready for another review

Copy link
Collaborator

@danielhochman danielhochman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great!

@scarlettperry scarlettperry merged commit 981d359 into UIV2 Jan 7, 2021
@scarlettperry scarlettperry deleted the sperry-accordion-overflow branch January 7, 2021 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants