msyavuz commented on code in PR #37891:
URL: https://github.com/apache/superset/pull/37891#discussion_r2811719156


##########
superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.test.tsx:
##########
@@ -395,6 +395,27 @@ test('shouldFocusMarkdown returns false when clicking 
outside markdown container
   expect(screen.queryByRole('textbox')).not.toBeInTheDocument();
 });
 
+test('should re-enter edit mode on a single click after clicking outside', 
async () => {
+  await setup({ editMode: true });
+
+  const markdownContainer = screen.getByTestId(
+    'dashboard-component-chart-holder',
+  );
+
+  // Click to enter edit mode
+  userEvent.click(markdownContainer);
+  expect(await screen.findByRole('textbox')).toBeInTheDocument();
+
+  // Click outside to exit edit mode
+  userEvent.click(document.body);
+  await new Promise(resolve => setTimeout(resolve, 50));

Review Comment:
   Is there a better way to do this? Something like `waitForDocumentToSettle`?



##########
superset-frontend/src/dashboard/components/dnd/DragDroppable.tsx:
##########
@@ -92,6 +92,15 @@ 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 */

Review Comment:
   Great reference for future reviewers!



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