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

   
   ### SUMMARY
   1. Undefined error when creating a chart from a query
   When you run a query in SQL Lab and click "Create chart", the query is used 
as a datasource in Explore. Then when you click on "Query preview" in 
datasource control menu (on the left side), the control crashes with undefined 
error. Even if it didn't crash, we'd see an infinite load for the formatted 
query, because we were trying to call the /dataset endpoint, passing the 
query's id as dataset's id, which of course might not exist. 
   This PR refactors the logic of `ViewQuery` component by using the data 
already available in Redux and only calling /dataset when it's not available.
   
   2. Visual fixes
   - 3 primary buttons next to each others in query preview modals: in Explore, 
Saved Queries and Query History viewes
   - Query Running/Failed icons in Query History view were very small
   - Query Preview modal in Query History view had weird spacings and tabs were 
cut off at the bottom
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   Before:
   
   <img width="376" height="734" alt="image" 
src="https://github.com/user-attachments/assets/9337c6a9-87ee-4746-ab0a-efc2197e8a67";
 />
   
   <img width="83" height="776" alt="image" 
src="https://github.com/user-attachments/assets/ea8a1048-a902-4af7-b4d7-b2b601e1e764";
 />
   
   <img width="758" height="484" alt="image" 
src="https://github.com/user-attachments/assets/f5a56ede-8c0e-421c-8fd1-5062a06b494e";
 />
   
   
   After:
   
   <img width="1719" height="853" alt="image" 
src="https://github.com/user-attachments/assets/93b5178a-050b-4fcb-9bc4-80b2da2d7480";
 />
   
   <img width="114" height="725" alt="image" 
src="https://github.com/user-attachments/assets/773f9764-dc5f-46fb-956b-7899fd3f7223";
 />
   
   <img width="702" height="500" alt="image" 
src="https://github.com/user-attachments/assets/bf97763f-7a28-4e6b-bf3c-799bc416fd4e";
 />
   
   
   ### TESTING INSTRUCTIONS
   1. Run a valid query in SQL Lab
   2. Click "Create chart"
   3. In Explore, click on 3 dots next to datasource's name and click "Query 
Preview"
   4. Verify that the modal opens, the query is displayed, the formatting 
works, and the formatting toggle works
   5. Go to Query History page
   6. Verify that the status icons on the left side have consistent sizes
   7. Verify that Query preview modal has 2 secondary buttons and 1 primary 
button and the "User query"/"Executed query" buttons are not cut off
   
   ### 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
   


-- 
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-unsubscr...@superset.apache.org

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


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

Reply via email to