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

Remove Space Selector from Serverless Top Navigation #163024

Closed
sixstringcode opened this issue Aug 2, 2023 · 2 comments · Fixed by #164461
Closed

Remove Space Selector from Serverless Top Navigation #163024

sixstringcode opened this issue Aug 2, 2023 · 2 comments · Fixed by #164461
Assignees
Labels
NeededFor:SharedUX Project:Serverless Work as part of the Serverless project for its initial release Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!

Comments

@sixstringcode
Copy link

sixstringcode commented Aug 2, 2023

For Serverless projects, there will be only a single default space, with no way to create/select additional spaces. We should remove the space icon from the top navigation for serverless projects only.

image

@sixstringcode sixstringcode added Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) Project:Serverless Work as part of the Serverless project for its initial release labels Aug 2, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@Dosant Dosant self-assigned this Aug 3, 2023
@Dosant
Copy link
Contributor

Dosant commented Aug 3, 2023

It looks like this is configured purely by spaces code here:

initSpacesNavControl(this.spacesManager, core);

@elastic/kibana-security, I think it would make more sense for you to pick this up, as you'll know better how do you want to structure this in your code. Maybe a kibana.yml which would hide space-related controls (not sure if there are others), similar to this one:

allowFeatureVisibility: schema.conditional(
schema.contextRef('serverless'),
true,
schema.literal(false),
schema.boolean({
validate: (rawValue) => {
// This setting should not be configurable on-prem to avoid bugs when e.g. existing spaces
// have feature visibility customized but admins would be unable to change them back if the
// UI/APIs are disabled.
if (rawValue === false) {
return 'Feature visibility can only be disabled on serverless';
}
},
defaultValue: true,
})

Or maybe you have plans to disable spaces altogether in serverless?

@azasypkin azasypkin added Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! NeededFor:SharedUX and removed Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) labels Aug 4, 2023
SiddharthMantri added a commit that referenced this issue Aug 30, 2023
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
- Added isServerless boolean flag to depend on the plugin context
`buildFlavor` in the Serverless plugin
- Based on the flag
    - Disabled rendering of spaces nav control
    - Disabled the space management route
    - Disabled adding spaces to feature catalogue
- Updated plugin tests to check for serverless or traditional build
flavors

## UI Changes
|  Before | After   |
|---|---|
| <img width="280" alt="image"
src="https://github.com/elastic/kibana/assets/1442420/e18367ba-adcc-4e3d-ac7a-d45d8993f67a">
| <img width="280" alt="image"
src="https://github.com/elastic/kibana/assets/1442420/d51bb61b-4314-4977-a358-c7182eb9fecc">
|


## Release Notes
Security
Removed the space selector from the Serverless UI.
#163024

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeededFor:SharedUX Project:Serverless Work as part of the Serverless project for its initial release Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants