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

EUIfy Console - partially de-angularize and move custom views out of top_nav #39341

Merged
merged 25 commits into from
Jun 26, 2019

Conversation

lizozom
Copy link
Contributor

@lizozom lizozom commented Jun 20, 2019

Release note

Console's welcome panel, help panel, and settings form UIs have all been updated with a new look that is more consistent with the rest of Kibana's UI. Changes to the layout of these elements also improves the user experience of using Console on smaller screens.

Summary

This PR is part of the task of moving kbn_top_nav to new platform.
To do so, I wanted to narrow the functionality of kbn_top_nav, and specifically, stop using it for rendering inline custom views (examples below).

This PR focuses on the Sense (DevTools) app, which was the heaviest user of this functionality. I will create additional PRs for graph and timelion, that make smaller use of this ability.

I was also able to delete SenseTopNavController which was the only remaining custom TopNavController implementation

These are the UI changes in this PR

Welcome notification

Welcome notification used to be shown automatically (i.e. without the user clicking on any navigation button) as part of the navigation menu.
It now uses a flyout.
If it's closed by clicking on the X or anywhere on the screen, it will come back next time the user refreshes the window. However, if the user clicks on the 'Dismiss' button, it won't be shown again.
The only changes here are the display location and the text on the button, which I felt was more meaningful.

image

Help

Help used to be displayed inside a flyout.
There were no other changes to the UI.

image

Settings

Previously, DevTools settings were displayed inline, inside the navigation menu.
I moved them to a modal.

Important

Coincidentally, @cjcenizal merged two PRs yesterday, and I had to re-implement them partially. They are tested and seem to work correctly.

image

History

History console still opens inline, but not as part of the navigation menu, as I felt like moving it to a modal \ flyout worsens the UX.
I was able to achieve a small usability improvement, where if history is open, running queries are added immediately to the list (before you had to re-open the history to see changes).

image

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

@lizozom lizozom self-assigned this Jun 20, 2019
@lizozom
Copy link
Contributor Author

lizozom commented Jun 20, 2019

@AlonaNadler @elastic/eui-design I would appreciate a review of the UI changes made here.

Please note that my goal was not to create the final perfect UI (as this app still needs to be Reactified and EUIficated), but to clear out top nav quickly, while getting some quick EUI wins.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@cjcenizal cjcenizal added Feature:Console Dev Tools Console Feature Feature:Dev Tools Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more labels Jun 20, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui

cchaos
cchaos previously requested changes Jun 20, 2019
Copy link
Contributor

@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.

Thanks @lizozom

I'm good with the settings moving to a modal because of the extra options that have been added. However, can you explain why you think moving the history to a flyout is worse UX than keeping it inline?

It currently shrinks the entire Console to less than half the window (though I guess that depends on your window size), and makes the user have to scroll a lot within the actual editor.

That is on a 17" macbook full height. The console pretty much becomes unusable if you have long searches.

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

👏 👏 👏 I am so happy to see this change @lizozom! Thank you for doing this. This is a huge help for the ES UI New Platform migration effort.

I did a light code review and left a few comments. I will do a more in-depth review in a later round, during which I'll look more closely at the welcome screen code and the code that touches changes from my recent PRs, and also do a more thorough general QA pass.

In terms of Caroline's comments, I'm OK with not spending too many iterations on improving the UI and UX in this PR. The purpose of this PR is just to convert parts of the UI from Angular to React/EUI, and as long as we don't introduce any UI/UX regressions then we're good to go. In that sense, any UI/UX improvements we introduce are a nice bonus, but nothing we should block merging on. Once this PR is merged we will spend subsequent PRs on optimizing the UI and UX.

That said, I do think this PR introduces a small UI regression because there's no visual indication separating the history panel from the main content area. @cchaos Could you suggest a minimally invasive solution here? E.g. a CSS class with a bottom-border and a box-shadow? EDIT: I see that this same problem exists in master, except there's just more space between the menu and the editor. Can we add a <EuiSpacer /> at the bottom of the menu below the apply and cancel buttons, Liza?

image

Can we also remove the overlay from the welcome flyout? The welcome flyout makes many references to various parts of the UI, but the overlay obscures the UI which takes away necessary context.

image

Similarly for the Help menu, it would be nice to be able to make use of the menu while it's open, but the overlay makes that impossible. Can we remove the overlay here, too?

image

src/legacy/core_plugins/console/public/src/input.js Outdated Show resolved Hide resolved
@@ -94,7 +114,9 @@ module.controller('SenseController', function SenseController(Private, $scope, $

$scope.sendSelected = () => {
input.focus();
input.sendCurrentRequestToES();
input.sendCurrentRequestToES(() => {
$scope.historyDirty = new Date().getTime();
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you walk me through the role $scope.historyDirty plays in the UX?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's used to force the sense-history to regenerate in case a user runs a query, while the history panel is open.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I see, thanks! Could we please rename it to lastRequestTimestamp, and add a comment on this line:

// History watches this value and will re-render itself when it changes, so that
// the list of requests stays up-to-date as new requests are sent.

@lizozom lizozom marked this pull request as ready for review June 21, 2019 09:32
@cjcenizal
Copy link
Contributor

cjcenizal commented Jun 22, 2019

I just did a QA pass and verified:

  • Keyboard shortcuts work (except for executing the selected request)
  • Gear menu options work
  • Executing multiple requests in sequence works
  • History panel works
  • Settings panel works including:
    • Polling settings
    • Manual refresh button
    • Disabling triple quotes

@lizozom
Copy link
Contributor Author

lizozom commented Jun 23, 2019

@cjcenizal I removed the overlay from the flyout.

However, I actually don't think that adding a spacer there will help anything, just take even more space off the screen. I loved the new design @cchaos suggested for the history panel, but I don't have enough time on this task to implement it. Could we just leave it as is?

Fixed all other comments!

image

…/kibana into newplatform/kbn-top-nav/devtools
@lizozom
Copy link
Contributor Author

lizozom commented Jun 25, 2019

@cjcenizal done

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@cjcenizal cjcenizal requested a review from cuff-links June 25, 2019 16:52
@cjcenizal
Copy link
Contributor

Retest

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

Woohoo! This looks great! I'm going to approve this PR but I did find a couple minor errors that I'd prefer we fix before merging.

Closing the Welcome panel with the X doesn't "dismiss" it

If you click this X in the top right corner the the local storage flag isn't set and the panel shows up again if you leave and come back to Console.

image

Font settings input gets NaN

If you clear this input then you get this warning in the console:

image

Font settings input and unmounted component

I'm not sure if the input is what's causing this warning, but if you change the font settings to another value and hit Save, you get this warning in the console:

image

@cuff-links
Copy link
Contributor

@lizozom I went ahead and ran through these changes and did not notice any regressions. I tested this on Firefox and Chrome and also tested the changes made due to feedback from others. Nice work! Getting a VM up and running to run through it on IE11.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@lizozom
Copy link
Contributor Author

lizozom commented Jun 26, 2019

@cchaos could you review the final design?

@lizozom
Copy link
Contributor Author

lizozom commented Jun 26, 2019

@lizozom I went ahead and ran through these changes and did not notice any regressions. I tested this on Firefox and Chrome and also tested the changes made due to feedback from others. Nice work! Getting a VM up and running to run through it on IE11.

@silne30 Waiting for your feedback!

Copy link
Contributor

@cuff-links cuff-links left a comment

Choose a reason for hiding this comment

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

No regressions on IE11. Thanks for your patience. :)

@lizozom lizozom dismissed cchaos’s stale review June 26, 2019 16:39

PR reviewed for regressions by @silne30 while @cchaos is out on vacation.

@lizozom lizozom merged commit 2ac2058 into elastic:master Jun 26, 2019
lizozom pushed a commit to lizozom/kibana that referenced this pull request Jun 26, 2019
…av (elastic#39341)

* Sense settings modal

* Deleted comments

* DevTools help flyout

* Settings UI improvements

* Improve file naming

* Rename helpShowPanel

* Added TS to help

* React welcome flyout + removed it from top nav

* Move history tool outside of top nav
Improve it's behavior - now it will update when open, when a query is run.

* ts fix

* Code review fixes

* Code review fixes

* Fixed translations

* Code review changes - autoclose panels

* deleted unused useEffect

* fix z-order of components

* type check fixes

* Final code review fixes
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

lizozom pushed a commit that referenced this pull request Jun 27, 2019
…av (#39341) (#39705)

* Sense settings modal

* Deleted comments

* DevTools help flyout

* Settings UI improvements

* Improve file naming

* Rename helpShowPanel

* Added TS to help

* React welcome flyout + removed it from top nav

* Move history tool outside of top nav
Improve it's behavior - now it will update when open, when a query is run.

* ts fix

* Code review fixes

* Code review fixes

* Fixed translations

* Code review changes - autoclose panels

* deleted unused useEffect

* fix z-order of components

* type check fixes

* Final code review fixes
@cjcenizal cjcenizal changed the title DevTools - partially de-angularize and move custom views out of top_nav EUIfy Console - partially de-angularize and move custom views out of top_nav Jul 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Console Dev Tools Console Feature Feature:Dev Tools Feature:New Platform release_note:enhancement Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.3.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants