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

   ### SUMMARY
   When the SQL Lab left sidebar is resized to zero width, it now collapses 
fully and shows a compact database/schema selector inline in the top toolbar 
instead of leaving an empty gap. Previously toggleLeftBar took a full 
QueryEditor object and only fired from the tab header's "hide sidebar" menu 
action, so resizing the sidebar to zero via drag didn't sync the hideLeftBar 
state. toggleLeftBar is now a thunk that reads the current active query editor 
from state and dispatches by queryEditorId, and AppLayout's resize handler 
calls it directly whenever the sidebar width hits zero. DatabaseSelector gains 
a compactMode prop (used only when sqlLabMode is set) that hides the 
catalog/schema selects, and SqlEditorLeftBar renders just the compact selector 
(wrapped for the schema/catalog popover) when collapsed. Also fixed a 
stale-width bug in useStoredSidebarWidth where a stored width of 0 was falsy 
and got skipped on restore.
   
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   
https://github.com/user-attachments/assets/cda018b1-1b48-4c29-82ec-e9d4b87803ee
   
   ### TESTING INSTRUCTIONS
   
   1. Open SQL Lab and drag the left sidebar divider all the way to the left 
until it collapses to zero width.
   2. Confirm the sidebar disappears and a compact database selector appears in 
the top toolbar instead.
   3. Drag the sidebar back open and confirm the compact selector disappears 
and the full sidebar (with schema/catalog dropdowns and table tree) returns.
   4. Reload the page after collapsing to zero width and confirm the collapsed 
state persists (tests the useStoredSidebarWidth fix for a stored width of 0).
   
   
   ### 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:
   - [x] 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: [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