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

Getting Started page #11805

Merged
merged 4 commits into from
May 15, 2017
Merged

Conversation

ycombinator
Copy link
Contributor

@ycombinator ycombinator commented May 15, 2017

The original PR for this feature was #11673. Unfortunately it had to be reverted because it was failing the build. This PR re-introduces the changes made in #11673, along with any changes to functional tests in order to get the build green.

This PR has 4 commits: d16d1fb, f77e0a0, bdda576, and 6982dfb. Of these, bdda576 and 6982dfb are the actual new commits that fix the build. The other two commits are cherry-picked over from the original Getting Started PR (211b3d4) and a follow up testbed cleanup PR (ab0cfb3).

This PR implements a Getting Started page for first-time users of Kibana.

Why is this important

First-run Kibana experience is increasingly the first time the user interacts with the Elastic stack. The current out of the box experience in Kibana is to land on the index pattern creation page, when there are no existing index patterns, and that page is really unfriendly (see here).

What does this page look like

This page can be accessed under two scenarios, and looks slightly different under each scenario:

  1. When the user has never defined any index patterns defined AND the user has not explicitly opted out of the Getting Started page. The user must be shown the Getting Started page by default, regardless of which Kibana app they try and visit (manually, because the navigation is hidden from view).

    Screenshot:

    screen shot 2017-05-09 at 9 35 47 am
  2. When there are index patterns defined OR the user has explicitly opted out of the Getting Started page. In this case the user can perform business as usual around Kibana. However, they may re-visit the Getting Started page if they like from Management > Kibana > Getting Started.

    Screenshot:

    screen shot 2017-05-09 at 9 36 16 am

Additionally, orthogonal to the two scenarios described above, the page has a couple of optional sections as well, that may be populated dynamically. The two sections are:

  • A horizontal (row-like) section in between the Kibana logo and the two boxes. This section can accept a string of formatted text and display it.
  • A third "Manage and Monitor" box that would show up to the right of the "Visualize and explore" box. The section can accept an array of message strings (sentences). The message strings are concatenated and displayed as a paragraph.

Screenshot showing both optional sections populated:

screen shot 2017-05-09 at 9 48 51 am

What's in the box

This PR:

  • Implements a new core plugin called getting_started, that implements the controller and template of the Getting Started page, along with the routing and logic on when the page should be shown to the user.

  • Provides a registry for dynamically populating the two optional sections in the Getting Started page.

  • Provides an attribute directive, kbnGettingStartedOptOut that clickable elements (links, buttons) on the Getting Started Page can use to opt users out of the Getting Started page as they navigate away.

  • Consolidates logic for defining default index patterns into the logic for showing the Getting Started page under Scenario 1 (described above). Without this consolidation there was a race condition which would cause the Getting Started page to be displayed along with a Notifier message about no default index pattern being defined if the user tried to visit a Kibana app (e.g. Discover).

  • Includes SVG images for various logos.

What to test

  1. Delete all index patterns (by directly manipulating the .kibana index, and not via the Index Patterns UI), then load up Kibana. You should see the Getting Started page as described under Scenario 1 above. Attempting to visit another Kibana app (e.g. Discover) should bring you back to the Getting Started page.

  2. Opt out of the Getting Started page by clicking the link in the top right. This decision is recorded in localStorage in the key, kibana.isGettingStartedOptedOut. You should see the nav again and be able to visit other Kibana apps. However, visiting a Kibana app that requires an index pattern (i.e. Discover, Visualize, or Dashboard) should take you to the index patterns page with a Notifier about there being no default index pattern (same as before this PR).

  3. Delete the localStorage key kibana.isGettingStartedOptedOut. Refresh Kibana. You should be back in Scenario 1. Now click on the link in the "Visualize and explore" box on the Getting Started page. This should opt you out of the Getting Started page.

  4. Once you have opted out of the Getting Started page or index patterns exist, try visiting the Getting Started page via Management > Kibana > Getting Started. Check that it looks and functions as described in Scenario 2 above.

  5. Try dynamically registering content for both optional sections on the Getting Started page and ensure that it shows up as expected. The code to do this is:

    import { GettingStartedTopMessagesRegistryProvider } from 'ui/getting_started/top_messages_registry';
    
    GettingStartedTopMessagesRegistryProvider.register(() => ({
      template: `Hello there, I'm on top!`
    }));
    import { GettingStartedMonitorAndManageMessagesRegistryProvider } from 'ui/getting_started/monitor_and_manage_messages_registry';
    
    GettingStartedMonitorAndManageMessagesRegistryProvider.register(() => ({
      template: `Hello there, I'm in the right-most box!`
    }));

/cc @tbragin @skearns64 @alexfrancoeur

For Release Notes

Summary: Introduces a Getting Started page in Kibana for first-time users. Previously we would drop first-time users onto the Index Patterns page, without providing much context for why they were there or good instructions on what to do next. The Getting Started page provides a short introduction to Kibana and a link to the Index Patterns page along with some context around when and why to use it.

* Initial code

* Renaming files/folders

* Notes and changes from HTML/CSS review

* CSS changes

* Fixing transform units

* Fleshing out logo circle

* Adding logos

* Un-nesting styles

* Adding kuiText class on <p> elements

* Making shield icon 404 go away

* Using trustAsHtml filter; using registry

* Adding code for registry

* Adding images

* Hooking up the opt-out link

* Fixing linter issues

* Fix issue with refresh bringing back nav

* Removing load_default module

* Use GETTING_STARTED_ROUTE constant

* Allow topMessage to be a directive

* Adding kuiLink CSS class to anchor elements

* Adding alt text to images

* Replace getters with regular methods

* Remove leftover comment

* Removing unnecessary comment

* Fixing typo in comment

* Adding comments for message properties

* Fixing typo in method name

* Defining custom CSS class

* Fixing method call

* Creating custom CSS classes

* Adding documentation links

* Use a instead of button for demo link

* Allow directives in manage and monitor messages

* Refactoring shared code into single ui/public/getting_started folder

* Adding README

* Fixing whitespace in/around links

* Trim messages before setting them

* Decorate in-app links with opt-out attribute

* Opt out of the Getting Started page if the user already has index patterns

* Adding more commentary around expectations of setTopMessage use

* Using ng-src and ng-href attributes where attr values are angular expressions

* Importing the directive before using it

* Using ui/registry for message registries

* Renaming service => helpers to clarify intent

* Adding explanatory comment

* Adding "or"

* Fixing div id

* Breaks out the inject logic into another directive

* Adding Getting Started page object for functional tests

* Consolidate into one registry

* Fixes incorrect classes

* Changes how styles are applied to injected-items items

* Modifying class name per CSS style guide

* Adding getting started doc link

* Removing unused import
Apparently the Getting Started page is preventing access to Console (Dev Tools, really) so the functional tests for Console are failing. This commit opts the user out of the Getting Started page before attempting to navigate to Console.
Copy link
Contributor

@kobelb kobelb left a comment

Choose a reason for hiding this comment

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

LGTM - pending CI builds going green

@ycombinator ycombinator merged commit 32eff37 into elastic:master May 15, 2017
@ycombinator ycombinator deleted the getting-started-3 branch May 15, 2017 21:04
ycombinator added a commit that referenced this pull request May 15, 2017
* Getting Started page (#11673)

* Initial code

* Renaming files/folders

* Notes and changes from HTML/CSS review

* CSS changes

* Fixing transform units

* Fleshing out logo circle

* Adding logos

* Un-nesting styles

* Adding kuiText class on <p> elements

* Making shield icon 404 go away

* Using trustAsHtml filter; using registry

* Adding code for registry

* Adding images

* Hooking up the opt-out link

* Fixing linter issues

* Fix issue with refresh bringing back nav

* Removing load_default module

* Use GETTING_STARTED_ROUTE constant

* Allow topMessage to be a directive

* Adding kuiLink CSS class to anchor elements

* Adding alt text to images

* Replace getters with regular methods

* Remove leftover comment

* Removing unnecessary comment

* Fixing typo in comment

* Adding comments for message properties

* Fixing typo in method name

* Defining custom CSS class

* Fixing method call

* Creating custom CSS classes

* Adding documentation links

* Use a instead of button for demo link

* Allow directives in manage and monitor messages

* Refactoring shared code into single ui/public/getting_started folder

* Adding README

* Fixing whitespace in/around links

* Trim messages before setting them

* Decorate in-app links with opt-out attribute

* Opt out of the Getting Started page if the user already has index patterns

* Adding more commentary around expectations of setTopMessage use

* Using ng-src and ng-href attributes where attr values are angular expressions

* Importing the directive before using it

* Using ui/registry for message registries

* Renaming service => helpers to clarify intent

* Adding explanatory comment

* Adding "or"

* Fixing div id

* Breaks out the inject logic into another directive

* Adding Getting Started page object for functional tests

* Consolidate into one registry

* Fixes incorrect classes

* Changes how styles are applied to injected-items items

* Modifying class name per CSS style guide

* Adding getting started doc link

* Removing unused import

* Attempting to fix breaking build

Apparently the Getting Started page is preventing access to Console (Dev Tools, really) so the functional tests for Console are failing. This commit opts the user out of the Getting Started page before attempting to navigate to Console.

* Cleanup on aisle testbed! (#11765)

* Navigate to getting started page so we can opt out of it
@ycombinator
Copy link
Contributor Author

Backported to:

snide pushed a commit to snide/kibana that referenced this pull request May 30, 2017
* Getting Started page (elastic#11673)

* Initial code

* Renaming files/folders

* Notes and changes from HTML/CSS review

* CSS changes

* Fixing transform units

* Fleshing out logo circle

* Adding logos

* Un-nesting styles

* Adding kuiText class on <p> elements

* Making shield icon 404 go away

* Using trustAsHtml filter; using registry

* Adding code for registry

* Adding images

* Hooking up the opt-out link

* Fixing linter issues

* Fix issue with refresh bringing back nav

* Removing load_default module

* Use GETTING_STARTED_ROUTE constant

* Allow topMessage to be a directive

* Adding kuiLink CSS class to anchor elements

* Adding alt text to images

* Replace getters with regular methods

* Remove leftover comment

* Removing unnecessary comment

* Fixing typo in comment

* Adding comments for message properties

* Fixing typo in method name

* Defining custom CSS class

* Fixing method call

* Creating custom CSS classes

* Adding documentation links

* Use a instead of button for demo link

* Allow directives in manage and monitor messages

* Refactoring shared code into single ui/public/getting_started folder

* Adding README

* Fixing whitespace in/around links

* Trim messages before setting them

* Decorate in-app links with opt-out attribute

* Opt out of the Getting Started page if the user already has index patterns

* Adding more commentary around expectations of setTopMessage use

* Using ng-src and ng-href attributes where attr values are angular expressions

* Importing the directive before using it

* Using ui/registry for message registries

* Renaming service => helpers to clarify intent

* Adding explanatory comment

* Adding "or"

* Fixing div id

* Breaks out the inject logic into another directive

* Adding Getting Started page object for functional tests

* Consolidate into one registry

* Fixes incorrect classes

* Changes how styles are applied to injected-items items

* Modifying class name per CSS style guide

* Adding getting started doc link

* Removing unused import

* Attempting to fix breaking build

Apparently the Getting Started page is preventing access to Console (Dev Tools, really) so the functional tests for Console are failing. This commit opts the user out of the Getting Started page before attempting to navigate to Console.

* Cleanup on aisle testbed! (elastic#11765)

* Navigate to getting started page so we can opt out of it
ycombinator added a commit to ycombinator/kibana that referenced this pull request Jun 2, 2017
ycombinator added a commit to ycombinator/kibana that referenced this pull request Jun 3, 2017
ycombinator added a commit that referenced this pull request Jun 5, 2017
* Revert "When on an embedded page, bypass Getting Started gate check (#12040)"

This reverts commit 05293f1.

* Revert "Making tweaks. (#12003)"

This reverts commit aa3fa06.

* Revert "Functional tests for the Getting Started page (#11850)"

This reverts commit 099178a.

* Revert "Prevent flicker on Getting Started page (#11826)"

This reverts commit c4b3ade.

* Revert "Getting Started page (#11805)"

This reverts commit 32eff37.

* Remove check for Getting Started page from navigateToApp
ycombinator added a commit that referenced this pull request Jun 5, 2017
* Revert "When on an embedded page, bypass Getting Started gate check (#12040)"

This reverts commit 05293f1.

* Revert "Making tweaks. (#12003)"

This reverts commit aa3fa06.

* Revert "Functional tests for the Getting Started page (#11850)"

This reverts commit 099178a.

* Revert "Prevent flicker on Getting Started page (#11826)"

This reverts commit c4b3ade.

* Revert "Getting Started page (#11805)"

This reverts commit 32eff37.

* Remove check for Getting Started page from navigateToApp
PopradiArpad pushed a commit to PopradiArpad/kibana that referenced this pull request Jun 6, 2017
* Revert "When on an embedded page, bypass Getting Started gate check (elastic#12040)"

This reverts commit 05293f1.

* Revert "Making tweaks. (elastic#12003)"

This reverts commit aa3fa06.

* Revert "Functional tests for the Getting Started page (elastic#11850)"

This reverts commit 099178a.

* Revert "Prevent flicker on Getting Started page (elastic#11826)"

This reverts commit c4b3ade.

* Revert "Getting Started page (elastic#11805)"

This reverts commit 32eff37.

* Remove check for Getting Started page from navigateToApp
chrisronline pushed a commit to chrisronline/kibana that referenced this pull request Jun 14, 2017
* Revert "When on an embedded page, bypass Getting Started gate check (elastic#12040)"

This reverts commit 05293f1.

* Revert "Making tweaks. (elastic#12003)"

This reverts commit aa3fa06.

* Revert "Functional tests for the Getting Started page (elastic#11850)"

This reverts commit 099178a.

* Revert "Prevent flicker on Getting Started page (elastic#11826)"

This reverts commit c4b3ade.

* Revert "Getting Started page (elastic#11805)"

This reverts commit 32eff37.

* Remove check for Getting Started page from navigateToApp
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.

None yet

3 participants