fix(ListView component): Remove display: flex from container - #151
Merged
Conversation
danseethaler
force-pushed
the
ListView-fix
branch
from
January 4, 2018 21:15
4371bf2 to
6af1945
Compare
Member
|
Ideally, the ListViewRow container ought not exist at all. The items it contains should be direct descendants of ListViewGroupItemHeader. |
jgiardino
reviewed
Jan 4, 2018
| description | ||
| }) => ( | ||
| <div style={{ display: 'flex', flex: 1 }}> | ||
| <div style={{ flex: 1 }}> |
Contributor
There was a problem hiding this comment.
Is it possible to remove this <div> altogether now that we have upgraded to React 16? I think the reason this solution works is because we have float fallbacks for browsers that don't support flex, so now removing display: 'flex' results in using those float fallbacks. But ultimately my preference would be to match the patternfly core html structure whenever possible.
Contributor
Author
There was a problem hiding this comment.
Agreed and updated 👍
The display: flex incorrectly spaces the children. This causes the actions to be pushed out of the container when the header text is lengthly. fix #148
danseethaler
force-pushed
the
ListView-fix
branch
from
January 4, 2018 22:00
6af1945 to
599f078
Compare
Contributor
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
display: flexincorrectly spaces the children. This causes the actions to be pushed out of thecontainer when the header text is lengthly.
fix #148
What: Removing inline style
display:flexfromListViewRowto fix spacing issue on children. We do need theflex: 1to grow the children and fill up the row space.Also added actions to the storybook to see the actions correctly contained.
Link to Storybook:
https://rawgit.com/danseethaler/patternfly-react/ListView-fix-storybook/index.html