ktmud commented on a change in pull request #12593:
URL: https://github.com/apache/superset/pull/12593#discussion_r560368318



##########
File path: superset-frontend/src/explore/components/ExploreViewContainer.jsx
##########
@@ -404,7 +414,8 @@ function ExploreViewContainer(props) {
         />
       )}
       <Resizable
-        defaultSize={{ width: 300 }}
+        onResize={onResize}
+        defaultSize={{ width: exploreSidebarWidth }}

Review comment:
       I think the dataset pane and the controls pane should have separate 
widths. You might want to create a pair of small getter/setter functions to 
handle saving and reading both widths in one key safely.
   
   ```ts
   enum StorageKey  {
      sidebarWidth = "explore_sidebar_widths"
   }
   
   function getSidebarWidths() {
     try {
        return localStorage.getItem(StorageKey.siderbarWidth).split(":");
     } catch {}
     return [300, 320]
   }
   
   function setSidebarWidths(widths: number[]) {
     try {
       localStorage.setItem(StorageKey.siderbarWidth, widths.join(":"));
     } catch {}
   }
   ```




----------------------------------------------------------------
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:
[email protected]



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

Reply via email to