Antonio-RiveroMartnez commented on code in PR #33054:
URL: https://github.com/apache/superset/pull/33054#discussion_r2038961294


##########
superset-frontend/src/components/DropdownContainer/index.tsx:
##########
@@ -179,6 +179,46 @@ const DropdownContainer = forwardRef(
       [items, overflowingIndex],
     );
 
+    useEffect(() => {
+      const container = current?.children.item(0);
+      if (!container) return;
+
+      const childrenArray = Array.from(container.children);
+
+      const resizeObserver = new ResizeObserver(() => {
+        recalculateItemWidths();
+      });
+
+      for (const child of childrenArray) {

Review Comment:
   nit: childrenArray.map(...)



##########
superset-frontend/src/components/DropdownContainer/index.tsx:
##########
@@ -179,6 +179,46 @@ const DropdownContainer = forwardRef(
       [items, overflowingIndex],
     );
 
+    useEffect(() => {
+      const container = current?.children.item(0);
+      if (!container) return;
+
+      const childrenArray = Array.from(container.children);
+
+      const resizeObserver = new ResizeObserver(() => {
+        recalculateItemWidths();
+      });
+
+      for (const child of childrenArray) {
+        resizeObserver.observe(child);
+      }
+
+      // eslint-disable-next-line consistent-return
+      return () => {
+        for (const child of childrenArray) {

Review Comment:
   same nit from above.



##########
superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx:
##########
@@ -77,6 +94,33 @@ function reducer(draft: DataMask, action: DataMaskAction) {
   }
 }
 
+const CheckBoxControlWrapper = styled.div`
+  display: flex;
+  align-items: center;
+  gap: 8px;

Review Comment:
   Do we have these sizes in our theme?



##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx:
##########
@@ -164,7 +184,12 @@ const useFilterControlDisplay = (
       }
       return {
         FilterControlContainer: HorizontalFilterControlContainer,
-        FormItem: HorizontalFormItem,
+        FormItem: (props: any) => (

Review Comment:
   do we know the type of these props? so we avoid having `any`



##########
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx:
##########
@@ -142,7 +144,24 @@ const HorizontalFormItem = styled(StyledFormItem)`
   }
 
   .ant-form-item-control {
-    width: ${({ theme }) => theme.gridUnit * 41}px;
+    width: ${({ theme, showExcludeSelection }) =>
+      showExcludeSelection ? theme.gridUnit * 41 * 2 : theme.gridUnit * 41}px;
+  }
+
+  .ant-form-item-control-input-content {
+    ${({ showExcludeSelection }) => showExcludeSelection && 'display: flex;'}
+  }
+
+  .select-container {
+    ${({ showExcludeSelection, theme }) =>
+      showExcludeSelection &&
+      `
+      width: ${theme.gridUnit * 41}px;

Review Comment:
   I see `theme.gridUnit * 41` multiple times, should this be a const somewhere?



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