Fix(gallery): Re-add image browsing with arrow keys#8874
Fix(gallery): Re-add image browsing with arrow keys#8874lstein merged 8 commits intoinvoke-ai:mainfrom
Conversation
…ing hotkeys Ctrl+Enter and Ctrl+Shift+Enter
|
The structure here is good, and the feature works. However, I'm getting a flicker effect when switching between images that didn't happen in the old handling. The UI briefly flashes to a blank viewer before loading the new image. Seems to be related to how the refocusing is being done in |
|
Updated this PR to keep the intended behavior while reducing regressions and code noise:
|
|
@dunkeroni Can you take a look at this and confirm that it works as expected? I'd like to get it into 6.12, maybe as early as this weekend. |
lstein
left a comment
There was a problem hiding this comment.
I've put this through its paces and the system works smoothly. I don't see the flicker that @dunkeroni noted before the most recent commits.
I'm still looking for an official stamp of approval from @dunkeroni, but my opinion is that this PR is ready to merge.
There was a problem hiding this comment.
Sorry for letting this sit so long. Issues are resolved in my testing.
One thing to look out for (not necessarily unique to this PR): if you hold down an arrow key to run through a large board all at once, then it queues up all of the images to load and can take a while before the one you land on becomes visible. Can only really test that once and then you have to clear out the cache to see it happen again, otherwise all of them will load instantly. I don't think that is a scenario that most users will encounter outside of stress testing, but if we start supporting larger files that take longer to load (e.g. video) then we may need to implement a more elaborate loading queue.
Yes, I encountered this too. Perhaps there should be some debouncing code added. Not a blocker to my mind. |
Summary
This PR restores and hardens keyboard image browsing in Gallery/Viewer flows, including when panels are collapsed and when invoking from prompt-focused inputs.
Key Changes
Left/Rightnavigation when gallery is unavailableLeft/Rightnow navigate prev/next image when:useNextPrevItemNavigationNextPrevItemButtons) and viewer hotkeys call the same prev/next logic.navigation-api:isFullscreen(tab)isRightPanelCollapsed(tab)isGalleryPanelCollapsed(tab)isViewerArrowNavigationMode(tab)viewerin:Related Issues / Discussions
Fixes #8589
QA Instructions
A. Baseline Gallery Keyboard Nav
Left/Right/Up/Down.B. Viewer Without Extra Click
C. Right Panel Collapsed Only
Left/Right.D. Fullscreen / Panels Hidden
Left/Right.E. Paged Gallery Boundary
Left/Right.F. Invoke From Prompt Input
Ctrl+Enter(Cmd+Enteron mac).Ctrl+Shift+Enter/Cmd+Shift+Enter.G. Input Safety
Merge Plan
Should be simple merge.
Checklist
What's Newcopy (if doing a release after this PR)