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

[docs] Navigator supports excluding items #2591

Merged
merged 2 commits into from
Jun 12, 2018
Merged

Conversation

giladgray
Copy link
Contributor

  • new Documentation navigatorExclude and Navigator itemExclude props to support excluding items from the navigator results.

can no longer navigate to "Components" page or "Overlays" section.

@blueprint-bot
Copy link

Navigator supports excluding items via Documentation navigatorExclude prop

Preview: documentation | landing | table

Copy link
Contributor

@themadcreator themadcreator left a comment

Choose a reason for hiding this comment

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

minor request, otherwise approved

@@ -34,6 +45,9 @@ export class Navigator extends React.PureComponent<INavigatorProps> {
public componentDidMount() {
this.sections = [];
eachLayoutNode(this.props.items, (node, parents) => {
if (Utils.safeInvoke(this.props.itemExclude, node)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

to be safe, we should make sure we handle the case this returns 'undefined' instead of 'false'

@blueprint-bot
Copy link

explicit check for safety

Preview: documentation | landing | table

@giladgray giladgray merged commit 1b43e80 into develop Jun 12, 2018
@giladgray giladgray deleted the gg/docs-nav-exclude branch June 12, 2018 23:53
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.

4 participants