Spaces - Client NP Migration, Phase 1#40856
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| spacesEnabled, | ||
| }; | ||
|
|
||
| if (spacesEnabled) { |
There was a problem hiding this comment.
stray code, was not being used in TememetryForm component
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
💚 Build Succeeded |
💚 Build Succeeded |
💚 Build Succeeded |
| import { SpaceCards } from '../components/space_cards'; | ||
|
|
||
| interface Props { | ||
| spaces?: Space[]; |
There was a problem hiding this comment.
If this.props.spaces was provided, it was via injected variables, which have been removed as part of this PR. Now, the selector screen must request the list of spaces on mount.
| ); | ||
| }; | ||
|
|
||
| private rendePlaceholderMenuItem = (key: string | number): JSX.Element => { |
There was a problem hiding this comment.
Not strictly required as part of this migration, but it makes for a better user experience when loading the list of available spaces. We often take the near-immediate responses for granted when running locally, and forget that these things can take a noticeable amount of time when hosted in the real world.
There was a problem hiding this comment.
++, it actually looks very nice (testing with throttled network connection) 👍
| private rendePlaceholderMenuItem = (key: string | number): JSX.Element => { | |
| private rendePlaceholderMenuItem = (key: string | number) => { |
|
Pinging @elastic/kibana-security |
💔 Build Failed |
|
retest |
|
@afgomez thanks so much for testing and leaving feedback! I updated the hook locally to return I'll give this some more thought, but I'm learning towards re-introducing the |
@legrego that should be OK. We will take it into account :) Thanks! |
|
@afgomez I restored the original functionality, and the log analysis UI appears to function correctly for me now. Would you mind double-checking for me when you get a chance? |
|
@elasticmachine merge upstream |
…o np/spaces-nav-control
azasypkin
left a comment
There was a problem hiding this comment.
Looks great, thanks for doing this! I've played with a number of basic Spaces related operations - everything worked as expected.
|
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* Spaces - Client NP Migration, Phase 1 (#40856) * shimming NP for spaces client-side plugin * refresh active space in nav control when updated * fix advanced settings screen * allow npStart from unauthed routes * use NP for deriving space management url * remove security's usage of SpacesManager * remove usages of ui/capabilities * fix tests * implement NP plugin interface * remove hack in favor of convention in migration guide * shim feature catalogue registration * streamline nav control, and handle async loading more gracefully * adding opaqueId * fixes from merge * fix merge from master * fixing merge from master * move _active_space route to NP * moving to the NP feature catalogue registry * moving setup to setup phase * optimizing active space retrieval * reverting test isolation change * Apply suggestions from code review Co-Authored-By: Aleh Zasypkin <aleh.zasypkin@gmail.com> * removing unnecessary PluginInitializerContext * updating advanced settings subtitle * using NP anonymousPaths service * additional nav_control_popover cleanup * additional cleanup * testing out onActiveSpaceChange$ property * make the linter happy * make the type checker happy * fixing types * fix merge from master * spaces LP init should run on all pages, not just the kibana app * address nits * fix infra/logs, and the spaces disabled scenario * fix typescript errors * revert changes to infra plugin * reintroducing activeSpace injected var for legacy plugins * fixing react deprecation warning and unhandled promise rejection * restore activeSpace default var * spaces does not need to check its own enabled status * fix from merge Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> * fix backport merge
This reverts commit fcdaed9.
* shimming NP for spaces client-side plugin * refresh active space in nav control when updated * fix advanced settings screen * allow npStart from unauthed routes * use NP for deriving space management url * remove security's usage of SpacesManager * remove usages of ui/capabilities * fix tests * implement NP plugin interface * remove hack in favor of convention in migration guide * shim feature catalogue registration * streamline nav control, and handle async loading more gracefully * adding opaqueId * fixes from merge * fix merge from master * fixing merge from master * move _active_space route to NP * moving to the NP feature catalogue registry * moving setup to setup phase * optimizing active space retrieval * reverting test isolation change * Apply suggestions from code review Co-Authored-By: Aleh Zasypkin <aleh.zasypkin@gmail.com> * removing unnecessary PluginInitializerContext * updating advanced settings subtitle * using NP anonymousPaths service * additional nav_control_popover cleanup * additional cleanup * testing out onActiveSpaceChange$ property * make the linter happy * make the type checker happy * fixing types * fix merge from master * spaces LP init should run on all pages, not just the kibana app * address nits * fix infra/logs, and the spaces disabled scenario * fix typescript errors * revert changes to infra plugin * reintroducing activeSpace injected var for legacy plugins * fixing react deprecation warning and unhandled promise rejection * restore activeSpace default var * spaces does not need to check its own enabled status * fix from merge Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
This introduces a shim in the client-side spaces plugin to start migrating to the new platform.
This PR uses the following NP core/plugin services:
This PR also performs some ancillary cleanup/prep work for when the rest of the plugin is able to migrate:
SpacesNavState, an unnecessary angular servicehttpandnotifications)ui/capabilitieswith the NP equivalentResolves #46255
Out of scope