fadden / CiderPress2

Tool for working with Apple II and vintage Mac disk images and file archives.
https://ciderpress2.com/
Apache License 2.0
44 stars 7 forks source link

The Paste option is missing when using the Right Click Context Menu in the centerPanelGrid #11

Closed jr0dsgarage closed 7 months ago

jr0dsgarage commented 7 months ago

I kept trying to right-click to Paste files from one disk to another. This commit adds the Paste command to the ContextMenu when the user right clicks in the centerPanelGrid Screenshot 2024-01-25 200450

fadden commented 7 months ago

I went back and forth on this one. In https://github.com/fadden/CiderPress2/commit/10b76f174da5b6b3b0538e57258c5b22f20138ff I added it to the directory tree context menu, but not the file list context menu, because I wasn't sure if it was going to be confusing.

For example, if I'm looking at the root directory of a ProDOS disk and drag & drop a file onto DIR1, it goes into DIR1. If I select DIR1 and then use Paste, it goes into the root directory, because the paste destination is always the directory that is currently selected in the Directories tree.

It could be argued that the paste operation should paste into whatever is selected, but it could be confusing if you hit Ctrl+V and it doesn't show up in the directory you're looking at because you happened to have a subdirectory selected in the file list. And if the root directory has nothing but directories in it, it's impossible to paste anything in. Drag & drop uses the mouse position to decide the destination, so the user's intention is less ambiguous.

I have no objections to putting Paste into the file list context menu, but I don't want people to be confused by it. Pasting into the currently-displayed directory in single-directory view mode feels pretty intuitive, but it gets a little less obvious when in full-list mode.

Thoughts?

jr0dsgarage commented 7 months ago

I'm firing up the solution again to do some more testing based on your feedback. Will report my thoughts after I try some more things.

I was just finding it frustrating to Right-click copy in one window, but not be able to right-click paste in the other.

fadden commented 7 months ago

It's been a journey. :-) https://ciderpress2.com/gui-manual/dragcopy.html goes into some other things, like partial paths. The original CiderPress pretty consistently did exactly what you didn't want it to do when copying and pasting between instances. I was hoping to avoid needing a "paste special" command, especially since nobody seemed to find it in CP.

jr0dsgarage commented 7 months ago

So what I'm feeling at first glance here is that I want the Directories view to follow my selection in the main window.

I love that it's still possible to see all files in a disk ala CP1 and yet can easily see the directory structure in the sidebar, but it feels odd to select a directory in the main window and not have the directory selection follow what I'm doing.

I feel like if the directory view followed the main window selection, the issue with a non-intuitive paste location would disappear?

jr0dsgarage commented 7 months ago

oh...I see that a double-click does what I'm mentioning...hmm

Because single clicking in the directory view also selects the directory in the main view, I'm sticking with my suggestion of a single click on a directory in the main view selects that directory in the directory view.

Is there a reason to not have the single click in the main view also select in directory view?

(never written the word directory so much in my life!)

fadden commented 7 months ago

In single-directory view, the Directories tree selection determines which directory is shown in the file list. If it jumped the instant you selected a directory in the file list it'd be pretty hard to use.

It might make sense to have it track when you're in the full-list view. It currently only moves if you double-click on a directory. The place where this starts to break down is when you have multiple files selected. If I have two directories selected in the file list, it's unclear which entry in the Directories tree should be selected.

It's also worth noting that the Paste option isn't currently disabled when you have multiple files selected. This could be considered incorrect, though it might be confusing if you couldn't paste anything and there was no indication as to why.

jr0dsgarage commented 7 months ago

Okay, I've decided I'm going to close this PR, because the paste command is already in your code, just commented out (I missed this, as the comment was lower in the list than where I thought it should go).

I still think it's a little unintuitive to not have the paste command there, but yeah, this is very complicated!

I can get used to using the directory view to Paste, since the command is usable there.

jr0dsgarage commented 7 months ago

closing due to complicated use-cases

fadden commented 7 months ago

How many directories could a directory selection select if a directory selection could select directories?

I agree that the absence is unintuitive, especially since it's a common way to do things in Windows Explorer. I'm trying to follow the "principle of least surprise", hoping that it's less surprising to have a missing menu option than to have it but in a way that doesn't work quite the way you expect.

I'm sure there's a good way to address this; I'm just not sure what it is.

jr0dsgarage commented 7 months ago

It's a head scratcher, for sure.

Ultimately, the lack of the Paste option made me explore a bit, but I didn't think to click in the directory view to Paste.