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 2021/02/22 20:12:50 UTC

[GitHub] [superset] betodealmeida opened a new pull request #13288: fix (sqllab): per-tab hide left bar

betodealmeida opened a new pull request #13288:
URL: https://github.com/apache/superset/pull/13288


   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   
   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
   <!--- Skip this if not applicable -->
   
   N/A
   
   ### TEST PLAN
   <!--- What steps should be taken to verify the changes -->
   
   0. `SQLLAB_BACKEND_PERSISTENCE` set to off.
   1. Created a few tabs, changed their visibility, verified that visibility is defined per tabs and persists on page refresh.
   2. Turn `SQLLAB_BACKEND_PERSISTENCE` on, reload SQL Lab, verified that tabs' state was migrated to the backend.
   3. Toggle visibility, verified state is persisted in the backend and loaded correctly on page refresh and tab switch.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] 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.

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] hughhhh commented on a change in pull request #13288: fix(sqllab): per-tab hide left bar

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



##########
File path: superset-frontend/src/SqlLab/actions/sqlLab.js
##########
@@ -663,6 +664,36 @@ export function setActiveSouthPaneTab(tabId) {
   return { type: SET_ACTIVE_SOUTHPANE_TAB, tabId };
 }
 
+export function toggleLeftBar(queryEditor) {
+  const hideLeftBar = !queryEditor.hideLeftBar;
+  return function (dispatch) {
+    const sync = isFeatureEnabled(FeatureFlag.SQLLAB_BACKEND_PERSISTENCE)
+      ? SupersetClient.put({

Review comment:
       can we use `makeApi` here instead of `SupersetClient` directly
   
   https://github.com/apache/superset/blob/42ab57850de038bd1b08d7663cc3bb2dd3cd603e/superset-frontend/src/SqlLab/components/ResultSet.tsx#L327




----------------------------------------------------------------
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.

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] ktmud commented on pull request #13288: fix(sqllab): per-tab hide left bar

Posted by GitBox <gi...@apache.org>.
ktmud commented on pull request #13288:
URL: https://github.com/apache/superset/pull/13288#issuecomment-791724567


   @betodealmeida @hughhhh There seems to be a merge conflict in db-migration: https://github.com/apache/superset/runs/2042369464
   
   <img src="https://user-images.githubusercontent.com/335541/110176016-80e65d00-7db7-11eb-9246-c39674e5a403.png" width="600">
   


----------------------------------------------------------------
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.

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] betodealmeida commented on a change in pull request #13288: fix (sqllab): per-tab hide left bar

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



##########
File path: superset-frontend/src/SqlLab/components/SqlEditor.jsx
##########
@@ -710,14 +710,17 @@ class SqlEditor extends React.PureComponent {
         ? 'Specify name to CREATE VIEW AS schema in: public'
         : 'Specify name to CREATE TABLE AS schema in: public';
 
+    const leftBarStateClass = this.props.hideLeftBar
+      ? 'schemaPane-exit-done'
+      : 'schemaPane-enter-done';

Review comment:
       Looks like there's a bug in the library: https://github.com/reactjs/react-transition-group/issues/643
   
   Without this, if `this.props.hideLeftBar` was initially set to true the bar wouldn't hide on page load.




----------------------------------------------------------------
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.

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-io edited a comment on pull request #13288: fix(sqllab): per-tab hide left bar

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #13288:
URL: https://github.com/apache/superset/pull/13288#issuecomment-783670520


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=h1) Report
   > Merging [#13288](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=desc) (525f394) into [master](https://codecov.io/gh/apache/superset/commit/e8d50356a263617db584cc3c0effad1418bd34bc?el=desc) (e8d5035) will **increase** coverage by `10.45%`.
   > The diff coverage is `72.72%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13288/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=tree)
   
   ```diff
   @@             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     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `?` | |
   | python | `79.93% <72.72%> (+12.56%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/app.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXBwLnB5) | `81.36% <ø> (ø)` | |
   | [superset/views/sql\_lab.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3Mvc3FsX2xhYi5weQ==) | `60.68% <ø> (ø)` | |
   | [superset/viz.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdml6LnB5) | `56.32% <0.00%> (-0.16%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `79.95% <100.00%> (-6.15%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `90.76% <100.00%> (ø)` | |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `82.47% <100.00%> (-5.41%)` | :arrow_down: |
   | [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `85.01% <100.00%> (-3.88%)` | :arrow_down: |
   | [superset/models/sql\_lab.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL3NxbF9sYWIucHk=) | `91.21% <100.00%> (+0.05%)` | :arrow_up: |
   | [superset/views/core.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `71.80% <100.00%> (-3.58%)` | :arrow_down: |
   | [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
   | ... and [753 more](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=footer). Last update [a646914...525f394](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

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-io commented on pull request #13288: fix(sqllab): per-tab hide left bar

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #13288:
URL: https://github.com/apache/superset/pull/13288#issuecomment-783670520


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=h1) Report
   > Merging [#13288](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=desc) (79085a8) into [master](https://codecov.io/gh/apache/superset/commit/e8d50356a263617db584cc3c0effad1418bd34bc?el=desc) (e8d5035) will **increase** coverage by `10.43%`.
   > The diff coverage is `72.72%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13288/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #13288       +/-   ##
   ===========================================
   + Coverage   69.48%   79.91%   +10.43%     
   ===========================================
     Files        1050      298      -752     
     Lines       49755    24257    -25498     
     Branches     5322        0     -5322     
   ===========================================
   - Hits        34571    19386    -15185     
   + Misses      15059     4871    -10188     
   + Partials      125        0      -125     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `?` | |
   | python | `79.91% <72.72%> (+12.54%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/app.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXBwLnB5) | `81.36% <ø> (ø)` | |
   | [superset/views/sql\_lab.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3Mvc3FsX2xhYi5weQ==) | `60.68% <ø> (ø)` | |
   | [superset/viz.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdml6LnB5) | `56.32% <0.00%> (-0.16%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `79.95% <100.00%> (-6.15%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `90.76% <100.00%> (ø)` | |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `82.47% <100.00%> (-5.41%)` | :arrow_down: |
   | [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `85.01% <100.00%> (-3.88%)` | :arrow_down: |
   | [superset/models/sql\_lab.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL3NxbF9sYWIucHk=) | `91.21% <100.00%> (+0.05%)` | :arrow_up: |
   | [superset/views/core.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `71.80% <100.00%> (-3.58%)` | :arrow_down: |
   | [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
   | ... and [760 more](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=footer). Last update [a646914...79085a8](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

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-io edited a comment on pull request #13288: fix(sqllab): per-tab hide left bar

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #13288:
URL: https://github.com/apache/superset/pull/13288#issuecomment-783670520


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=h1) Report
   > Merging [#13288](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=desc) (525f394) into [master](https://codecov.io/gh/apache/superset/commit/e8d50356a263617db584cc3c0effad1418bd34bc?el=desc) (e8d5035) will **increase** coverage by `10.45%`.
   > The diff coverage is `72.72%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13288/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #13288       +/-   ##
   ===========================================
   + Coverage   69.48%   79.93%   +10.45%     
   ===========================================
     Files        1050      298      -752     
     Lines       49755    24283    -25472     
     Branches     5322        0     -5322     
   ===========================================
   - Hits        34571    19411    -15160     
   + Misses      15059     4872    -10187     
   + Partials      125        0      -125     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `?` | |
   | python | `79.93% <72.72%> (+12.55%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/app.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXBwLnB5) | `81.36% <ø> (ø)` | |
   | [superset/views/sql\_lab.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3Mvc3FsX2xhYi5weQ==) | `60.68% <ø> (ø)` | |
   | [superset/viz.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdml6LnB5) | `56.32% <0.00%> (-0.16%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `79.95% <100.00%> (-6.15%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `90.76% <100.00%> (ø)` | |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `82.47% <100.00%> (-5.41%)` | :arrow_down: |
   | [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `85.01% <100.00%> (-3.88%)` | :arrow_down: |
   | [superset/models/sql\_lab.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL3NxbF9sYWIucHk=) | `91.21% <100.00%> (+0.05%)` | :arrow_up: |
   | [superset/views/core.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `71.80% <100.00%> (-3.58%)` | :arrow_down: |
   | [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
   | ... and [754 more](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=footer). Last update [a646914...525f394](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

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] betodealmeida merged pull request #13288: fix(sqllab): per-tab hide left bar

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


   


----------------------------------------------------------------
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.

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] betodealmeida commented on a change in pull request #13288: fix(sqllab): per-tab hide left bar

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



##########
File path: superset-frontend/src/SqlLab/actions/sqlLab.js
##########
@@ -663,6 +664,36 @@ export function setActiveSouthPaneTab(tabId) {
   return { type: SET_ACTIVE_SOUTHPANE_TAB, tabId };
 }
 
+export function toggleLeftBar(queryEditor) {
+  const hideLeftBar = !queryEditor.hideLeftBar;
+  return function (dispatch) {
+    const sync = isFeatureEnabled(FeatureFlag.SQLLAB_BACKEND_PERSISTENCE)
+      ? SupersetClient.put({

Review comment:
       @hughhhh I'd rather leave this consistent with the rest of the code that manages `SQLLAB_BACKEND_PERSISTENCE`, if that's ok, until we have time to refactor the whole thing. Then we could maybe create a custom hook to manage the whole state.




----------------------------------------------------------------
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.

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] hughhhh commented on a change in pull request #13288: fix(sqllab): per-tab hide left bar

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



##########
File path: superset-frontend/src/SqlLab/actions/sqlLab.js
##########
@@ -663,6 +664,36 @@ export function setActiveSouthPaneTab(tabId) {
   return { type: SET_ACTIVE_SOUTHPANE_TAB, tabId };
 }
 
+export function toggleLeftBar(queryEditor) {
+  const hideLeftBar = !queryEditor.hideLeftBar;
+  return function (dispatch) {
+    const sync = isFeatureEnabled(FeatureFlag.SQLLAB_BACKEND_PERSISTENCE)
+      ? SupersetClient.put({

Review comment:
       can we use `makeApi` here instead of `SupersetClient` directly




----------------------------------------------------------------
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.

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-io edited a comment on pull request #13288: fix(sqllab): per-tab hide left bar

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #13288:
URL: https://github.com/apache/superset/pull/13288#issuecomment-783670520


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=h1) Report
   > Merging [#13288](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=desc) (79085a8) into [master](https://codecov.io/gh/apache/superset/commit/e8d50356a263617db584cc3c0effad1418bd34bc?el=desc) (e8d5035) will **increase** coverage by `10.45%`.
   > The diff coverage is `72.72%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13288/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=tree)
   
   ```diff
   @@             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     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `?` | |
   | python | `79.93% <72.72%> (+12.56%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/app.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXBwLnB5) | `81.36% <ø> (ø)` | |
   | [superset/views/sql\_lab.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3Mvc3FsX2xhYi5weQ==) | `60.68% <ø> (ø)` | |
   | [superset/viz.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdml6LnB5) | `56.32% <0.00%> (-0.16%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `79.95% <100.00%> (-6.15%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `90.76% <100.00%> (ø)` | |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `82.47% <100.00%> (-5.41%)` | :arrow_down: |
   | [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `85.01% <100.00%> (-3.88%)` | :arrow_down: |
   | [superset/models/sql\_lab.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL3NxbF9sYWIucHk=) | `91.21% <100.00%> (+0.05%)` | :arrow_up: |
   | [superset/views/core.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `71.80% <100.00%> (-3.58%)` | :arrow_down: |
   | [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
   | ... and [753 more](https://codecov.io/gh/apache/superset/pull/13288/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=footer). Last update [a646914...79085a8](https://codecov.io/gh/apache/superset/pull/13288?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

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