bito-code-review[bot] commented on PR #42548:
URL: https://github.com/apache/superset/pull/42548#issuecomment-5114349847

   <!-- Bito Reply -->
   The flagged issue is correct. The current regression test renders both 
modals simultaneously with `show` set to true, which fails to simulate the 
production behavior where the `UnsavedChangesModal` is mounted while hidden and 
then opened later. This can mask issues with Ant Design's automatic z-index 
stacking.
   
   To resolve this, update the test to render the `UnsavedChangesModal` with 
`showModal={false}` initially, then use `rerender` to set `showModal={true}` 
after the other modal is already open. This ensures the test correctly 
exercises the open transition and portal insertion order.
   
   Would you like me to implement this fix for you? I can also check the other 
comments on this PR if you would like me to address them as well.
   
   
**superset-frontend/packages/superset-ui-core/src/components/UnsavedChangesModal/UnsavedChangesModal.test.tsx**
   ```
   const { rerender } = render(
       <>
         <Modal show title="Other open modal" onHide={() => {}} />
         <UnsavedChangesModal
           showModal={false}
           onHide={() => {}}
           handleSave={() => {}}
           onConfirmNavigation={() => {}}
         />
       </>,
     );
   
     rerender(
       <>
         <Modal show title="Other open modal" onHide={() => {}} />
         <UnsavedChangesModal
           showModal
           onHide={() => {}}
           handleSave={() => {}}
           onConfirmNavigation={() => {}}
         />
       </>,
     );
   ```


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