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

Publish getIsNavDrawerLocked$ method on core chrome service. #60191

Conversation

cjcenizal
Copy link
Contributor

This will allow consumers to adjust the size of components they own which don't resize automatically, e.g. EuiBottomBar.

@cjcenizal cjcenizal added chore Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.7.0 labels Mar 14, 2020
@cjcenizal cjcenizal requested a review from joshdover March 14, 2020 05:57
@cjcenizal cjcenizal requested a review from a team as a code owner March 14, 2020 05:57
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@cjcenizal cjcenizal mentioned this pull request Mar 14, 2020
13 tasks
@cjcenizal cjcenizal force-pushed the feature/broadcast-change-to-nav-drawer-locked-state branch 4 times, most recently from a819fb8 to 209e2cf Compare March 14, 2020 13:21
@cjcenizal cjcenizal force-pushed the feature/broadcast-change-to-nav-drawer-locked-state branch from 209e2cf to 76f3c3a Compare March 14, 2020 15:57
@joshdover
Copy link
Contributor

Why is the locked state needed? I thought that this might already be covered by the core.chrome.getIsCollapsed$() API

@cjcenizal
Copy link
Contributor Author

@joshdover What does that isCollapsed state represent and what calls setIsCollapsed? The only consumer I could find is the global_nav_state Angular service, and I couldn't actually find any consumers of this Angular service!

The locked state of the side nav affects the width of the main content area. When the nav is locked this content area is narrowed and when it's not locked the content area is widened. However, apps in the content area could own absolutely-positioned components like the bottom bar. These components are not affected by the resizing mechanism, potentially causing them to overlap the chrome. Here's an example of the bottom bar overlapping the side nav and obscuring the expand/collapse button:

image

I should have put all of this in the PR description -- my apologies!

My intention is to solve this problem by allowing apps to subscribe to the change in locked state, and conditionally apply CSS to change the width of the bottom bar or other components. If the isCollapsed state does this already, then I'm on board with closing this PR in favor of using the existing API.

@joshdover
Copy link
Contributor

After taking a look at the code, it appears that the collapsed state is no longer used by any actual UI. Would you mind removing both the getIsCollapsed$() and setIsCollapsed() APIs in this PR?

@cjcenizal
Copy link
Contributor Author

@joshdover Done.

@cjcenizal
Copy link
Contributor Author

@joshdover Sorry, hold off a moment. I edited the files in data/.update_prs by accident. 🤕

@cjcenizal cjcenizal force-pushed the feature/broadcast-change-to-nav-drawer-locked-state branch from 82f675b to de7de40 Compare March 16, 2020 21:19
@cjcenizal cjcenizal force-pushed the feature/broadcast-change-to-nav-drawer-locked-state branch from de7de40 to 72a87ec Compare March 16, 2020 21:23
@cjcenizal
Copy link
Contributor Author

@joshdover OK I jumped the gun there but everything looks correct now. Can you take a look please?

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@cjcenizal
Copy link
Contributor Author

@elasticmachine merge upstream

@cjcenizal cjcenizal merged commit 4deea08 into elastic:master Mar 18, 2020
@cjcenizal cjcenizal deleted the feature/broadcast-change-to-nav-drawer-locked-state branch March 18, 2020 01:15
gmmorris added a commit to gmmorris/kibana that referenced this pull request Mar 18, 2020
* master:
  [ML] Re-enabling file upload telemetry (elastic#60418)
  [NP] Use local helper shortenDottedString for discover (elastic#60271)
  [Console] Fix for `_settings` and x-pack autocomplete (elastic#60246)
  Task/host enhancements (elastic#59671)
  [Search service] Asynchronous ES search strategy (elastic#53538)
  Index Action - Moved index params fields to connector config (elastic#60349)
  Edits UI text for ML nodes and job button (elastic#60184)
  Publish getIsNavDrawerLocked$ method on core chrome service. (elastic#60191)
  Disabled edit alert button on management ui for non registered UI alert types (elastic#60439)
  Revert "[Console] Fix bool filter autocompletions and refactor (elastic#60361)"
  [Console] Fix bool filter autocompletions and refactor (elastic#60361)
  Update ingest management team handle (elastic#60457)
  [IM] Use EuiCodeBlock to render index mapping (elastic#60420)
  Add additional safeguards for data source wizard step 2 (elastic#60426)
  [kbn/pm] don't fail when plugins are outside repo (elastic#60164)
  upgrade react-use (elastic#60427)
  Remove link to old settings (elastic#60326)
  Update app arch CODEOWNERS items. (elastic#60396)
  [ML] Fixing custom urls to dashboards (elastic#60355)
  Update the ems-client dependency to 7.7.0 (elastic#59936)
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 19, 2020
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 60191 or prevent reminders by adding the backport:skip label.

@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 19, 2020
cjcenizal added a commit that referenced this pull request Mar 19, 2020
…#60593)

* Remove isCollapsed, getIsCollapsed, and global_nav_state.
gmmorris added a commit to gmmorris/kibana that referenced this pull request Mar 19, 2020
…alerting/tls-warning

* 'alerting/tls-warning' of github.com:gmmorris/kibana: (33 commits)
  [ML] Disable functional transform tests
  Fixes to service map single node banner (elastic#60072)
  [Uptime] replace fetch with kibana http (elastic#59881)
  Upgrade @types/node to match Node.js runtime (elastic#60368)
  [License Management] NP migration (elastic#60250)
  Fix create alert button from not showing in alerts list (elastic#60444)
  [SIEM][Case] Update connector through flyout (elastic#60307)
  add data-test-subj where possible on SO management table (elastic#60226)
  Enforce `required` presence for value/key validation of `recordOf` and `mapOf`. (elastic#60406)
  [ML] Re-enabling file upload telemetry (elastic#60418)
  [NP] Use local helper shortenDottedString for discover (elastic#60271)
  [Console] Fix for `_settings` and x-pack autocomplete (elastic#60246)
  Task/host enhancements (elastic#59671)
  [Search service] Asynchronous ES search strategy (elastic#53538)
  Index Action - Moved index params fields to connector config (elastic#60349)
  Edits UI text for ML nodes and job button (elastic#60184)
  Publish getIsNavDrawerLocked$ method on core chrome service. (elastic#60191)
  Disabled edit alert button on management ui for non registered UI alert types (elastic#60439)
  Revert "[Console] Fix bool filter autocompletions and refactor (elastic#60361)"
  [Console] Fix bool filter autocompletions and refactor (elastic#60361)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants