-
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
[Spaces] Dynamically set the space disabled feature based on the space solution view #191927
[Spaces] Dynamically set the space disabled feature based on the space solution view #191927
Conversation
a20d349
to
935d17c
Compare
/ci |
/ci |
/ci |
Pinging @elastic/kibana-security (Team:Security) |
Pinging @elastic/appex-sharedux (Team:SharedUX) |
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.
I like the way you encapsulated and reused this new logic. Thanks for taking this on!
x-pack/plugins/spaces/server/lib/utils/space_solution_disabled_features.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/spaces/server/lib/utils/space_solution_disabled_features.test.ts
Show resolved
Hide resolved
x-pack/plugins/spaces/server/lib/utils/space_solution_disabled_features.test.ts
Show resolved
Hide resolved
…ure-visibility-from-solution
Thanks for the review @legrego ! 👍 I addressed the changes, can you have another look? Also, I was wondering if we should not also update the server client |
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @sebelga |
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, thank you!
Also, I was wondering if we should not also update the server client transformSavedObjectToSpace method so all consumer get the same dynamic values? And with that change I guess that the browser client would also then get updated array of disabled features. WDYT?
@sebelga I don't think we should do this, yet. One of the benefits of leaving it alone is that it allows a user to switch back to classic
, and retain their original set of disabledFeatures
. I'm sure there are ways to solve for this, but I'd rather not explore that unless there is a compelling reason to do so.
Mmmm.. but they would. This is just dynamic values that we set at runtime. What is stored in the SO would not be affected and when the user switches back to "classic" the array they had previously stored will be returned. With what I am suggesting we would be consistent accross all Kibana with that |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…e solution view (elastic#191927) (cherry picked from commit 735380a) # Conflicts: # x-pack/plugins/spaces/server/capabilities/capabilities_switcher.test.ts
In this PR I've dynamically set the space
disabledFeatures
based on the spacesolution
property.When a space
solution
is defined (and its value is not"classic"
), we want to automatically disable the features that belong to the other solutions. E.g. the spacesolution
is set tosecurity
, we add to thedisabledFeatures
array all the features that belong toobservability
orenterpriseSearch
.