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

Remove radix-vue dependency #70

Merged
merged 5 commits into from
Jan 7, 2025
Merged

Remove radix-vue dependency #70

merged 5 commits into from
Jan 7, 2025

Conversation

pascalbaljet
Copy link
Contributor

@pascalbaljet pascalbaljet commented Dec 18, 2024

This PR removes radix-vue from the Vue version and adds focus-trap, which is a popular, well-maintained, framework-agnostic library. I want to move away from radix-vue, as it has some advantages:

  • No more required DialogTitle component.
  • It makes it easier to implement new features in the future, such as draggable modals.
  • It reduces the UMD build from 52.73 kB (15.93 kB gzipped) to 40.32 kB (12.60 kB gzipped).

Still draft because I'm investigating whether we can move away from @headlessui/react in the React version as well. Then we could use focus-trap there as well and make the two versions much more consistent.

@pascalbaljet
Copy link
Contributor Author

I've refactored the React version, and there the UMD build went from 72.75 kB (25.25 kB gzipped) to 65.55 kB (22.77 kB gzipped). Not as drastic as the Vue refactoring, but at least it uses the same focus-trap dependency and some shared code.

@pascalbaljet pascalbaljet marked this pull request as ready for review January 7, 2025 16:34
@pascalbaljet pascalbaljet merged commit 55b1b33 into main Jan 7, 2025
10 checks passed
pascalbaljet added a commit that referenced this pull request Jan 7, 2025
pascalbaljet added a commit that referenced this pull request Jan 7, 2025
@pascalbaljet pascalbaljet mentioned this pull request Jan 8, 2025
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