Skip to content

Conversation

@sg00dwin
Copy link
Contributor

@sg00dwin sg00dwin commented May 15, 2025

address #7348

Moves toolbar action links to be inline with the filtered items.

Requires follow on changes to add pf-m-toolbar-filtered-items here. https://github.com/patternfly/patternfly-react/blob/main/packages/react-core/src/components/Toolbar/ToolbarLabelGroupContent.tsx#L76

https://patternfly-pr-7532.surge.sh/components/toolbar/html-demos#toolbar-attribute-value-checkbox-menu-toggle-filter-on-desktop

note: in the above html-demo there is wider spacing between the filter label groups and the action links, which is intended, because of this change to maintain long label groups presented inline and wrap when needed. The links will be spaced closer if there is only a single label group.
Screenshot 2025-05-16 at 9 38 00 AM

@patternfly-build
Copy link
Collaborator

patternfly-build commented May 15, 2025

display: flex;
align-items: baseline;

> :first-child {
Copy link
Member

Choose a reason for hiding this comment

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

I'm wondering if we'd ever expect more than one toolbar group? Then they wouldn't get spaced correctly.
image

Also, can you add this new class to the documentation section?

Copy link
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

I think you called this out in the PR description, but this is what it looks like for me by default

Screenshot 2025-05-29 at 5 08 08 PM

Looks like that, and @srambach's comment are because .pf-m-toolbar-filtered-items doesn't wrap. The PF5 filter group wrapped - https://v5-archive.patternfly.org/components/toolbar/react/with-filters/

Here's what it looks like if it's set to wrap

May-29-2025.17-10-03.mp4

The only thing is if there are 2+ rows of filters, the clear all buttons wrap below all of them on their own line, but it was like that in PF5, too

Here's this PR with multiple rows and it set to wrap
foo

And PF5
Screenshot 2025-05-29 at 5 11 54 PM

Any reason we wouldn't add flex-wrap: wrap to .pf-m-toolbar-filtered-items?

Also we'll need to validate with a react dev that they can add .pf-m-toolbar-filtered-items to that <ToolbarContent>. At first glance, looks like we generate it internally for the filter groups, so I'm guessing it's possible, but we'll need to verify. cc @kmcfaul - can you verify if we're able to add a class to this .pf-v6-c-toolbar__content element that wraps filter labels?

Screenshot 2025-05-29 at 5 17 28 PM

@github-actions
Copy link

github-actions bot commented Aug 1, 2025

This PR has been automatically marked as stale because it has not had activity in the last 60 days.

@github-actions github-actions bot added the Stale label Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants