Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions packages/react-core/src/demos/DataListDemo.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ import {
ToolbarExpandIconWrapper,
ToolbarContent,
SearchInput,
Tooltip
Tooltip,
Icon
} from '@patternfly/react-core';
import CodeBranchIcon from '@patternfly/react-icons/dist/esm/icons/code-branch-icon';
import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-icon';
Expand Down Expand Up @@ -123,9 +124,11 @@ class ExpandableDataList extends React.Component {
variant="plain"
aria-label={this.state.allExpanded ? 'Collapse all rows' : 'Expand all rows'}
>
<ToolbarExpandIconWrapper>
<AngleRightIcon />
</ToolbarExpandIconWrapper>
<Icon shouldMirrorRTL>
<ToolbarExpandIconWrapper>
<AngleRightIcon />
</ToolbarExpandIconWrapper>
</Icon>
Comment on lines +127 to +131
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.

</Button>
</Tooltip>
</ToolbarItem>
Expand Down