Add table list view to space selector screen#229046
Merged
ryankeairns merged 5 commits intomainfrom Jul 28, 2025
Merged
Conversation
elena-shostak
requested changes
Jul 24, 2025
Contributor
elena-shostak
left a comment
There was a problem hiding this comment.
Great job!
Verified changes on desktop and mobile, left a couple of questions/nits
Comment on lines
97
to
107
| const needsTruncation = description.length > 100; | ||
| const displayDescription = needsTruncation ? description.substr(0, 100) + '…' : description; | ||
|
|
||
| return ( | ||
| <EuiTextColor color="subdued"> | ||
| <EuiText size="s" title={description}> | ||
| {displayDescription} | ||
| </EuiText> | ||
| </EuiTextColor> | ||
| ); | ||
| }; |
Contributor
There was a problem hiding this comment.
Can we use EuiTextTruncate component? It also supports truncationPosition if we need to customize it further
Contributor
Author
There was a problem hiding this comment.
Initial attempts to use EuiTextTruncate for consistent text truncation across both card and table views resulted in two critical problems. Here is a summary, as explained by AI:
- DOM Nesting Violation:
EuiTextTruncatecreates block-level<div>elements, which caused invalid HTML structure when used withinEuiCarddescriptions (which render as<p>elements). This generated browser console warnings:validateDOMNesting(...): <div> cannot appear as a descendant of <p>. - Table Rendering Issues:
EuiTextTruncatehad compatibility problems withinEuiBasicTablecontext, causing descriptions to not display properly in the table view.
x-pack/platform/plugins/shared/spaces/public/space_selector/components/space_table.tsx
Outdated
Show resolved
Hide resolved
x-pack/platform/plugins/shared/spaces/public/space_selector/components/space_table.tsx
Outdated
Show resolved
Hide resolved
x-pack/platform/plugins/shared/spaces/public/space_selector/space_selector.tsx
Outdated
Show resolved
Hide resolved
x-pack/platform/plugins/shared/spaces/public/space_selector/space_selector.tsx
Outdated
Show resolved
Hide resolved
x-pack/platform/plugins/shared/spaces/public/space_selector/space_selector.tsx
Outdated
Show resolved
Hide resolved
x-pack/platform/plugins/shared/spaces/public/space_selector/space_selector.tsx
Outdated
Show resolved
Hide resolved
Contributor
Author
|
Thanks @elena-shostak , I'll give these a go! |
Contributor
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
History
|
delanni
pushed a commit
to delanni/kibana
that referenced
this pull request
Aug 5, 2025
Closes elastic#113050 ## Summary Adds table list view to the space selector screen for a more scalable design when a user has many spaces. **Notes** - Card list remains and is default (when < 20 spaces) - If there are more then 20 spaces, the view defaults to table list - Adds solution badge to cards when available - Adds toggle to switch between card and table list view - Table defaults to 10 rows per page with 25, 50, and 100 options - Search works the same on both views ### Screenshots **Card view (before)** <img width="640" alt="CleanShot 2025-07-22 at 16 00 35@2x" src="https://github.com/user-attachments/assets/0b8ca767-10d0-4d5b-94d9-85b459c80f34" /> **Card view (after)** <img width="3576" height="2232" alt="CleanShot 2025-07-22 at 20 01 45@2x" src="https://github.com/user-attachments/assets/649aa537-8f4d-4bac-a9bf-60848b00bf47" /> **Table view (new)** <img width="3578" height="2050" alt="CleanShot 2025-07-22 at 20 02 31@2x" src="https://github.com/user-attachments/assets/78641f59-6e36-4440-a103-4f75e4854a93" /> **Future considerations** - Add filter for solution type - Add recents (last 5) - Make the table size a bit more dynamic (right now it fills the same section as the cards) ### 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) - [ ] ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #113050
Summary
Adds table list view to the space selector screen for a more scalable design when a user has many spaces.
Notes
Screenshots
Card view (before)

Card view (after)

Table view (new)

Future considerations
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesbackport:*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.