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

[Spaces Management] Fix issue with enabled features selection when space solution is unselected #194352

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tsullivan
Copy link
Member

@tsullivan tsullivan commented Sep 27, 2024

Summary

The feature PR for the new UX in Spaces Management introduced a new editing screen for Spaces. Inadvertently, it introduced a bug where the user's selection of visible features is ignored unless the user has explicitly selected a solution view. This PR fixes that issue as well as adds tests to prevent any future regressions.

Also, this PR fixes an issue where the space initials could be left blank, which was another regression.

Checklist

Delete any items that are not applicable to this PR.

@tsullivan tsullivan requested a review from a team as a code owner September 27, 2024 21:32
@tsullivan tsullivan added Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! release_note:skip Skip the PR/issue when compiling release notes v8.16.0 backport:version Backport to applied version labels labels Sep 27, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@tsullivan
Copy link
Member Author

return (
<>
{doShowAlteringActiveSpaceDialog()}
{doShowConfirmDeleteSpaceDialog()}

<CustomizeSpace
space={formValues}
space={getSpaceFromFormValues(formValues)}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ensures that default initials are used, if the space attributes doesn't have that field.

@@ -137,7 +143,7 @@ export const EditSpaceSettingsTab: React.FC<Props> = ({ space, features, history
setIsLoading(true);

let disabledFeatures: string[] | undefined;
if (spaceClone.solution === SOLUTION_VIEW_CLASSIC) {
if (spaceClone.solution == null || spaceClone.solution === SOLUTION_VIEW_CLASSIC) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the space was created via an API, then the solution field could be blank. The SpaceValidator treats that as a non-issue, and this code change follows that standard.

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#7029

[✅] x-pack/test/functional/apps/spaces/solution_view_flag_enabled/config.ts: 42/42 tests passed.

see run history

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #17 / FilterPopover renders button label correctly

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
spaces 256.8KB 257.1KB +292.0B

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants