-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Dashboard Usability] Moves scrollbar to panel section #145628
Conversation
9bc2580
to
f1911f5
Compare
31de6e6
to
d9a6083
Compare
…rd/move-scrollbar
…rd/move-scrollbar
…rd/move-scrollbar
…rd/move-scrollbar
…rd/move-scrollbar
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.
Nice enhancement @cqliu1! Leaving you a few comments below for your initial review.
On a side note, I found some oddities with the page template markup being generated. This may be an issue for the @elastic/appex-sharedux team, but mentioning it here for the sake of visibility/discussion. It looks like the div.kbnAppWrapper
element is being rendered twice, and the div.app-fixed-viewport
element is empty and unused. Not sure if this is intentional or not, but I couldn't immediately think of a good reason for us to do this. Is this intentional? Or should an issue be opened to fix this?
@include euiBreakpoint('m', 'l', 'xl') { | ||
@include kibanaFullBodyHeight(); | ||
} |
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.
Excluding the kibanaFullBodyHeight
mixin from the s
breakpoint appears to be causing dueling scrollbars to appear at small viewport sizes. Fixed in f1ad633.
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.
|
||
const viewportStyles = css` | ||
${useEuiOverflowScroll('y', true)} | ||
`; |
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.
Adding my two cents here. Beyond the aesthetics, I'm not a fan of using the gradient/fade/shadow effect between the unified search and page content because it's not consistent with what we do in other applications in Kibana (ex. Lens, Maps, Graph, etc.). The Lens approach may be best here, with a simple border in between the unified search and content (which will likely remove the concern with how dashboards look midway when scrolling). Thoughts?
@MichaelMarcialis It looks like the same duplicate |
…kibana into dashboard/move-scrollbar
…rd/move-scrollbar
@cqliu1: Yeah, I noticed that as well after I posted that comment. Would you happen to know if it is intentional or a bug that should be reported to @elastic/appex-sharedux? Or a perhaps a member from that team could comment here. |
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 for making those changes, @cqliu1! This looks great. I left one final suggestion below for your re-review, but nothing worth holding you up any further for. Approving now.
@include euiBreakpoint('xs', 's', 'm', 'l', 'xl') { | ||
@include kibanaFullBodyHeight(); | ||
} |
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.
Since this is now using all available breakpoints, we should be able to remove the media query altogether.
@include euiBreakpoint('xs', 's', 'm', 'l', 'xl') { | |
@include kibanaFullBodyHeight(); | |
} | |
@include kibanaFullBodyHeight(); |
|
||
const viewportStyles = css` | ||
${useEuiOverflowScroll('y', true)} | ||
`; |
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 like @ThomThomson's suggestion here for the single border in edit mode. Looks like you've already implemented it, so thumbs up from me!
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
History
To update your PR or re-run it, just comment with: |
* main: (115 commits) [Custom branding] Add custom logo to space selector (elastic#150284) [api-docs] 2023-02-10 Daily api_docs build (elastic#150831) [ci] build next docs in PRs when relevant files change (elastic#149991) [codeowners] allow overrides to take higher precedence (elastic#150821) [docs] Remove kibDevDocsOpsPluginDiscovery (elastic#150788) [Fleet] Fix max 20 installed integrations returned from Fleet API (elastic#150780) [maps] fix Changing resolutions on Heat map layer throws error in console (elastic#150761) fixes Failing ES Promotion: X-Pack API Integration Tests x-pack/test/api_integration/apis/maps/get_grid_tile.js (elastic#150768) [Synthetics] adjust overview scrolling e2e (elastic#150774) [Security Solution] Fixes bulk close alerts from exception flyout type bug (elastic#150765) Upgrade EUI to v74.1.0 (elastic#150235) [skip ci] Fix labeling for Infrastructure UI (elastic#150571) [Enterprise Search] Move pipelines modal to flyout (elastic#150727) [Security Solution] fix flaky endpoint tests (elastic#150652) Fixes the space selector page layout (elastic#150503) [Dashboard] [Navigation] Fix mount point bug (elastic#150507) [Infrastructure UI] Track host cloud provider on table entry click (elastic#150685) [Dashboard Usability] Moves scrollbar to panel section (elastic#145628) [Maps] fixes Kibana maps shows MVT borders if the geometry border style is greater than 1 (elastic#150497) [Cloud Posture][Dashboard] dashboard re-design enhancements (elastic#150394) ...
…2155) Closes #135458 Unblocks #151233 ## Summary This PR adds the floating actions back into the regular HTML tree by removing the `EuiPortal` that surrounded them, thus making them keyboard accessible via some added CSS. ![Mar-02-2023 11-54-13](https://user-images.githubusercontent.com/8698078/222524586-8051b8e5-fe1e-48b2-bd83-30a90f9b3417.gif) In order to do this, however, there were a few changes that had to be made to the overall Dashboard HTML structure. Previously, as part of [relocating the Dashboard scrollbar](#145628), the scrollable section of the app was moved to the Dashboard viewport, like so: https://user-images.githubusercontent.com/8698078/222511861-8707917c-9edc-4292-a182-58924bb00c8a.mov <br> While this had a lot of visual appeal, because of the structure of the HTML tree, the floating actions had to be moved to an `EuiPortal` as part of this change so that they would continue to float above the top navigation bar rather than clipping behind it alongside the other contents of the viewport - this made it impossible to add native keyboard accessibility since they were removed from the natural HTML structure. Unfortunately, by removing the `EuiPortal` in order to allow for keyboard accessibility, this meant that the scrollable section could **no longer** be constrained to the viewport - this is because the `z-index` of child of a given scrollable `div` is **always relative** to its parent, which means that the floating actions would clip behind the top nav bar regardless of how high you set their `z-index`: <p align="center"><img src="https://user-images.githubusercontent.com/8698078/222518354-80f1df75-69e5-4433-a256-d0b7dc57cd97.gif"/></p> Therefore, in order to avoid this clipping, the scrollable section had to remain at the top of the app, like so: https://user-images.githubusercontent.com/8698078/222512203-60a88fc5-dd68-47ba-aeab-2425afc60a67.mov <br> In order to keep the benefit of the top query bar remaining in place, the top nav bar was added to a **fixed position** `div` that floats above the contents of the viewport as the user scrolls - this ensures that the floating actions, which are now also positioned via a `fixed` container, can still float above the nav bar while remaining part of the natural order of the HTML tree. As a follow up, we should also address #152609. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [x] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [x] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
…stic#152155) Closes elastic#135458 Unblocks elastic#151233 ## Summary This PR adds the floating actions back into the regular HTML tree by removing the `EuiPortal` that surrounded them, thus making them keyboard accessible via some added CSS. ![Mar-02-2023 11-54-13](https://user-images.githubusercontent.com/8698078/222524586-8051b8e5-fe1e-48b2-bd83-30a90f9b3417.gif) In order to do this, however, there were a few changes that had to be made to the overall Dashboard HTML structure. Previously, as part of [relocating the Dashboard scrollbar](elastic#145628), the scrollable section of the app was moved to the Dashboard viewport, like so: https://user-images.githubusercontent.com/8698078/222511861-8707917c-9edc-4292-a182-58924bb00c8a.mov <br> While this had a lot of visual appeal, because of the structure of the HTML tree, the floating actions had to be moved to an `EuiPortal` as part of this change so that they would continue to float above the top navigation bar rather than clipping behind it alongside the other contents of the viewport - this made it impossible to add native keyboard accessibility since they were removed from the natural HTML structure. Unfortunately, by removing the `EuiPortal` in order to allow for keyboard accessibility, this meant that the scrollable section could **no longer** be constrained to the viewport - this is because the `z-index` of child of a given scrollable `div` is **always relative** to its parent, which means that the floating actions would clip behind the top nav bar regardless of how high you set their `z-index`: <p align="center"><img src="https://user-images.githubusercontent.com/8698078/222518354-80f1df75-69e5-4433-a256-d0b7dc57cd97.gif"/></p> Therefore, in order to avoid this clipping, the scrollable section had to remain at the top of the app, like so: https://user-images.githubusercontent.com/8698078/222512203-60a88fc5-dd68-47ba-aeab-2425afc60a67.mov <br> In order to keep the benefit of the top query bar remaining in place, the top nav bar was added to a **fixed position** `div` that floats above the contents of the viewport as the user scrolls - this ensures that the floating actions, which are now also positioned via a `fixed` container, can still float above the nav bar while remaining part of the natural order of the HTML tree. As a follow up, we should also address elastic#152609. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [x] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [x] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
Summary
Closes #145404.
Closes #134257.
Cloud deployment for testing: https://kibana-pr-145628.kb.us-west2.gcp.elastic-cloud.com:9243
User:
elastic
Password:
zuIno5Tuy4lVmhMwbt2C6NyY
This moves the scrollbar from the entire app to only the panel section of the dashboard app. The search/filter bar and editor toolbar will remain at the top while controls and panels scroll. The controls floating actions were extracted out into their own component for future use for panel actions.
Before
After
Checklist
Delete any items that are not applicable to this PR.
For maintainers