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 2022/07/19 21:48:48 UTC

[GitHub] [superset] ktmud commented on a diff in pull request #20778: feat(dashboard): Make FilterBar width resizable

ktmud commented on code in PR #20778:
URL: https://github.com/apache/superset/pull/20778#discussion_r924983359


##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/index.tsx:
##########
@@ -85,6 +86,7 @@ const ActionButtonsContainer = styled.div`
 `;
 
 export const ActionButtons = ({
+  width,

Review Comment:
   ```suggestion
     width = OPEN_FILTER_BAR_WIDTH
   ```
   
   Nit: let's assign a default value as soon as possible



##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/ActionButtons/index.tsx:
##########
@@ -103,7 +105,7 @@ export const ActionButtons = ({
   );
 
   return (
-    <ActionButtonsContainer>
+    <ActionButtonsContainer data-test="filterbar-action-buttons" width={width || OPEN_FILTER_BAR_WIDTH}>

Review Comment:
   ```suggestion
       <ActionButtonsContainer data-test="filterbar-action-buttons" width={width}>
   ```
   
   No need for `||` is default value is assigned.



##########
superset-frontend/src/dashboard/constants.ts:
##########
@@ -37,6 +37,7 @@ export const PLACEHOLDER_DATASOURCE: Datasource = {
 export const MAIN_HEADER_HEIGHT = 53;
 export const CLOSED_FILTER_BAR_WIDTH = 32;
 export const OPEN_FILTER_BAR_WIDTH = 260;

Review Comment:
   Maybe rename this to `OPEN_FILTER_BAR_DEFAULT_WIDTH`?



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

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