antoniandre / wave-ui

A UI framework for Vue.js 3 (and 2) with only the bright side. ☀️
https://antoniandre.github.io/wave-ui
MIT License
553 stars 41 forks source link

[Discussion] Composition API Re-write #127

Closed DerrikMilligan closed 1 year ago

DerrikMilligan commented 1 year ago

Hey @antoniandre you mentioned in the typescript issue that "In a few months, I will stop supporting the legacy branch and we can rewrite everything in composition API in the main branch."

I wanted to open this issue as a discussion about it. Are you looking to take on this task single-handedly? Or would you like help in the effort? If you're open to help, I'd be more than willing to help and there may be others who are as well. We'd probably just need some sort of a game plan on how we want things to work/look and then we can start converting components.

Also I wanted to open a dialog about a couple things that could potentially be changed/improved as we rewrite it. I LOVE the framework and how it is simple and works to not overstep it's bounds with CSS which is one of the main reasons I started using it. There is always room for improvement however. And a re-write is a good time to discuss or think about any larger changes we would want to consider since it'll likely not have to worry about backwards compatibility.

The one thing that has been one my mind as something that would be a potential improvement would be to use Floating UI (The successor of popper.js) to handle the positioning and logic for all the detachable type components. They even have it ready to integrate with Vue It's battle tested and has all the options anyone could ever want. The one pain point I've experienced with a few of the detachable components is then going outside the view-port.

I've seen that in the computeDetachableCoords method in src/wave-ui/mixins/detachable.js there is a code block commented out as Step 3 that outlines needing to prevent something from displaying outside the view-port. This is some tricky math and I wonder if outsourcing it to a very tiny library that is REALLY good at handling those things.

That is the only real larger change I've seen a potential need for. Everything else has been small and easy enough to make a pull request for to fix up.