Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More ways to open files #455

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

Tyrannicodin
Copy link
Contributor

Adds both double click functionality to thumbnails in the thumbnail grid and an open files shortcut ctrl+shift+O.

@CyanVoxel CyanVoxel added Type: Enhancement New feature or request Type: QoL A quality of life (QoL) enhancement or suggestion Type: UI/UX User interface and/or user experience labels Sep 6, 2024
@CyanVoxel CyanVoxel added this to the Alpha v9.5 (Post-SQL) milestone Sep 8, 2024
@yedpodtrzitko
Copy link
Collaborator

Double click makes sense, but Ctrl+Shift+O feels very unusual. Maybe it's because I'm on macOS where the convention is Cmd+ (ControlModifier + Key.Key_Down). Using this combo here would make it feel right.

@CyanVoxel CyanVoxel added the Status: Changes Requested Changes are quested to this label Sep 10, 2024
@Tyrannicodin
Copy link
Contributor Author

I was planning on using ctrl+o but that was the library open shortcut so added the Shift modifier, however that makes sense and I have now changed it.

@CyanVoxel
Copy link
Member

TIL that Command-Down Arrow opens the selected item in Finder. If there was an equivalent shortcut for Windows Explorer I would've recommended to use each on their respective platforms, but I can't seem to find one.

Copy link
Member

@CyanVoxel CyanVoxel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In your description you say that you've added double-clicking to open files, however I don't see anything in the code or in practice that would suggest that.

EDIT: I'm now able to see what the extra click connection was supposed to do, however I would not call this "double-click" to open. Every additional click opens the file an additional time, so triple-clicking the file opens it twice, quadruple-clicking opens it three times, and so on. This also triggers when you make a multi-file selection then return to click the original file with the intention of resetting the selection back to that file. Finally it also seems to break as soon as you interact with the program a bit by searching, which is why I did not see any of this behavior initially.

This may be due to some other changes since #332, but it could also be related to the fact that the connection here is never disconnected. item_thumb has the update_clickable method that's used to do exactly this, where it disconnects the previous clickable and gets assigned a new one. I would recommend mirroring this for the double-click connection.

I would also expect Ctrl/Command + Down Arrow to open all the selected files, however I understand that this was not even a context menu option previously and would likely require additional refactoring (Plus it seems there's now a bug where Ctrl+Click selecting does not update the preview panel).

tagstudio/src/qt/widgets/item_thumb.py Outdated Show resolved Hide resolved
@yedpodtrzitko
Copy link
Collaborator

TIL that Command-Down Arrow opens the selected item in Finder. If there was an equivalent shortcut for Windows Explorer I would've recommended to use each on their respective platforms, but I can't seem to find one.

on Windows it's just Enter, no?

@CyanVoxel
Copy link
Member

CyanVoxel commented Sep 12, 2024

TIL that Command-Down Arrow opens the selected item in Finder. If there was an equivalent shortcut for Windows Explorer I would've recommended to use each on their respective platforms, but I can't seem to find one.

on Windows it's just Enter, no?

Apparently it is... So simple that Microsoft doesn't even consider it a "shortcut".

In this case I would recommend using the default behavior for each major OS's native file manager (macOS and Windows in this case, with a fallback on one for Linux unless someone can provide more information on that).

@Tyrannicodin
Copy link
Contributor Author

The shortcut is now based on the main window, so can open multiple files at the same time. It now defaults to ctrl/cmd + Down or Enter on windows.
Double click is now an actual double click instead of the way I did it before.

tagstudio/src/qt/widgets/item_thumb.py Outdated Show resolved Hide resolved
tagstudio/src/qt/ts_qt.py Outdated Show resolved Hide resolved
@yedpodtrzitko
Copy link
Collaborator

please fix the pipeline, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Changes Requested Changes are quested to this Type: Enhancement New feature or request Type: QoL A quality of life (QoL) enhancement or suggestion Type: UI/UX User interface and/or user experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants