mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-31 13:46:52 -06:00
* Show file and message dialogs without blocking the frame A blocking rfd dialog inside the egui frame runs AppKit's modal loop; a file dragged from Finder and held over the window then re-enters winit's handler and aborts the app. Dialogs now go through craft-dialogs: a command without a path asks with a continuation and returns, the host shows the dialog at the end of the frame, and the continuation runs with the answer on a later frame, in the document it was asked for. Commands given a path stay synchronous. The replace-file question is a message box from the same queue. Quit and Close wait for a Save As dialog's answer. clippy.toml disallows rfd::FileDialog and rfd::MessageDialog. * Raise the open file panel when File > Open is chosen again * Repin craft-dialogs to the craft-libs PR head * Queue dialogs asked by different code or documents; hold answers behind newer dialogs Two asks for the same file dialog were treated as one, so Place for one document and then Choose Image, or Place again for another document, ran the first ask's action. An ask is now skipped (and the open panel raised) only when the same code asked for the same dialog for the same document. An answer that would replace an egui dialog opened since the asking (an unsaved-changes question, Preferences) waits until it closes; Quit counts it as pending. * Repin craft-dialogs to the craft-libs PR head * Allow the file dialogs' existence checks in the file guard * Repin craft-dialogs to storytold/craft-libs main
11 lines
609 B
TOML
11 lines
609 B
TOML
allow-unwrap-in-tests = true
|
|
allow-expect-in-tests = true
|
|
allow-panic-in-tests = true
|
|
allow-indexing-slicing-in-tests = true
|
|
disallowed-types = [
|
|
{ path = "egui::ComboBox", reason = "use craft_ui::ComboBox: egui's combo box menu can't grow back while open (egui#5225)" },
|
|
{ path = "rfd::FileDialog", reason = "use DesignApp::ask_open/ask_save (craft-dialogs): a blocking dialog inside the frame aborts the app on macOS" },
|
|
{ path = "rfd::MessageDialog", reason = "use craft-dialogs' ask_message: a blocking dialog inside the frame aborts the app on macOS" },
|
|
]
|
|
cognitive-complexity-threshold = 30
|