feat(Button): add text wrapper, update icon usage by kmcfaul · Pull Request #10663 · patternfly/patternfly-react

Conversation

@kmcfaul

What: Closes #10626

  • Updates Button such that all children will be wrapped by pf-v6-c-button__text, and whenever an icon is passed in that icon will be wrapped by pf-v6-c-button__icon (was previously for non-plain buttons, now applies to all button icons).
  • Updates usages of our Buttons to passing the icon prop instead of an icon child.
  • Updates DualListSelectorControl to have an icon prop that is passed through to the internal Button.
  • Updates snapshots.

This PR will be failing until #10661 is merged due to the core bump.

@patternfly-build

@kmcfaul kmcfaul linked an issue

Jun 27, 2024

that may be closed by this pull request

nicolethoen

Choose a reason for hiding this comment

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

Can't wait to see the codemod for plain buttons to pass their children to icon prop

thatblindgeye

Choose a reason for hiding this comment

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

tlabaj

@mcoker

FYI ran visual regression tests before/after this update and there were no differences other than demos that dynamically generate content on page render

Link to the backstop report - backstop-react-7.2.24.pdf

mcoker

Choose a reason for hiding this comment

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

LGTM!!!

@patternfly-build

Your changes have been released in:

  • @patternfly/react-charts@8.0.0-alpha.29
  • @patternfly/react-code-editor@6.0.0-alpha.76
  • @patternfly/react-core@6.0.0-alpha.76
  • @patternfly/react-docs@7.0.0-alpha.82
  • @patternfly/react-drag-drop@6.0.0-alpha.58
  • @patternfly/react-icons@6.0.0-alpha.28
  • @patternfly/react-integration@6.0.0-alpha.38
  • demo-app-ts@5.1.1-alpha.75
  • @patternfly/react-styles@6.0.0-alpha.27
  • @patternfly/react-table@6.0.0-alpha.77
  • @patternfly/react-templates@6.0.0-alpha.26
  • @patternfly/react-tokens@6.0.0-alpha.27

Thanks for your contribution! 🎉

Reviewers

@nicolethoen nicolethoen nicolethoen approved these changes

@mcoker mcoker mcoker approved these changes

@tlabaj tlabaj tlabaj approved these changes

@thatblindgeye thatblindgeye thatblindgeye approved these changes

@mattnolting mattnolting Awaiting requested review from mattnolting

@wise-king-sullyman wise-king-sullyman Awaiting requested review from wise-king-sullyman wise-king-sullyman was automatically assigned from patternfly/react-reviewers