Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ProgressStepper): updating description prop to ReactNode #8017

Merged
merged 2 commits into from
Sep 21, 2022

Conversation

andyyvo
Copy link
Contributor

@andyyvo andyyvo commented Sep 20, 2022

What: Closes #7801 . Updated the description prop in ProgressStep.tsx to allow for the use of line breaks. This was demonstrated in the updated example of ProgressStepperWithBasicDescription.tsx in the second step.

Additional issues:

@andyyvo
Copy link
Contributor Author

andyyvo commented Sep 20, 2022

Please let me know if it is okay to leave all of the examples that use description as strings since it's now just a React.ReactNode (and if the example I edited is necessary)

@patternfly-build
Copy link
Contributor

patternfly-build commented Sep 20, 2022

Copy link
Contributor

@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

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

This looks good! I think it's fine to leave the other examples as-is with a string passed in and to update the example like you did. I only had one nitpick below. It could also be worth updating the "with alignment" example similarly, but not really a blocker on that.

EDIT: based on Titani's response below, other than her requested change it looks good!

@@ -15,7 +15,13 @@ export const ProgressStepperBasicWithDescription: React.FunctionComponent = () =
<ProgressStep
variant="info"
isCurrent
description="This is the second thing to happen"
description={
Copy link
Contributor

Choose a reason for hiding this comment

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

Three is no need to update the example. If you want to add a test to verify the change that is fine. I do not think that is necessary though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good! I'll revert the example back and add a test. Thanks @thatblindgeye and @tlabaj !!

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 it appears that there's no way to test <br /> through react testing according to testing-library/dom-testing-library#750

Copy link
Contributor

Choose a reason for hiding this comment

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

That is ok. It is not really a necessary test.

@tlabaj tlabaj merged commit 30b1112 into patternfly:main Sep 21, 2022
@patternfly-build
Copy link
Contributor

Your changes have been released in:

  • @patternfly/react-catalog-view-extension@4.92.5
  • @patternfly/react-code-editor@4.82.5
  • @patternfly/react-console@4.92.5
  • @patternfly/react-core@4.242.0
  • @patternfly/react-docs@5.102.5
  • @patternfly/react-inline-edit-extension@4.86.5
  • demo-app-ts@4.201.5
  • @patternfly/react-log-viewer@4.86.5
  • @patternfly/react-table@4.110.5
  • @patternfly/react-topology@4.88.5
  • @patternfly/react-virtualized-extension@4.88.5

Thanks for your contribution! 🎉

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.

[Progress stepper] - [Allow the description prop to be ReactNode ]
4 participants