lbryio / lbry-desktop

A browser and wallet for LBRY, the decentralized, user-controlled content marketplace.
https://lbry.tech
MIT License
3.56k stars 413 forks source link

Minor UI issue: "Choose File" opens LBRY install folder on windows #1811

Open LavRadis opened 6 years ago

LavRadis commented 6 years ago

The Issue

On the first usage, the "Choose File" button in the "Publish" section opens in LBRY install directory. It could be confusing for new users. It could maybe open in "My documents" or "My computer". It remembers the last directory after the first time.

System Configuration

neb-b commented 6 years ago

On mac it opens to the folder you chose from last time after clicking the button. I guess this isn't happening on windows? Must be an OS thing

tzarebczan commented 6 years ago

Yes, that's true on windows also. But what happens when it's on a first run (no file previously selected)?

neb-b commented 6 years ago

Seems like it's persisting between first runs. We might need to try on a new machine?

alyssaoc commented 6 years ago

@tzarebczan Can you test to see if this is still happening?

tzarebczan commented 6 years ago

This still happens, but only on first run and then it remembers the last location.

bcrowie commented 4 years ago

I'd like to take this one on if that's alright.

neb-b commented 4 years ago

@bcrowie It's all yours!

DispatchCommit commented 3 years ago

Set defaultPath for the dialog.showOpenDialog() function: https://www.electronjs.org/docs/api/dialog#dialogshowopendialogbrowserwindow-options

You'd also likely need to detect which platform a user is on and/or use something like %HOMEPATH% to set it to the user's home profile (for windows at least).

The change is needed here: https://github.com/lbryio/lbry-desktop/blob/d04b0f09ba2bc772d97fe32bfd66ec89786e3234/ui/component/common/file-selector.jsx#L59

(possibly in other locations, but this should at least give a head start in the right direction)

ByronEricPerez commented 2 years ago

i'll be working on this ticket