-
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
Remove Space Selector from Serverless Top Navigation #164461
Remove Space Selector from Serverless Top Navigation #164461
Conversation
@azasypkin @thomheymann I wonder if it's better to do it the way i've done in this PR or pass a
|
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.
Looking good - just a few questions, don't hesitate to reach out if my comments aren't clear 😅
plugins.home.featureCatalogue.register(createSpacesFeatureCatalogueEntry()); | ||
} | ||
|
||
if (plugins.management) { | ||
if (plugins.management && !this.isServerless) { |
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.
questions: Should the spaceSelectorApp.create(...)
call below also be in a !isServerless
block?
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.
@kc13greiner I think you're right. I added the check just below this
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.
Awesome! Let's double check w/ @thomheymann
One additional nit: could the !isServerless
check be pulled out into a top level if statement
that wraps these blocks/statements?
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.
@kc13greiner Absolutely! Just updated!
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.
The spaces selector app exposes a route that can be accessed to view all spaces and to select a different space.
This is only linked to from the space selector and when deleting the current space as far as I can see so I think this can be safely disabled on serverless.
…ss in spaces plugin
Pinging @elastic/kibana-security (Team:Security) |
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.
LGTM!
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.
Overall looks great. Just two things.
- I was confused about the tests regarding the spaces API. Don't these test just check whether the space selector application is registered?
2. I think we should augment the serverless test suite to confirm the UI layout does not include the space selector. Maybe in As discussed in our sync, we don't really need this - too short term, and does not add value. Sorry about that.x-pack/test_serverless/functional/page_objects/svl_common_page.ts
@@ -33,7 +37,23 @@ describe('Spaces plugin', () => { | |||
); | |||
}); | |||
|
|||
it('should register the management and feature catalogue sections when the management and home plugins are both available', () => { | |||
it('should not register the spaces API and the space selector app when buildFlavor is serverless', () => { |
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.
What is meant by spaces API here? Doesn't this test confirm only the space selector app registration?
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.
@jeramysoucy You're right! I changed the label to make it clear. It should say spaces routes
and not API
.
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.
@SiddharthMantri The same wording is used on line 20.
const createPluginInitializerContextMock = (config: unknown = {}) => { | ||
const createPluginInitializerContextMock = ( | ||
config: unknown = {}, | ||
{ buildFlavor = 'serverless' }: { buildFlavor?: BuildFlavor } = {} |
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.
For UI-only changes, using the config should be ok although core now has an elasticsearch capabilities API that gets info from the cluster directly.
The new API is better than using a config flag because KIbana's sometimes run against a stateful ES instance. @pgayvallet is the capabilities API meant to be used instead?
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.
Yea, this is fine.
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.
LGTM
const createPluginInitializerContextMock = (config: unknown = {}) => { | ||
const createPluginInitializerContextMock = ( | ||
config: unknown = {}, | ||
{ buildFlavor = 'serverless' }: { buildFlavor?: BuildFlavor } = {} |
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.
Yea, this is fine.
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Page load bundle
History
To update your PR or re-run it, just comment with: |
Closes #163024
Summary
For Serverless projects, there will be only a single default space, with no way to create/select additional spaces. For this reason, the spaces navigation control has been removed for serverless only
Changes Made
buildFlavor
in the Serverless pluginUI Changes
Release Notes
Security
Removed the space selector from the Serverless UI. #163024