Repository navigation
File: Save a Copy asks where to save a bare name instead of writing it to the working directory - #1215
Merged
Conversation
…t to the working directory (fixes storytold#1212)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1212.
Share › Export as Web Page (and Save as Web Page in the native File menu) opens the small Save a Copy dialog, which asks for a name. A name typed there went straight to
file.exportHtmlas a relative path, so the page was written to the process's working directory: the install folder on Windows,/when launched from the Finder, wherever the launcher started it on Linux, never Documents or Downloads. Now a name without a folder goes to the save picker as its suggestion, so the user chooses where it lands; a full path is still written as typed, and an empty field opens the picker as before. Thanks to #394 and #641, which set up the HTML export and its error path; the export itself was fine.#1213 looks like the same thing: its popup names a bare
testcsvexport.csv, and Export as CSV goes through the same dialog, so on Windows the write hit the install folder and got "access denied". I haven't confirmed it on Windows, so I left that issue open.Another option would be to drop the text field and have these menu entries open the picker directly, as File › Export already does; happy to switch if you prefer that.
Validation:
save_a_copy_with_a_bare_name_asks_where_to_save_it(crates/ui-egui/tests/file_menu.rs): fails on main (the page is written to the working directory and the picker is never asked), passes here; it also checks that a full path skips the picker and that a failed write is reportedcargo clippy -p gridcraft-ui-egui --all-targets -- -D warnings,cargo fmt --all -- --check