Skip to content

Add table list view to space selector screen#229046

Merged
ryankeairns merged 5 commits intomainfrom
rk/113050-space-selector-page
Jul 28, 2025
Merged

Add table list view to space selector screen#229046
ryankeairns merged 5 commits intomainfrom
rk/113050-space-selector-page

Conversation

@ryankeairns
Copy link
Contributor

@ryankeairns ryankeairns commented Jul 23, 2025

Closes #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)
CleanShot 2025-07-22 at 16 00 35@2x

Card view (after)
CleanShot 2025-07-22 at 20 01 45@2x

Table view (new)
CleanShot 2025-07-22 at 20 02 31@2x

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, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests 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
  • 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 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
  • Review the backport guidelines 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.

@ryankeairns ryankeairns marked this pull request as ready for review July 23, 2025 14:50
@ryankeairns ryankeairns requested a review from a team as a code owner July 23, 2025 14:50
@elena-shostak elena-shostak self-requested a review July 24, 2025 12:33
Copy link
Contributor

@elena-shostak elena-shostak left a comment

Choose a reason for hiding this comment

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

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>
);
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use EuiTextTruncate component? It also supports truncationPosition if we need to customize it further

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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:

  1. DOM Nesting Violation: EuiTextTruncate creates block-level <div> elements, which caused invalid HTML structure when used within EuiCard descriptions (which render as <p> elements). This generated browser console warnings: validateDOMNesting(...): <div> cannot appear as a descendant of <p>.
  2. Table Rendering Issues: EuiTextTruncate had compatibility problems within EuiBasicTable context, causing descriptions to not display properly in the table view.
@ryankeairns
Copy link
Contributor Author

Thanks @elena-shostak , I'll give these a go!

Copy link
Contributor

@elena-shostak elena-shostak left a comment

Choose a reason for hiding this comment

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

LGTM

@ryankeairns ryankeairns added backport:skip This PR does not require backporting and removed backport:prev-minor labels Jul 28, 2025
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
spaces 237 238 +1

Async chunks

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

id before after diff
spaces 209.4KB 214.4KB +5.0KB

History

@ryankeairns ryankeairns merged commit 82ee8cb into main Jul 28, 2025
15 checks passed
@ryankeairns ryankeairns deleted the rk/113050-space-selector-page branch July 28, 2025 16:23
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)
- [ ] ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:enhancement v9.2.0

3 participants