Skip to content

Conversation

@jeremy-davis-sonarsource
Copy link
Contributor

@jeremy-davis-sonarsource jeremy-davis-sonarsource commented Jan 22, 2026

The easiest way to test this in SQ is to render a Modal that generates a toast anywhere in the app!

<Modal
          content={
            <Button
              onClick={() =>
                toast.error({ description: 'interact with me', isDismissable: true, duration: 'infinite',
                })
              }
            >
              toast!
            </Button>
          }
        >
          <Button>modal!</Button>
        </Modal>

@netlify
Copy link

netlify bot commented Jan 22, 2026

Deploy Preview for echoes-react ready!

Name Link
🔨 Latest commit 3ab8e31
🔍 Latest deploy log https://app.netlify.com/projects/echoes-react/deploys/6971fa3356185e0008ad1cdc
😎 Deploy Preview https://deploy-preview-614--echoes-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@hashicorp-vault-sonar-prod
Copy link

hashicorp-vault-sonar-prod bot commented Jan 22, 2026

ECHOES-891

@sonarqube-next
Copy link


const ModalPortalRefContext = createContext<ModalPortalContextValue | null>(null);

export function ModalPortal({ children }: Readonly<PropsWithChildren>) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NP: as ModalPortal is the "meat" of this file IMO and is imported directly, I feel the file should be called ModalPortal.tsx - WDYT?

toast!
</Button>
}
description="Clicking on the button will add a toast message. This shows that they appear on top and can be interacted with without closing the modal"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pressing Esc still closes the modal and not the toast. This was already the case: toasts don't respond to Esc, but I'm now wondering if they should? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants