jd-solanki / anu

Anu - DX focused utility based vue component library built on top of UnoCSS & VueUse ⚡️🔥
https://anu-vue.netlify.app/
MIT License
1.03k stars 56 forks source link

feat: playground #185

Open IcetCode opened 1 year ago

IcetCode commented 1 year ago

I've got most of the features done, but still need some help:

netlify[bot] commented 1 year ago

Deploy Preview for anu-vue ready!

Name Link
Latest commit 1f54cb66be060e47de674dc005750489ca9577f7
Latest deploy log https://app.netlify.com/sites/anu-vue/deploys/64bf3229a9cde40008251eda
Deploy Preview https://deploy-preview-185--anu-vue.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

jd-solanki commented 1 year ago

@IcetCode Why running playground nr play:dev ask for sudo password?

image
IcetCode commented 1 year ago

That may cause by the server option in vite.config.ts configuration, you can remove it.

server: {
  https: true,
  host: true,
}
jd-solanki commented 1 year ago

Actually that's because of vite-plugin-mkcert plugin. Ref.

Is that plugin required?

IcetCode commented 1 year ago

It's for using HTTPS with vite, but it's not a must-have. We could just remove it.

jd-solanki commented 1 year ago

For some reason, AFloating always appears in the top left corner instead of the correct position.

~I guess that's because of iframe~ No it's not because in nuxt dev tools' iframe it works fine! image

IcetCode commented 1 year ago

I found during debugging that it's related to the @floating-ui/vue package. When I use @floating-ui/dom instead of @floating-ui/vue to implement the floating component, it works. This is really strange, and I will try to figure out what caused this issue.

jd-solanki commented 1 year ago

For floating ui dom tooltip still appears at middle image

Because of div is block element and we have div as target, sorry

jd-solanki commented 1 year ago

Have you tried in Vue Playground?

Example

It doesn't work there, I hope I have correct import map 🤔

IcetCode commented 1 year ago

Yes, I've tried it and I got the same result as you did, but the same example works in a local project.

jd-solanki commented 1 year ago

I guess we should raise the issue at vue playground with local project and live playground, IDK when they will resolve the issue though 😑

jd-solanki commented 1 year ago

Second thought is if it works fine for dom module then we shouldn't raise it on vue side 😅

Do you mind raising issue at floating UI repo with local project, live vue & live dom example?

IcetCode commented 1 year ago

Finally, I found out that this is a Vue issue. watch() doesn't work after running npm run build for a Vue project. Let's wait for the fix to be merged.

jd-solanki commented 1 year ago

@IcetCode ??

IcetCode commented 1 year ago

@jd-solanki Oh no, sorry, I forgot that I still have an unmerged PR. I'm trying to re-fork the repository to fix the sync issue, but it seems I can't restore it. I may need to recreate a PR.

IcetCode commented 1 year ago

I've sent a restore ticket to see if I can restore it. If not, I will create a new PR.