Skip to content

Add help menu item to header - #29664

Merged
cchaos merged 9 commits into
elastic:masterfrom
cchaos:help_header_button
Feb 1, 2019
Merged

cchaos merged 9 commits into
elastic:masterfrom
cchaos:help_header_button

Conversation

@cchaos

@cchaos cchaos commented Jan 30, 2019 •

Copy link
Copy Markdown
Contributor

Summary

This creates a help menu button in the Kibana header that allows for linking to documentation and/or other types of feedback opportunities.

It currently accepts three props:

  1. useDefaultContent: defaults to true and will show the default intro text and link to Kibana's docs site
  2. documentationLink: default's to kibana's docs site
  3. customContent: adds any custom content below the default content

Additionally, this adds core.chrome.setHelpExtension/getHelpExtension$ and chrome.helpExtension.set/get$ APIs to render a help extension in this popover.

  • Use chrome.helpExtension.set() (legacy platform) or core.chrome.setHelpExtension() (new platform) to provide the chrome with a render function that will be called with a DOM element, and should return a function to unmount the rendered component
  • Remove the current help extension by passing undefined to chrome.helpExtension.set() or core.chrome.setHelpExtension()
  • In an app that uses the Angular router:

Example

Shows how to use the default content with additional custom content to show an extra link:

cc @formgeist and ref: #29247


@elastic/kibana-platform team (and specifically @spalger) This is ready to be hooked up. I basically dupped the app menu so it still contains (commented out) that subscription stuff in case that's need to be able to pass down some of those custom options.

Thanks in advance!!!


Also, the default content copy could use some love from @gchaps or @schersh


Checklist

For maintainers

@cchaos cchaos added Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. WIP Work in progress Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// v7.0.0 labels Jan 30, 2019
@elasticmachine

Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-design

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@gchaps

gchaps commented Jan 30, 2019

Copy link
Copy Markdown
Contributor

For the default content copy, I recommend:

Get updates, information, and answers in our documentation.

@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@formgeist

Copy link
Copy Markdown
Contributor

@cchaos Excellent work! Thanks for jumping on this such short notice 🙇

@spalger

spalger commented Jan 31, 2019

Copy link
Copy Markdown
Contributor

@cchaos Added APIs to feed the UI here, and also added info to the description on how to use those APIs.

@cchaos

cchaos commented Jan 31, 2019 •

Copy link
Copy Markdown
Contributor Author

@spalger You are the best!!! 🥇

@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@cchaos cchaos left a comment

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.

Adding some todo's of things I need help with. I'm hoping someone from the @elastic/kibana-app team can help.

Comment thread src/ui/public/chrome/directives/header_global_nav/components/header_help_menu.tsx Outdated
Comment thread src/ui/public/chrome/directives/header_global_nav/components/header_help_menu.tsx Outdated
Comment thread src/ui/public/chrome/directives/header_global_nav/components/header_help_menu.tsx Outdated
Comment thread src/ui/public/chrome/directives/header_global_nav/components/header_help_menu.tsx Outdated
Comment thread src/ui/public/chrome/directives/header_global_nav/components/header_help_menu.tsx Outdated
@elasticmachine

Copy link
Copy Markdown
Contributor

💔 Build Failed

@cchaos
cchaos force-pushed the help_header_button branch from 2fe4bf8 to 2d680f3 Compare January 31, 2019 20:27
@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@cchaos
cchaos requested a review from a team as a code owner February 1, 2019 15:52
@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@cchaos

cchaos commented Feb 1, 2019

Copy link
Copy Markdown
Contributor Author

Yasss @timroes !!! Thank you!! It's all dynamic now, just going through the last of the checklist items.

@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@cchaos
cchaos merged commit c0f50a1 into elastic:master Feb 1, 2019
@cchaos
cchaos deleted the help_header_button branch February 1, 2019 16:45
@cchaos cchaos removed the WIP Work in progress label Feb 1, 2019
@cchaos cchaos changed the title [WIP] Add help menu item to header Add help menu item to header Feb 1, 2019
@elasticmachine

Copy link
Copy Markdown
Contributor

💚 Build Succeeded

patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request May 6, 2026
* Added static help menu item to header

* Update default message

* [chrome] add help menu extension point apis

* [chrome/headerExtension] fix test file name

* prettier

* Insert doclink and version dynamically

* Add missing i18n

* Lowercase `v` for version

* Smaller width for popover
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:enhancement Team:Core Platform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t// Team:Platform-Design Team Label for Kibana Design Team. Support the Analyze group of plugins. v7.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants