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


   ### SUMMARY
   When query returned no results, we were showing a large empty state 
component in chart container on the dashboard, regardless of container's size. 
If the container was small, the empty state was overflowing. This PR fixes that 
behaviour by replacing large empty state with a small one if chart's width is 
smaller than 300px or if chart's height is smaller than 220px.
   Also, I removed chart empty state's description if it's displayed on the 
dashboard - the description will be displayed only on Explore page.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   Before:
   
   <img width="1792" alt="image" 
src="https://user-images.githubusercontent.com/15073128/157640833-1807023c-d423-4a4d-90cc-247c17f5036e.png";>
   
   After:
   
   <img width="1791" alt="image" 
src="https://user-images.githubusercontent.com/15073128/157640724-dafda228-4379-4e05-ad3b-9e14d11135be.png";>
   
   
   ### TESTING INSTRUCTIONS
   1. Create a dashboard with large and small charts
   2. Add a filter that filters out all results
   3. Verify that the empty state is not overflowing in any chart
   4. Verify that the empty state has only image and title
   5. Click "View chart in Explore"
   6. Verify that empty state has an image, title and description
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to