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

feat(dashboard): Implement empty states for dashboard #18712

Merged
merged 4 commits into from
Feb 14, 2022

Conversation

kgabryje
Copy link
Member

@kgabryje kgabryje commented Feb 14, 2022

SUMMARY

This PR implements chart empty states for 3 scenarios:

  1. Dashboard has no components added
  2. Dashboard is in edit mode and has no components added yet
  3. Native filters bar is empty

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

image

image

TESTING INSTRUCTIONS

  1. Create a dashboard
  2. Verify that there is an empty state in native filters bar when there are no native filters added
  3. Verify that there is an empty state in the middle of the dashboard when there are no components added
  4. Go to edit mode and verify that there is an empty state when there are no components added
  5. Click the button "Create a new chart" button in edit mode's empty state and verify that it redirects you to chart creator

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

CC @kasiazjc

https://app.shortcut.com/preset/story/37784/dashboard-empty-states

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

Minor comment. Tested, and feels much more intuitive than the current behavior!

@@ -35,7 +35,7 @@ export interface EmptyStateSmallProps {
}

export interface EmptyStateProps extends EmptyStateSmallProps {
buttonText?: string;
buttonText?: string | ReactNode;
Copy link
Member

Choose a reason for hiding this comment

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

Nit: I assume we can omit string here

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

@codecov
Copy link

codecov bot commented Feb 14, 2022

Codecov Report

Merging #18712 (8d833d5) into master (8d6aff3) will increase coverage by 0.01%.
The diff coverage is 52.17%.

❗ Current head 8d833d5 differs from pull request most recent head 89f113d. Consider uploading reports for the commit 89f113d to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18712      +/-   ##
==========================================
+ Coverage   66.32%   66.33%   +0.01%     
==========================================
  Files        1619     1619              
  Lines       62939    62954      +15     
  Branches     6341     6348       +7     
==========================================
+ Hits        41742    41762      +20     
+ Misses      19545    19537       -8     
- Partials     1652     1655       +3     
Flag Coverage Δ
javascript 51.32% <52.17%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...erset-frontend/src/components/EmptyState/index.tsx 35.89% <ø> (+35.89%) ⬆️
...nd/src/explore/components/DataTablesPane/index.tsx 73.68% <0.00%> (-1.59%) ⬇️
...d/components/DashboardBuilder/DashboardBuilder.tsx 75.29% <50.00%> (-1.25%) ⬇️
...board/components/nativeFilters/FilterBar/index.tsx 80.86% <50.00%> (-1.70%) ⬇️
...rontend/src/dashboard/components/DashboardGrid.jsx 63.04% <77.77%> (-2.08%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d6aff3...89f113d. Read the comment docs.

@kgabryje kgabryje merged commit f8b3ece into apache:master Feb 14, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels lts-v1 size/L 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants