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

Grid: empty state message #5719

Open
11 of 12 tasks
rolfsmeds opened this issue May 6, 2024 · 3 comments
Open
11 of 12 tasks

Grid: empty state message #5719

rolfsmeds opened this issue May 6, 2024 · 3 comments
Labels
acceptance criteria used for the acceptance criteria checklist DS Design System feature (e.g. component) V24.5

Comments

@rolfsmeds
Copy link
Collaborator

rolfsmeds commented May 6, 2024

Description

A way to provide a message or other custom content in the Grid when there is no data to display. (This could be either because the data set is empty, or because the currently applied filters omit all the available data.)

Acceptance criteria

  • API for providing a function that returns a string/component/html to be shown when the Grid is empty, based on custom logic to determine what content to return (e.g. depending on whether the emptiness is due to filters or something else)
  • The content is rendered into light DOM
  • The content is rendered either before the <table> element, or in a single, grid-viewport-width cell in its body.
  • The empty state content container can be targeted for styling through a part name or similar (e.g. ::part(empty-state))

Feature request issue: vaadin/web-components#2043

Visual design

The default plaintext message is rendered with

  • Secondary text color
  • Slightly increased vertical padding (--lumo-space-m) compared to cell content
image

General criteria

  • APIs reviewed
  • Design : included in AC.

  • Performance

  • UX/DX tests in Alpha
  • Documentation:
  • How to test?
  • Limitations:

Security

  • Security implications have been taken into account (elaborate or link to product security requirement specification if there are implications)
@rolfsmeds rolfsmeds added acceptance criteria used for the acceptance criteria checklist DS Design System feature (e.g. component) draft The acceptance criteria that is still WIP labels May 6, 2024
@knoobie
Copy link
Contributor

knoobie commented May 6, 2024

A common use case to be considered:

  • Lazy Loading Grid's where the initial server / query takes some time (multiple seconds) - normally (so far / until now) implemented with a custom class that adds for example a spinner to the Grid's body and removed that spinner / adds items later with an asynchronous Push callback

@rolfsmeds
Copy link
Collaborator Author

I think loading state is a separate concern (covered by this issue), as the default visual representation would probably be quite different. (The linked issue proposes using the loading property to apply custom styling for this in the meantime.)

@tomivirkki
Copy link
Member

This task is complete, except for the documentation part. The documentation PR can only be merged once the latest branch in docs uses 24.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acceptance criteria used for the acceptance criteria checklist DS Design System feature (e.g. component) V24.5
Projects
Status: September 2024 (24.5)
Development

No branches or pull requests

3 participants