Resolve issue with spaces list displaying "no match" text on load#255654
Resolve issue with spaces list displaying "no match" text on load#255654eokoneyo merged 3 commits intoelastic:mainfrom
Conversation
|
/ci |
|
Pinging @elastic/appex-sharedux (Team:SharedUX) |
5d53076 to
679022b
Compare
|
@elasticmachine merge upstream |
| {renderListFilterControls()} | ||
| <Fragment> | ||
| {isLoading ? ( | ||
| <EuiLoadingSpinner size="xl" /> |
There was a problem hiding this comment.
Thanks for the fix! Space Selector definitely looks better now, but I see that the loading spinner isn't centered, is it something we can fix as well?
Screen.Recording.2026-03-06.at.13.06.35.mov
There was a problem hiding this comment.
Definitely... I'll make some changes for this
There was a problem hiding this comment.
Resolved in 36a8584 (this PR)
spaces_loader_centered.mov
9f2a403 to
36a8584
Compare
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Comment |
36a8584 to
1b8c7e9
Compare
|
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
Page load bundle
History
cc @eokoneyo |
azasypkin
left a comment
There was a problem hiding this comment.
Code LGTM with one minor nit. Tested locally, works as expected, thanks!
| /> | ||
| ); | ||
| }; | ||
| const onViewModeChange = useCallback((viewMode: ViewMode) => { |
There was a problem hiding this comment.
nit: I believe we can just use setCurrentViewMode as onChange handler directly.
There was a problem hiding this comment.
True... I think I'd rather leave it as is, it reads better in my opinion
|
Starting backport for target branches: 8.19, 9.2, 9.3 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
…astic#255654) ## Summary Closes elastic#255554 Fixes the issue where on loading the spaces selector, the user would get presented the text "No spaces match". This happened because of how the space selector component was structured. Now all content is gated behind a loading state, since we want to definitely display the available space if this screen is presented to the user, and it's only till the request to get the user's space resolves that we will display any content, this approach prevents the situation where the user is presented some false message that they have no spaces initially. _Note for reviewers_ - The space selector component has been refactored from class component to functional component - This change adopts react query for fetching the space list for the user. - Unit tests for the space selector component has been migrated from enzyme to RTL <!-- ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... --> --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…astic#255654) ## Summary Closes elastic#255554 Fixes the issue where on loading the spaces selector, the user would get presented the text "No spaces match". This happened because of how the space selector component was structured. Now all content is gated behind a loading state, since we want to definitely display the available space if this screen is presented to the user, and it's only till the request to get the user's space resolves that we will display any content, this approach prevents the situation where the user is presented some false message that they have no spaces initially. _Note for reviewers_ - The space selector component has been refactored from class component to functional component - This change adopts react query for fetching the space list for the user. - Unit tests for the space selector component has been migrated from enzyme to RTL <!-- ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... --> --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit 1be1053) # Conflicts: # x-pack/platform/plugins/shared/spaces/public/space_selector/__snapshots__/space_selector.test.tsx.snap
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…astic#255654) ## Summary Closes elastic#255554 Fixes the issue where on loading the spaces selector, the user would get presented the text "No spaces match". This happened because of how the space selector component was structured. Now all content is gated behind a loading state, since we want to definitely display the available space if this screen is presented to the user, and it's only till the request to get the user's space resolves that we will display any content, this approach prevents the situation where the user is presented some false message that they have no spaces initially. _Note for reviewers_ - The space selector component has been refactored from class component to functional component - This change adopts react query for fetching the space list for the user. - Unit tests for the space selector component has been migrated from enzyme to RTL <!-- ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... --> --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit 1be1053) # Conflicts: # x-pack/platform/plugins/shared/spaces/public/space_selector/__snapshots__/space_selector.test.tsx.snap
…ad (#255654) (#256981) # Backport This will backport the following commits from `main` to `9.2`: - [Resolve issue with spaces list displaying "no match" text on load (#255654)](#255654) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Eyo O. Eyo","email":"7893459+eokoneyo@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-03-09T13:33:16Z","message":"Resolve issue with spaces list displaying \"no match\" text on load (#255654)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/255554\n\nFixes the issue where on loading the spaces selector, the user would get\npresented the text \"No spaces match\". This happened because of how the\nspace selector component was structured.\n\nNow all content is gated behind a loading state, since we want to\ndefinitely display the available space if this screen is presented to\nthe user, and it's only till the request to get the user's space\nresolves that we will display any content, this approach prevents the\nsituation where the user is presented some false message that they have\nno spaces initially.\n\n_Note for reviewers_\n\n- The space selector component has been refactored from class component\nto functional component\n- This change adopts react query for fetching the space list for the\nuser.\n- Unit tests for the space selector component has been migrated from\nenzyme to RTL\n\n\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"1be1053112521429480a79b4eba6029bad7164a3","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:SharedUX","backport:all-open","v9.4.0"],"title":"Resolve issue with spaces list displaying \"no match\" text on load","number":255654,"url":"https://github.com/elastic/kibana/pull/255654","mergeCommit":{"message":"Resolve issue with spaces list displaying \"no match\" text on load (#255654)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/255554\n\nFixes the issue where on loading the spaces selector, the user would get\npresented the text \"No spaces match\". This happened because of how the\nspace selector component was structured.\n\nNow all content is gated behind a loading state, since we want to\ndefinitely display the available space if this screen is presented to\nthe user, and it's only till the request to get the user's space\nresolves that we will display any content, this approach prevents the\nsituation where the user is presented some false message that they have\nno spaces initially.\n\n_Note for reviewers_\n\n- The space selector component has been refactored from class component\nto functional component\n- This change adopts react query for fetching the space list for the\nuser.\n- Unit tests for the space selector component has been migrated from\nenzyme to RTL\n\n\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"1be1053112521429480a79b4eba6029bad7164a3"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/255654","number":255654,"mergeCommit":{"message":"Resolve issue with spaces list displaying \"no match\" text on load (#255654)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/255554\n\nFixes the issue where on loading the spaces selector, the user would get\npresented the text \"No spaces match\". This happened because of how the\nspace selector component was structured.\n\nNow all content is gated behind a loading state, since we want to\ndefinitely display the available space if this screen is presented to\nthe user, and it's only till the request to get the user's space\nresolves that we will display any content, this approach prevents the\nsituation where the user is presented some false message that they have\nno spaces initially.\n\n_Note for reviewers_\n\n- The space selector component has been refactored from class component\nto functional component\n- This change adopts react query for fetching the space list for the\nuser.\n- Unit tests for the space selector component has been migrated from\nenzyme to RTL\n\n\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"1be1053112521429480a79b4eba6029bad7164a3"}}]}] BACKPORT-->
…ad (#255654) (#256980) # Backport This will backport the following commits from `main` to `9.3`: - [Resolve issue with spaces list displaying "no match" text on load (#255654)](#255654) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Eyo O. Eyo","email":"7893459+eokoneyo@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-03-09T13:33:16Z","message":"Resolve issue with spaces list displaying \"no match\" text on load (#255654)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/255554\n\nFixes the issue where on loading the spaces selector, the user would get\npresented the text \"No spaces match\". This happened because of how the\nspace selector component was structured.\n\nNow all content is gated behind a loading state, since we want to\ndefinitely display the available space if this screen is presented to\nthe user, and it's only till the request to get the user's space\nresolves that we will display any content, this approach prevents the\nsituation where the user is presented some false message that they have\nno spaces initially.\n\n_Note for reviewers_\n\n- The space selector component has been refactored from class component\nto functional component\n- This change adopts react query for fetching the space list for the\nuser.\n- Unit tests for the space selector component has been migrated from\nenzyme to RTL\n\n\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"1be1053112521429480a79b4eba6029bad7164a3","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:SharedUX","backport:all-open","v9.4.0"],"title":"Resolve issue with spaces list displaying \"no match\" text on load","number":255654,"url":"https://github.com/elastic/kibana/pull/255654","mergeCommit":{"message":"Resolve issue with spaces list displaying \"no match\" text on load (#255654)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/255554\n\nFixes the issue where on loading the spaces selector, the user would get\npresented the text \"No spaces match\". This happened because of how the\nspace selector component was structured.\n\nNow all content is gated behind a loading state, since we want to\ndefinitely display the available space if this screen is presented to\nthe user, and it's only till the request to get the user's space\nresolves that we will display any content, this approach prevents the\nsituation where the user is presented some false message that they have\nno spaces initially.\n\n_Note for reviewers_\n\n- The space selector component has been refactored from class component\nto functional component\n- This change adopts react query for fetching the space list for the\nuser.\n- Unit tests for the space selector component has been migrated from\nenzyme to RTL\n\n\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"1be1053112521429480a79b4eba6029bad7164a3"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/255654","number":255654,"mergeCommit":{"message":"Resolve issue with spaces list displaying \"no match\" text on load (#255654)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/255554\n\nFixes the issue where on loading the spaces selector, the user would get\npresented the text \"No spaces match\". This happened because of how the\nspace selector component was structured.\n\nNow all content is gated behind a loading state, since we want to\ndefinitely display the available space if this screen is presented to\nthe user, and it's only till the request to get the user's space\nresolves that we will display any content, this approach prevents the\nsituation where the user is presented some false message that they have\nno spaces initially.\n\n_Note for reviewers_\n\n- The space selector component has been refactored from class component\nto functional component\n- This change adopts react query for fetching the space list for the\nuser.\n- Unit tests for the space selector component has been migrated from\nenzyme to RTL\n\n\n\n---------\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"1be1053112521429480a79b4eba6029bad7164a3"}}]}] BACKPORT-->
…astic#255654) ## Summary Closes elastic#255554 Fixes the issue where on loading the spaces selector, the user would get presented the text "No spaces match". This happened because of how the space selector component was structured. Now all content is gated behind a loading state, since we want to definitely display the available space if this screen is presented to the user, and it's only till the request to get the user's space resolves that we will display any content, this approach prevents the situation where the user is presented some false message that they have no spaces initially. _Note for reviewers_ - The space selector component has been refactored from class component to functional component - This change adopts react query for fetching the space list for the user. - Unit tests for the space selector component has been migrated from enzyme to RTL <!-- ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... --> --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
Closes #255554
Fixes the issue where on loading the spaces selector, the user would get presented the text "No spaces match". This happened because of how the space selector component was structured.
Now all content is gated behind a loading state, since we want to definitely display the available space if this screen is presented to the user, and it's only till the request to get the user's space resolves that we will display any content, this approach prevents the situation where the user is presented some false message that they have no spaces initially.
Note for reviewers