Improve UX of importing vs. opening files (#3661)

* wip

* fix drag and drop

* fix

* fix tests

* fix tests

* fix warning

* Partial code review

* add dialog

* fix web

* fix web

* push back release candidate expiry

* Code review

* Reduce code duplication for pasting files in frontend

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Timon
2026-01-22 01:37:49 -08:00
committed by GitHub
co-authored by Keavon Chambers
parent 781fa7ae95
commit 2be7790d4d
23 changed files with 301 additions and 354 deletions
+2 -14
View File
@@ -79,7 +79,7 @@ pub enum DesktopFrontendMessage {
pub enum DesktopWrapperMessage {
FromWeb(Box<EditorMessage>),
Input(InputMessage),
OpenFileDialogResult {
FileDialogResult {
path: PathBuf,
content: Vec<u8>,
context: OpenFileDialogContext,
@@ -88,10 +88,6 @@ pub enum DesktopWrapperMessage {
path: PathBuf,
context: SaveFileDialogContext,
},
OpenDocument {
path: PathBuf,
content: Vec<u8>,
},
OpenFile {
path: PathBuf,
content: Vec<u8>,
@@ -100,14 +96,6 @@ pub enum DesktopWrapperMessage {
path: PathBuf,
content: Vec<u8>,
},
ImportSvg {
path: PathBuf,
content: Vec<u8>,
},
ImportImage {
path: PathBuf,
content: Vec<u8>,
},
PollNodeGraphEvaluation,
UpdateMaximized {
maximized: bool,
@@ -153,7 +141,7 @@ pub struct FileFilter {
}
pub enum OpenFileDialogContext {
Document,
Open,
Import,
}