-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
EUIfy Console - partially de-angularize and move custom views out of top_nav #39341
Conversation
Improve it's behavior - now it will update when open, when a query is run.
@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. |
💔 Build Failed |
Pinging @elastic/es-ui |
There was a problem hiding this 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.
src/legacy/core_plugins/console/public/src/components/help_panel.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/console/public/src/components/help_panel.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/console/public/src/components/help_panel.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/console/public/src/components/help_panel.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/console/public/src/components/help_panel.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/console/public/src/components/welcome_panel.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/console/public/src/components/welcome_panel.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/console/public/src/components/welcome_panel.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/console/public/src/components/welcome_panel.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/console/public/src/directives/_history.scss
Outdated
Show resolved
Hide resolved
💔 Build Failed |
There was a problem hiding this 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?
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.
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?
src/legacy/core_plugins/console/public/src/components/settings_modal.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/console/public/src/components/help_show_panel.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/console/public/src/components/help_show_panel.tsx
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(); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
I just did a QA pass and verified:
|
@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! |
…/kibana into newplatform/kbn-top-nav/devtools
@cjcenizal done |
💔 Build Failed |
💔 Build Failed |
Retest |
There was a problem hiding this 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.
Font settings input gets NaN
If you clear this input then you get this warning in the console:
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:
src/legacy/core_plugins/console/public/src/helpers/get_top_nav.ts
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/console/public/src/controllers/sense_controller.js
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/console/public/src/helpers/welcome_show_panel.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/console/public/src/helpers/welcome_show_panel.tsx
Show resolved
Hide resolved
src/legacy/core_plugins/console/public/src/helpers/welcome_show_panel.tsx
Show resolved
Hide resolved
@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. |
💚 Build Succeeded |
💚 Build Succeeded |
@cchaos could you review the final design? |
There was a problem hiding this 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. :)
…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
💚 Build Succeeded |
…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
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 customTopNavController
implementationThese 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.
Help
Help used to be displayed inside a flyout.
There were no other changes to the UI.
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.
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).
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.