Skip to content

Conversation

@thatblindgeye
Copy link
Contributor

What: Closes #9591

Additional issues:

@patternfly-build
Copy link
Contributor

patternfly-build commented Sep 12, 2023

aria-label={this.state.allExpanded ? 'Collapse all rows' : 'Expand all rows'}
>
<ToolbarExpandIconWrapper>
<ToolbarExpandIconWrapper className="pf-v5-m-mirror-inline-rtl">
Copy link
Contributor

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

Copy link
Contributor Author

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

@thatblindgeye
Copy link
Contributor Author

@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:

image

I imagine because Icon itself doesn't have any styling dealing with the rotation of an icon, whereas pf-v5-c-toolbar__expand-all-icon does

Comment on lines +127 to +131
<Icon shouldMirrorRTL>
<ToolbarExpandIconWrapper>
<AngleRightIcon />
</ToolbarExpandIconWrapper>
</Icon>
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor

@tlabaj tlabaj left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Data list - update icon in demo to use RTL modifier class

5 participants