[Enterprise Search] Expose core.chrome.setIsVisible for use in Workplace Search#95984
Merged
scottybollinger merged 7 commits intoelastic:masterfrom Apr 5, 2021
Conversation
The Workplace Search Personal dashboard needs the chrome hidden. We hide it globally here first to prevent a flash of chrome on the Personal dashboard and unhide it for admin routes, which will be in a future commit
cee-chen
reviewed
Mar 31, 2021
x-pack/plugins/enterprise_search/public/applications/workplace_search/index.tsx
Outdated
Show resolved
Hide resolved
cee-chen
reviewed
Mar 31, 2021
Comment on lines
+117
to
+118
| // The Workplace Search Personal dashboard needs the chrome hidden. We hide it globally | ||
| // here first to prevent a flash of chrome on the Personal dashboard and unhide it for admin routes. |
Contributor
There was a problem hiding this comment.
💯 This comment is great/adds tons of context!
cee-chen
approved these changes
Mar 31, 2021
Contributor
cee-chen
left a comment
There was a problem hiding this comment.
I have some minor suggestions for tests/performance but they're non-blocking and can be done in a follow-up PR if you prefer!
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
Author
|
@elasticmachine merge upstream |
yakhinvadim
approved these changes
Apr 5, 2021
Contributor
yakhinvadim
left a comment
There was a problem hiding this comment.
Looks great! Thanks for making this change, Scotty, and thanks for valuable suggestions, Constance!
Contributor
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
kibanamachine
added a commit
to kibanamachine/kibana
that referenced
this pull request
Apr 5, 2021
…ace Search (elastic#95984) * Hide chrome for Workplace Search by default The Workplace Search Personal dashboard needs the chrome hidden. We hide it globally here first to prevent a flash of chrome on the Personal dashboard and unhide it for admin routes, which will be in a future commit * Add core.chrome.setIsVisible to KibanaLogic * Toggle chrome visibility for Workplace Search * Add test * Refactor to set context and chrome when pathname changes Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Contributor
kibanamachine
added a commit
that referenced
this pull request
Apr 5, 2021
…ace Search (#95984) (#96221) * Hide chrome for Workplace Search by default The Workplace Search Personal dashboard needs the chrome hidden. We hide it globally here first to prevent a flash of chrome on the Personal dashboard and unhide it for admin routes, which will be in a future commit * Add core.chrome.setIsVisible to KibanaLogic * Toggle chrome visibility for Workplace Search * Add test * Refactor to set context and chrome when pathname changes Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
jloleysens
added a commit
to jloleysens/kibana
that referenced
this pull request
Apr 6, 2021
…-nav * 'master' of github.com:elastic/kibana: (106 commits) [Lens] don't use eui variables for zindex (elastic#96117) Remove /src/legacy (elastic#95510) skip flaky suite (elastic#95899) [Dashboard] Fix Lens and TSVB chart tooltip positioning relative to global headers (elastic#94247) fixes a skipped management x-pack test (elastic#96178) [App Search] API logs: Add log detail flyout (elastic#96162) [tech-debt] Remove defunct opacity parameters from EUI shadow functions (elastic#96191) Add Input Controls project configuration (elastic#96238) [file upload] document file upload privileges and provide actionable UI when failures occur (elastic#95883) Revert "TS Incremental build exclude test files (elastic#95610)" (elastic#96223) [App Search] Added Sample Response section to Result Settings (elastic#95971) [Maps] Safe-erase text-field (elastic#94873) [RAC][Alert Triage][TGrid] Update the Alerts Table (TGrid) API to implement `renderCellValue` (elastic#96098) [Maps] Enable all zoom levels for all users (elastic#96093) Use plugin version in its publicPath (elastic#95945) [Enterprise Search] Expose core.chrome.setIsVisible for use in Workplace Search (elastic#95984) [Workplace Search] Add sub nav and fix rendering bugs in Personal dashboard (elastic#96100) [OBS]home page is showing incorrect value of APM throughput (tpm) (elastic#95991) [Observability] Exploratory View initial skeleton (elastic#94426) [KQL] Fixed styles of KQL textarea for the K8 theme (elastic#96190) ... # Conflicts: # x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/restore_snapshot.helpers.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In Workplace Search, the Private dashboard has a requirement to hide the Kibana chrome, as non-admin users should not have access to anything in Kibana but their personal dashboard. To achieve this, we need to remove the chrome for non-organization routes. This PR uses
KibanaLogicto exposecore.chrome.setIsVisibleto the app.Because the place where this is triggered––the index file with the routes––is instantiated after the app chrome, there is an unwanted flash of the top bars before hiding the UI. We hide the chrome when mounting the Workplace Search app and then unhide it when the routes necessitate the chrome.
Although not in this PR (follow-up immediately following this one), this is what we are trying to achieve:

Note: Astute observers might realize that this also hides the chrome for admin users who visit their Personal dashboard. This is an expected UX intended to keep the UXes separate for Kibana/admin management and Private source administration.
Best to review with whitespace changes hidden and/or commit-by-commit.
Checklist