Skip to content

[console] kbn top nav customizations#6721

Merged
spalger merged 4 commits intoelastic:masterfrom
spalger:implement/kbnTopNavCustomizations
Apr 1, 2016
Merged

[console] kbn top nav customizations#6721
spalger merged 4 commits intoelastic:masterfrom
spalger:implement/kbnTopNavCustomizations

Conversation

@spalger
Copy link
Copy Markdown
Contributor

@spalger spalger commented Mar 31, 2016

In order to use the kbnTopNav in console I needed it to:

  • allow adding config templates that didn't have buttons in the navbar
  • support config attributes with .'s in them
  • destroy the scope of the template when it's hidden, so that cleanup can take place

To do accomplish this:

  • added the noButton options for the config items
  • used _.get() to read the config from scope
  • tracked and destroyed a new child scope each time the current template changes

@spalger spalger force-pushed the implement/kbnTopNavCustomizations branch from 171b334 to b6784df Compare March 31, 2016 21:16
@spalger spalger force-pushed the implement/kbnTopNavCustomizations branch from b6784df to af8f2d9 Compare March 31, 2016 21:27
hasFunction: !!opt.run,
description: ('Toggle ' + opt.key),
noButton: !!opt.noButton,
openByDefault: !!opt.openByDefault ,
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.

I'm not a fan of this, why can't you just call kbnTopNav.open()? It seems this shouldn't really be this directives responsibility.

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.

How am I supposed to get access to kbnTopNav? It's only accessible within the scope of the kbn-top-nav element.

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.

@panda01 panda01 assigned spalger and unassigned panda01 Mar 31, 2016
@spalger spalger assigned panda01 and unassigned spalger Mar 31, 2016
@panda01
Copy link
Copy Markdown
Contributor

panda01 commented Apr 1, 2016

Sexiness. LGTM!

@panda01 panda01 assigned spalger and unassigned panda01 Apr 1, 2016
@spalger spalger merged commit fc62113 into elastic:master Apr 1, 2016
@spalger spalger deleted the implement/kbnTopNavCustomizations branch October 18, 2019 15:50
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.

3 participants