You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/03/29 12:42:53 UTC

[GitHub] [superset] kgabryje opened a new pull request #19408: feat(dashboard): Implement empty states for empty tabs

kgabryje opened a new pull request #19408:
URL: https://github.com/apache/superset/pull/19408


   ### SUMMARY
   Add empty state to dashboard tabs (top level and normal ones) if they contain no components
   
   1. Top level tabs - if user has dashboard edit permissions, they see an additional description and a button that triggers edit mode. In edit mode, text changes and button redirects to "add chart" page
   2. Regular tabs - if user has dashboard edit permissions, they see an additional description. The description contains a link button that triggers edit mode. In edit mode, text changes and the link button redirects to "add chart" page.
   
   Moreover, I added "Edit dashboard" button to 1 of old empty states (whole dashboard is empty) for consistency.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   https://user-images.githubusercontent.com/15073128/160612415-1aff4c5b-cdb6-4890-aeab-8fb556d50df8.mov
   
   ### TESTING INSTRUCTIONS
   1. Create a dashboard
   2. Add top level tabs
   3. Verify that empty state appears and button redirects to add chart
   4. Save dashboard and verify that text changed and the button redirects to edit mode
   5. Add normal tabs
   6. Verify that "top level" empty state disappears, instead there's an empty state in newly added tabs. A link button in description should redirect to add chart page.
   7. Save chart, verify that text changed and link button redirects to edit mode.
   8. Change user to a one withtout dashboard edit permissions, verify that descriptions/buttons don't appear
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] 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 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro commented on a change in pull request #19408: feat(dashboard): Implement empty states for empty tabs

Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #19408:
URL: https://github.com/apache/superset/pull/19408#discussion_r840547306



##########
File path: superset-frontend/src/dashboard/components/gridComponents/Tab.test.tsx
##########
@@ -54,8 +55,13 @@ jest.mock('src/dashboard/components/dnd/DragDroppable', () =>
     );
   }),
 );
+jest.mock('src/dashboard/actions/dashboardState', () => ({
+  setEditMode: jest.fn(() => ({
+    type: 'SET_EDIT_MODE',
+  })),
+}));
 
-const creteProps = () => ({
+const createProps = () => ({

Review comment:
       😆 
   <img width="462" alt="image" src="https://user-images.githubusercontent.com/33317356/161265617-7abbe998-2b25-41a8-b472-5ec8305c7ab8.png">
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] commented on pull request #19408: feat(dashboard): Implement empty states for empty tabs

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #19408:
URL: https://github.com/apache/superset/pull/19408#issuecomment-1084561444


   # [Codecov](https://codecov.io/gh/apache/superset/pull/19408?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#19408](https://codecov.io/gh/apache/superset/pull/19408?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8357c95) into [master](https://codecov.io/gh/apache/superset/commit/6b136c2bc9a6c9756e5319b045e3c42da06243cb?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6b136c2) will **increase** coverage by `0.00%`.
   > The diff coverage is `63.63%`.
   
   ```diff
   @@           Coverage Diff           @@
   ##           master   #19408   +/-   ##
   =======================================
     Coverage   66.57%   66.58%           
   =======================================
     Files        1675     1675           
     Lines       64092    64112   +20     
     Branches     6519     6531   +12     
   =======================================
   + Hits        42672    42688   +16     
   - Misses      19729    19733    +4     
     Partials     1691     1691           
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `51.27% <63.63%> (+0.01%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/19408?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...erset-frontend/src/components/EmptyState/index.tsx](https://codecov.io/gh/apache/superset/pull/19408/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvRW1wdHlTdGF0ZS9pbmRleC50c3g=) | `74.35% <ø> (+5.12%)` | :arrow_up: |
   | [...d/components/DashboardBuilder/DashboardBuilder.tsx](https://codecov.io/gh/apache/superset/pull/19408/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0Rhc2hib2FyZEJ1aWxkZXIvRGFzaGJvYXJkQnVpbGRlci50c3g=) | `70.88% <0.00%> (-1.85%)` | :arrow_down: |
   | [...rontend/src/dashboard/containers/DashboardGrid.jsx](https://codecov.io/gh/apache/superset/pull/19408/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb250YWluZXJzL0Rhc2hib2FyZEdyaWQuanN4) | `100.00% <ø> (ø)` | |
   | [...rontend/src/dashboard/components/DashboardGrid.jsx](https://codecov.io/gh/apache/superset/pull/19408/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0Rhc2hib2FyZEdyaWQuanN4) | `62.50% <50.00%> (-0.55%)` | :arrow_down: |
   | [...nd/src/dashboard/components/gridComponents/Tab.jsx](https://codecov.io/gh/apache/superset/pull/19408/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL1RhYi5qc3g=) | `83.67% <100.00%> (+3.18%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19408?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19408?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6b136c2...8357c95](https://codecov.io/gh/apache/superset/pull/19408?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] kgabryje merged pull request #19408: feat(dashboard): Implement empty states for empty tabs

Posted by GitBox <gi...@apache.org>.
kgabryje merged pull request #19408:
URL: https://github.com/apache/superset/pull/19408


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org