rusackas commented on code in PR #39460:
URL: https://github.com/apache/superset/pull/39460#discussion_r3358544766


##########
superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.tsx:
##########
@@ -760,11 +750,11 @@ const Chart = (props: ChartProps) => {
             },
             slice.viz_type,
           )}
-          queriesResponse={chart.queriesResponse ?? undefined}
+          queriesResponse={chart.queriesResponse ?? null}
           timeout={timeout}
           triggerQuery={chart.triggerQuery}
           vizType={slice.viz_type}
-          setControlValue={props.setControlValue}
+          setControlValue={props.setControlValue ?? (() => {})}

Review Comment:
   Good call — hoisted it to a module-level stable `NOOP` (next to 
`EMPTY_OBJECT`) so we don't allocate a new function each render and memoized 
children keep referential equality. Done in abccd67862.



##########
superset-frontend/src/dashboard/components/dnd/DragDroppable.tsx:
##########
@@ -92,15 +91,6 @@ const DragDroppableStyles = styled.div`
     &.dragdroppable-row {
       width: 100%;
     }
-    /* workaround to avoid a bug in react-dnd where the drag
-      preview expands outside of the bounds of the drag source card, see:
-      https://github.com/react-dnd/react-dnd/issues/832 */
-    &.dragdroppable-column {
-      /* for chrome */
-      transform: translate3d(0, 0, 0);
-      /* for safari */
-      backface-visibility: hidden;
-    }

Review Comment:
   Nice catch — we do still need it. That `translate3d`/`backface-visibility` 
block on `.dragdroppable-column` is the workaround for react-dnd#832 (drag 
preview spilling outside the source card in Chrome/Safari), and 
`.dragdroppable-column` is still used in this file. It was dropped here 
unintentionally — this PR is just the function-component conversion and there's 
no react-dnd upgrade to justify removing it — so I've restored it in abccd67862.



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