Skip to content

feat(Toolbar): Add row wrap prop to ToolbarGroup and ToolbarItem#11559

Merged
thatblindgeye merged 5 commits into
patternfly:mainfrom
mfrances17:wrap-tbgroup
Mar 11, 2025
Merged

feat(Toolbar): Add row wrap prop to ToolbarGroup and ToolbarItem#11559
thatblindgeye merged 5 commits into
patternfly:mainfrom
mfrances17:wrap-tbgroup

Conversation

@mfrances17

Copy link
Copy Markdown
Contributor

What: Closes #11489

@mfrances17 mfrances17 requested review from a team, mcoker and thatblindgeye February 24, 2025 22:54
@mfrances17 mfrances17 self-assigned this Feb 24, 2025
@mfrances17 mfrances17 requested review from tlabaj and removed request for a team February 24, 2025 22:54
@patternfly-build

patternfly-build commented Feb 24, 2025

Copy link
Copy Markdown
Collaborator

@mcoker mcoker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a couple of things:

Comment thread packages/react-core/src/components/Toolbar/ToolbarGroup.tsx Outdated
Comment thread packages/react-core/src/components/Toolbar/ToolbarItem.tsx Outdated

@thatblindgeye thatblindgeye left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In addition to adding the prop to ToolbarContent (for the ContentSection class), could we add a simple example for that? Maybe we could update the section from "Examples with toolbar spacers" to "Examples with spacers and wrapping", then add a "Toolbar content wrapping" example to show the nowrap modifier in use (the example description could mention that by default the content section wraps).

Also can we add quick unit tests for these components for the new modifier as well

@mfrances17

Copy link
Copy Markdown
Contributor Author

thanks @mcoker & @thatblindgeye, i've added a wrap prop to ToolbarContent, added an example showing the behavior with nowrap, and changed the examples section as suggested. Added tests for ToolbarContent wrap as well, in addition to the tests I added on my previous commit for ToolbarGroup and ToolbarItem wrapping.

@mcoker mcoker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LPTM!! ✅

@tlabaj tlabaj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. Just one ask.

Comment thread packages/react-core/src/components/Toolbar/__tests__/ToolbarItem.test.tsx Outdated
@thatblindgeye thatblindgeye merged commit 6b1646f into patternfly:main Mar 11, 2025
@patternfly-build

Copy link
Copy Markdown
Collaborator

Your changes have been released in:

  • @patternfly/react-code-editor@6.2.0-prerelease.35
  • @patternfly/react-core@6.2.0-prerelease.33
  • @patternfly/react-docs@7.2.0-prerelease.52
  • @patternfly/react-drag-drop@6.2.0-prerelease.35
  • demo-app-ts@6.0.0-prerelease.84
  • @patternfly/react-table@6.2.0-prerelease.34
  • @patternfly/react-templates@6.2.0-prerelease.34

Thanks for your contribution! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Toolbar - add a wrap prop for ToolbarGroup and ToolbarItem gap

6 participants