darktable-org / darktable-org/darktable
Actions `views/lighttable/move/vertical;previous` and `views/lighttable/move/vertical;next` behave strangely in the filemanager layout
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.1k
- Forks
- 1.4k
- Avg merge
- 22h 14m
- Merged PRs (30d)
- 198
Description
Is there an existing issue for this?
- I checked and did not find my issue in the already reported ones
Describe the bug
I have defined the following shortcuts:
Left=views/lighttable/move/horizontal;previous
Right=views/lighttable/move/horizontal;next
Up=views/lighttable/move/vertical;previous
Down=views/lighttable/move/vertical;next
horizontal;previous (and horizontal;next) behave as expected. They move horizontally in a row of thumbnails and continue to the end (beginning) of the previos (next) row when reaching the beginning (end) of the current row.
However, verical;previous and vertical;next do not.
There are two issues:
-
Direction: In my mental model, when looking at a grid of items
vertical;previous(vertical;next) should move one line up (down). Instead, the direction is inverted. This may be by design, but it's very counterintuitive based on the effect name and the context. -
Erratic movement: while the horizontal movement is predictable, vertical movement is not. If you move up (down) one row, sometimes you will move to the thumbnail just above (below), sometimes it will move also one step to the left (right). Sometimes, e.g., when moving down from the last row that fits in the view, the view will scroll but the focused thumbnail won't change. Sometimes, when scrolling up (down) there will be no vertical movement at all and the next (previous) thumbnail on the same row is focused.
I suspect that there is some error with the logic that computes the indices of elements in different rows.
Steps to reproduce
- Go to the lighttable and select the file manager layout
- Filter thumbnails so that you have enough to overflow the view
- Focus a thumbnail in the top or bottom row
- Start moving up and down using your keyboard using whatever shortcuts you have for that
- Occasionally, especially when view needs to scroll up/down, the focus will stay on the same thumbnail, or move side-to-side
Expected behavior
The focus should only move up and down
Logfile | Screenshot | Screencast
E.g.: a sequence of three vertical;next. Notice how triggering the action the second time moves to the left instead of moving up.
https://github.com/user-attachments/assets/def94ddb-3ccd-448c-92be-cceb41d915a9
Commit
No response
Where did you obtain darktable from?
darktable.org / GitHub release
darktable version
5.3.0+653~ga8a01fbcf5
What OS are you using?
Mac
What is the version of your OS?
Tahoe 26.0.1
Describe your system
No response
Are you using OpenCL GPU in darktable?
Yes
If yes, what is the GPU card and driver?
Apple M4 Pro
Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in darktable's lighttable using the file manager layout, overflowing thumbnails, and the views/lighttable/move/vertical;previous and ...;next actions. Trace the vertical movement and scrolling behavior from those action entry points, then verify that repeated moves change focus only one row vertically, including at viewport boundaries, without unintended horizontal movement or focus staying put.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100