Skip to content

Conversation

RobinMalfait
Copy link
Member

No description provided.

* simplify examples by using the implicit open/closed state

* introduce Open/Closed context (React)

* use Open/Closed context in Dialog component (React)

* use Open/Closed context in Disclosure component (React)

* use Open/Closed context in Listbox component (React)

* use Open/Closed context in Menu component (React)

* use Open/Closed context in Popover component (React)

* use Open/Closed context in Transition component (React)

* introduce Open/Closed context (Vue)

* use Open/Closed context in Dialog component (Vue)

* use Open/Closed context in Disclosure component (Vue)

* use Open/Closed context in Listbox component (Vue)

* use Open/Closed context in Menu component (Vue)

* use Open/Closed context in Popover component (Vue)

* use Open/Closed context in Transition component (Vue)

* use a ref in the Description comopnent

This allows us to update the ref and everything should work after that.
Currently we only saw the "current" state.

* add more Vue examples

* update changelog
* delay initialization of Dialog

We were using a useLayoutEffect, now let's use a useEffect instead. It
still moves focus to the correct element, but that process is now a bit
delayed. This means that users will less-likely be urged to "hack"
around the issue by using fake focusable elements which will result in
worse accessibility.

* add hook to deal with server handoff

This will allow us to delay certain features. For example we can delay
the focus trapping until it is fully hydrated. We can also delay
rendering the Portal to ensure hydration works correctly.

* use server handoff complete hook

* update changelog
* add tests to verify the nested Dialog behaviour

* set mounted to true once rendered once

* cache useWindowEvent listener

We only care about the very last version of the listener function. This
allows us to only change the event listener if the event name (string)
and options (boolean | object) change.

* add/delete messages when mounting/unmounting

We don't require a dedicated hook anymore, so this is a bit of cleanup!

* add comments to the FocusResult enum

* splitup functionality and make it a bit more clear using feature flags

* add getDialogOverlays helper

* simplify the Portal component

We don't need to add the current element to the Stack. We only want to
take care of that in the Dialog component itself.

* drop dom-containers

Currently it is only used in a single spot, so I inlined it into that
file.

* simplify the FocusTrap component, use new API

* improve Dialog component

* update CHANGELOG
@vercel
Copy link

vercel bot commented May 10, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

headlessui-react – ./packages/@headlessui-react

🔍 Inspect: https://vercel.com/tailwindlabs/headlessui-react/8rxdxPznkKzvG77tBKqd96cgFmFK
✅ Preview: https://headlessui-react-git-develop-tailwindlabs.vercel.app

headlessui-vue – ./packages/@headlessui-vue

🔍 Inspect: https://vercel.com/tailwindlabs/headlessui-vue/Bd8JXZvzv7qLVf1WaU2DxbnLJ1Kj
✅ Preview: https://headlessui-vue-git-develop-tailwindlabs.vercel.app

@RobinMalfait RobinMalfait merged commit 396f889 into main May 10, 2021
@RobinMalfait RobinMalfait deleted the develop branch May 10, 2021 10:00
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.

1 participant