Repository navigation
fix: use Downloads folder as default path for file dialogs - #49538
souravxbera wants to merge 4 commits into
Conversation
|
Hi maintainers! 👋 Could someone please add the This is a component enhancement that makes file dialogs default to the Downloads folder (with Home directory fallback) instead of CWD when no Thanks! |
0dbe675 to
9543e4a
Compare
|
@codebytere Thanks for the review! |
|
Hi @codebytere , just a quick ping to let you know I’ve addressed the suggested changes and pushed the updates. Please let me know if anything else is needed. Thanks! |
|
@sbera01
i'm well aware of this, yes. Please extract the helper into |
c6dbbeb to
b504a95
Compare
|
Done! |
b504a95 to
1da35b8
Compare
|
Hey, I have rebased it on latest main and resolved merge conflicts with the PathProvider changes. PTAL. |
|
Oops, my mistake, thanks for catching that! I’ll clean it up and push a fix shortly. |
|
Done. PTAL!! |
|
@sbera01 tests and lint are failing - the test failure is related. Did you test this before marking ready? the failure would have been caught by running a simple example. |
|
@sbera01 do you still want to pursue this PR? |
|
@codebytere Sorry for the late reply. I’ve looked into it further, but I don’t currently have the required setup/resources to properly test and validate the changes. Given that, I won’t be able to continue pursuing this PR. I really apologize for the inconvenience, and please feel free to close it if needed. |
Description of Change
Fixes file dialogs opening in CWD when no
defaultPathis provided. Dialogs now default to the user's Downloads folder (or Home directory if Downloads doesn't exist) instead of the current working directory.Closes #49237
My Approach: Added
GetSmartDefaultPath()helper function across all platforms that:DIR_DEFAULT_DOWNLOADS)This only affects dialogs when no
defaultPathis explicitly provided, so existing code that specifies a path continues to work unchanged.Checklist
npm testpassesRelease Notes
Notes: File dialogs now default to the Downloads folder when no
defaultPathis specified, improving UX by opening in a location users expect instead of the current working directory.