-
Notifications
You must be signed in to change notification settings - Fork 375
chore(DataList): added RTL modifier class to icon in demo #9605
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
Conversation
|
Preview: https://patternfly-react-pr-9605.surge.sh A11y report: https://patternfly-react-pr-9605-a11y.surge.sh |
| aria-label={this.state.allExpanded ? 'Collapse all rows' : 'Expand all rows'} | ||
| > | ||
| <ToolbarExpandIconWrapper> | ||
| <ToolbarExpandIconWrapper className="pf-v5-m-mirror-inline-rtl"> |
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.
You could be able to update this to use the prop now that your other PR went in
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.
That would just require using our Icon component here as well. Since this is a demo may not be a big deal so I can do that if that sounds good to you
49fbaad to
abdec44
Compare
|
@tlabaj @mcoker Latest update show the Icon component wrapped around the ToolbarExpandIconWrapper, as doing it the other way (Icon inside of ToolbarExpandIconWrapper) resulted in the caret pointing up instead of down in the expanded state: I imagine because Icon itself doesn't have any styling dealing with the rotation of an icon, whereas |
| <Icon shouldMirrorRTL> | ||
| <ToolbarExpandIconWrapper> | ||
| <AngleRightIcon /> | ||
| </ToolbarExpandIconWrapper> | ||
| </Icon> |
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 looks like this is something we missed in core. I put up a PR to fix it here - patternfly/patternfly#5937
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.
Ah yeah I was considering putting a core PR up as well, but since we're not hardcoding the icon i ended up going with the example update instead. If we'd want to go the CSS route we may want to consider hardcoding this icon rather than allowing a consumer to pass any icon they want.
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.
Ah! I wasn't keeping in mind that the icon is passed explicitly. I think we should definitely provide the icon the same way we do with the data-list and table, which is the primary use case for this toggle in the toolbar
| <AngleRightIcon /> |
patternfly-react/packages/react-table/src/components/Table/utils/decorators/treeRow.tsx
Line 58 in dae070a
| <AngleDownIcon aria-hidden="true" /> |
Though I'm assuming that's a breaking change? If so I'll back the change out in core, use the icon component like you have here, and we can create a breaking change issue to update that later?
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.
@tlabaj wdyt? Would make sense to use the same icon used most other places for expansion here.
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.
Yes, rendering the icon internally would be breaking since they can technically pass in whatever icon they want right now.
tlabaj
left a comment
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.
LGTM

What: Closes #9591
Additional issues: