DioxusLabs / dioxus

Fullstack app framework for web, desktop, mobile, and more.
https://dioxuslabs.com
Apache License 2.0
20.32k stars 779 forks source link

Add support for native system dialog #426

Closed st-little closed 1 year ago

st-little commented 2 years ago

Specific Demand

Add support for native system dialog such as electron dialog

Implement Suggestion

rMazeiks commented 2 years ago

Agreed, this would be a nice feature!

In the meantime, consider workarounds:

jkelleyrtp commented 2 years ago

I recommend using NFD directly in handlers - we will be integrating NFD into file input elements in a future release.

mrxiaozhuox commented 2 years ago

I recommend using NFD directly in handlers - we will be integrating NFD into file input elements in a future release.

use NFD replace <input type="file"> or just add a file-dialog component ?

jkelleyrtp commented 2 years ago

I recommend using NFD directly in handlers - we will be integrating NFD into file input elements in a future release.

use NFD replace <input type="file"> or just add a file-dialog component ?

Our input element used in desktop will need to support onlick -> NFD (which it doesn't) and register a background file-handler with wry for drag-and-drop onto it.

I've debated just making a new Input component instead, but I think keeping Dioxus as a "platform" means smoothing over the "raw" functionality of wry/tao.

jkelleyrtp commented 1 year ago

In #692 , we finally run the VirtualDom on the main thread, unlocking this capability.

jkelleyrtp commented 1 year ago

This has been somewhat added, but we recommend deferring to RFD directly.