Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Modal: mulighet for å rendre i portal #2209

Merged
merged 4 commits into from
Aug 24, 2023
Merged

Conversation

HalvorHaugan
Copy link
Contributor

@HalvorHaugan HalvorHaugan commented Aug 23, 2023

Kunne ikke skille ut portal i egen komponent likevel, fordi alle useEffect-ene må ha portalNode som dep for at de skal bli kjørt igjen når modalen er rendra. La til noen kommentarer om det i koden også.

En kostnad med å bruke useFloatingPortalNode er at det blir en ekstra render når modalen mounter. Men det er nødvendig for at det skal funke optimalt med SSR. Alternativet er å kun bruke createPortal, men da kan vi enten ikke støtte SSR, eller støtte det men rendre "inline" (i stedet for portal) på serversiden.

@changeset-bot
Copy link

changeset-bot bot commented Aug 23, 2023

🦋 Changeset detected

Latest commit: d4750a3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@navikt/ds-react Minor
@navikt/ds-css Minor
@navikt/ds-tokens Minor
@navikt/ds-tailwind Minor
@navikt/aksel-icons Minor
@navikt/aksel Minor
@navikt/aksel-stylelint Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Aug 23, 2023

Storybook demo

Endringer til review: 1

de98c8af3 | 48 komponenter | 320 stories

@HalvorHaugan HalvorHaugan marked this pull request as ready for review August 24, 2023 11:36
@HalvorHaugan HalvorHaugan merged commit be647e2 into main Aug 24, 2023
@HalvorHaugan HalvorHaugan deleted the new-modal-portal branch August 24, 2023 12:07
@github-actions github-actions bot mentioned this pull request Aug 24, 2023
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