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

Add dialog-next-router example #2369

Merged
merged 7 commits into from May 6, 2023
Merged

Add dialog-next-router example #2369

merged 7 commits into from May 6, 2023

Conversation

diegohaz
Copy link
Member

@diegohaz diegohaz commented May 4, 2023

This PR adds a new example to the site using Next.js App Router. The example is presented within an iframe with a chrome bar.

Alongside this, a few adjustments were made to the Dialog component:

  • Fixed DialogBackdrop not including the data-backdrop attribute in the initial render, causing a flash of unstyled content when the dialog is initially open.
  • Fixed Dialog calling hideOnInteractOutside twice when clicking on the backdrop.
  • The built-in DialogBackdrop component is no longer focusable.
  • Call autoFocusOnHide and autoFocusOnShow with a null argument when there's no element to focus or the element is not focusable. This allows users to specify a fallback element to focus on hide or show.

These changes should make it easier to control the Dialog using the Next.js App Router.

@vercel
Copy link

vercel bot commented May 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ariakit ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2023 1:25am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
reakit ⬜️ Ignored (Inspect) May 6, 2023 1:25am

@changeset-bot
Copy link

changeset-bot bot commented May 4, 2023

🦋 Changeset detected

Latest commit: 84fadb1

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

This PR includes changesets to release 2 packages
Name Type
@ariakit/react-core Patch
@ariakit/react Patch

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

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 4, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 84fadb1:

Sandbox Source
Ariakit Configuration

@diegohaz diegohaz marked this pull request as ready for review May 6, 2023 13:43
@diegohaz diegohaz merged commit 30d5bca into main May 6, 2023
15 checks passed
@diegohaz diegohaz deleted the dialog-next-router branch May 6, 2023 13:52
@github-actions github-actions bot mentioned this pull request May 6, 2023
diegohaz pushed a commit that referenced this pull request May 6, 2023
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @ariakit/react@0.1.8

### Patch Changes

- Fixed `DialogBackdrop` not including the `data-backdrop` attribute in
the initial render, causing a flash of unstyled content when the dialog
is initially open.
([#2369](#2369))

- Fixed `Dialog` calling `hideOnInteractOutside` twice when clicking on
the backdrop. ([#2369](#2369))

- The built-in `DialogBackdrop` component is no longer focusable.
([#2369](#2369))

- Call `autoFocusOnHide` and `autoFocusOnShow` with a `null` argument
when there's no element to focus or the element is not focusable. This
allows users to specify a fallback element to focus on hide or show.
([#2369](#2369))

-   Updated dependencies: `@ariakit/react-core@0.1.8`.

## @ariakit/react-core@0.1.8

### Patch Changes

- Fixed `DialogBackdrop` not including the `data-backdrop` attribute in
the initial render, causing a flash of unstyled content when the dialog
is initially open.
([#2369](#2369))

- Fixed `Dialog` calling `hideOnInteractOutside` twice when clicking on
the backdrop. ([#2369](#2369))

- The built-in `DialogBackdrop` component is no longer focusable.
([#2369](#2369))

- Call `autoFocusOnHide` and `autoFocusOnShow` with a `null` argument
when there's no element to focus or the element is not focusable. This
allows users to specify a fallback element to focus on hide or show.
([#2369](#2369))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot mentioned this pull request May 6, 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.

None yet

1 participant