-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
fix(sqllab): per-tab hide left bar #13288
Conversation
const leftBarStateClass = this.props.hideLeftBar | ||
? 'schemaPane-exit-done' | ||
: 'schemaPane-enter-done'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there's a bug in the library: reactjs/react-transition-group#643
Without this, if this.props.hideLeftBar
was initially set to true the bar wouldn't hide on page load.
Codecov Report
@@ Coverage Diff @@
## master #13288 +/- ##
===========================================
+ Coverage 69.48% 79.93% +10.45%
===========================================
Files 1050 298 -752
Lines 49755 24285 -25470
Branches 5322 0 -5322
===========================================
- Hits 34571 19413 -15158
+ Misses 15059 4872 -10187
+ Partials 125 0 -125
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@betodealmeida @hughhhh There seems to be a merge conflict in db-migration: https://github.com/apache/superset/runs/2042369464 |
* fix (sqllab): per-tab hide left bar * Load state when switching tabs
SUMMARY
Currently the state of whether we should show the left bar in SQL Lab is global, not per tab. Since this is configured separately in each tab menu, it makes sense to track the state individually.
This PR moves the state of the left bar to the query editor, using the redux store to toggle its display. If the
SQLLAB_BACKEND_PERSISTENCE
is enabled the visibility is stored on the backend as well.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
TEST PLAN
SQLLAB_BACKEND_PERSISTENCE
set to off.SQLLAB_BACKEND_PERSISTENCE
on, reload SQL Lab, verified that tabs' state was migrated to the backend.ADDITIONAL INFORMATION