lbry-desktop icon indicating copy to clipboard operation
lbry-desktop copied to clipboard

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

Open LavRadis opened this issue 7 years ago • 9 comments

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

  • LBRY Daemon version: 0.20.4
  • LBRY App version: 0.23.0-rc.3
  • LBRY Installation ID: 7tYN144rHXrspzJG9xLP28fi1JztXnbpKro6DBJEQyzBmXTyDgqRLfYsUvHYFVmMe2
  • Operating system: Win 10

LavRadis avatar Jul 24 '18 15:07 LavRadis

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

neb-b avatar Jul 24 '18 17:07 neb-b

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

tzarebczan avatar Jul 24 '18 17:07 tzarebczan

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

neb-b avatar Jul 24 '18 17:07 neb-b

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

alyssaoc avatar Sep 18 '18 17:09 alyssaoc

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

tzarebczan avatar Sep 18 '18 17:09 tzarebczan

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

bcrowie avatar Jun 08 '20 16:06 bcrowie

@bcrowie It's all yours!

neb-b avatar Jun 08 '20 17:06 neb-b

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)

DispatchCommit avatar Jan 27 '21 11:01 DispatchCommit

i'll be working on this ticket

ByronEricPerez avatar Jun 20 '22 15:06 ByronEricPerez