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

Add help menu item to header #29664

Merged
merged 9 commits into from
Feb 1, 2019
Merged

Conversation

cchaos
Copy link
Contributor

@cchaos cchaos commented Jan 30, 2019

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 Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.0.0 labels Jan 30, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-design

@elasticmachine
Copy link
Contributor

💔 Build Failed

@gchaps
Copy link
Contributor

gchaps commented Jan 30, 2019

For the default content copy, I recommend:

Get updates, information, and answers in our documentation.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@formgeist
Copy link
Contributor

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

@spalger
Copy link
Contributor

spalger commented Jan 31, 2019

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

@cchaos
Copy link
Contributor Author

cchaos commented Jan 31, 2019

@spalger You are the best!!! 🥇

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor Author

@cchaos cchaos left a comment

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.

@elasticmachine
Copy link
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
Contributor

💚 Build Succeeded

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

💚 Build Succeeded

@cchaos
Copy link
Contributor Author

cchaos commented Feb 1, 2019

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

@elasticmachine
Copy link
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
Contributor

💚 Build Succeeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:enhancement Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc 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