FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(HorizontalNavMenuItem): Allow HorizontalNavMenuItem's title to be a node by martinpovolny · Pull Request #2825 · patternfly/patternfly-react · GitHub

fix(HorizontalNavMenuItem): Allow HorizontalNavMenuItem's title to be a node - #2825

Merged
jeff-phillips-18 merged 1 commit into
patternfly:masterfrom
martinpovolny:hor_nav_item_title_object
Sep 9, 2019
Merged

fix(HorizontalNavMenuItem): Allow HorizontalNavMenuItem's title to be a node#2825
jeff-phillips-18 merged 1 commit into
patternfly:masterfrom
martinpovolny:hor_nav_item_title_object

Conversation

Copy link
Copy Markdown
Contributor

Allow HorizontalNavMenuItem's title to be a node rather than just a string.

Needed by: ManageIQ/react-ui-components#115 and ManageIQ/manageiq-ui-classic#5997

Ping @karelhala

karelhala previously approved these changes Sep 4, 2019
children: PropTypes.node,
onItemClick: PropTypes.object,
title: PropTypes.string,
title: PropTypes.node,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

While node works for both, we typically have used:

Suggested change
title: PropTypes.node,
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),

to be more explicit

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Not sure that it's required node can be anything that can be rendered https://reactjs.org/docs/typechecking-with-proptypes.html#proptypes

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Understood, just looking for consistency and explicitly noting in the docs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Guys, I do not care ;-)

I am seeing both variants in places. Tell me if I need to change it to get the PR merged or not.

Yes - change / No - leave it.

That's what I care about :-D Because w/o that I cannot finish the PRs above.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thx!

skateman previously approved these changes Sep 6, 2019

Copy link
Copy Markdown
Member

@martinpovolny Could you rebase your branch to fix the build error?

Copy link
Copy Markdown
Contributor Author

Rebased.

Copy link
Copy Markdown
Collaborator

PatternFly-React preview: https://patternfly-react-pr-2825.surge.sh

jeff-phillips-18 merged commit 78adfa4 into patternfly:master Sep 9, 2019

Copy link
Copy Markdown
Collaborator

Your changes have been released in:

  • patternfly-react-extensions@2.20.3
  • patternfly-react@2.38.1
  • @patternfly/react-console@1.12.7

Thanks for your contribution! 🎉

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

5 participants


Back | FazBrowse Home | New Git URL