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

[EuiBasicTable] Better empty state #1221

Closed
snide opened this issue Sep 28, 2018 · 8 comments
Closed

[EuiBasicTable] Better empty state #1221

snide opened this issue Sep 28, 2018 · 8 comments
Labels
documentation Issues or PRs that only affect documentation - will not need changelog entries good first issue stale-issue stale-issue-closed

Comments

@snide
Copy link
Contributor

snide commented Sep 28, 2018

By default we should provide a better empty experience for tables.

image

@smhutch
Copy link
Contributor

smhutch commented Aug 5, 2020

Hey folks, 👋

I wanted to mention that this pattern would be very handy to support within data tables. In the project I'm working on, we have an abstraction above EuiBasicTable that replaces the entire table if empty. Something along these lines:

<Panel>
  {items.length ? (
    <ExampleEuiBasicTable {...otherEuiBasicTableProps} items={items} />
  ) : (
    <EuiEmptyPrompt
      title={someEmptyTitle}
      body={someEmptyBody}
      actions={someAction}
    />
  )}
</Panel>

It would be awesome if the EuiBasicTable could render something along these lines, controlled via props.

I see that some plans are being made within #3564 for this 🎉

@cchaos cchaos changed the title Better empty state for tables [EuiBasicTable] Better empty state Sep 19, 2020
@cchaos cchaos removed the tables label Sep 19, 2020
@github-actions
Copy link

👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

@snide
Copy link
Contributor Author

snide commented Mar 19, 2021

I'm going to label this a good first issue and provide some design advice for implementation. We should provide a new prop that allows for an empty state, but then also use EuiEmptyPrompt as a default for that prop. As mentioned in this issue earlier, we want to not show the table at all, including the column head and footer. We want to make sure this does hide the search bar or button controls if those items are tied to the table (otherwise you couldn't change the search to see items)

@cchaos
Copy link
Contributor

cchaos commented Mar 22, 2021

Hm.. I agree that we should make more use of the EuiEmptyPrompt, but we have to consider the different scenarios that result in no table rows. (Mainly for extra clarification)

1. Nothing exists, ever

Meaning, there isn't even any data to pull from, or the user never created one of these things. This is the perfect place to completely replace the table and table controls for EuiEmptyPrompt, because the consumer can give more details of what they should be doing on that page or how to create the thing.

To implement this, we'd probably want a new prop called emptyPrompt which just extends all the EuiEmptyPrompt props with some set defaults in case they don't care to configure it. But what are the defaults?

2. External search has narrowed the results to none

Meaning, "filtered" results wasn't using the built in search bar. In this instance, I think it's important to detail that the results are being filtered. Usually this is done by still showing the table's controls and columns with just a nice message in place of the rows.

To implement this, I'd assume we'd want to handle it similarly to the EuiSelectabeTemplateSitewide, where we just have props for customizing these messages. In particular this might be noFilteredResultsMessage.

The question though, is then how does the table itself know whether we're in scenario 1 or 2?

3. Results are narrowed to result in none using built-in controls

This is similar to how we'd want scenario 2 to display, but the table component should know that it is being filtered and show the right message.

@github-actions
Copy link

👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

@elizabetdev
Copy link
Contributor

I'll try to come with a solution and guidelines for all tables and data grid while working on #5026.

@cee-chen cee-chen added documentation Issues or PRs that only affect documentation - will not need changelog entries and removed skip-stale-check labels Apr 3, 2023
@github-actions
Copy link

👋 Hi there - this issue hasn't had any activity in 6 months. If the EUI team has not explicitly expressed that this is something on our roadmap, it's unlikely that we'll pick this issue up. We would sincerely appreciate a PR/community contribution if this is something that matters to you! If not, and there is no further activity on this issue for another 6 months (i.e. it's stale for over a year), the issue will be auto-closed.

Copy link

❌ Per our previous message, this issue is auto-closing after having been open and inactive for a year. If you strongly feel this is still a high-priority issue, or are interested in contributing, please leave a comment or open a new issue linking to this one for context.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues or PRs that only affect documentation - will not need changelog entries good first issue stale-issue stale-issue-closed
Projects
None yet
Development

No branches or pull requests

5 participants