PictoPy icon indicating copy to clipboard operation
PictoPy copied to clipboard

Feat: Add wrap-around navigation in the image viewer

Open jaydeep83721-dev opened this issue 1 month ago • 11 comments

Describe the feature

When viewing images in the image viewer, navigation currently stops at the first and last image.

It would be useful to make the navigation continuous:

  • Clicking the Next button on the last image should open the first image.
  • Clicking the Previous button on the first image should open the last image.

This would make browsing through images smoother and more consistent with continuous slideshow behavior.

I would like to work on this feature if the proposed behavior is accepted.

Image

Add ScreenShots

  1. The Favorites page contains multiple images.
  2. Opening an image launches the image viewer with Previous/Next navigation.
  3. When the viewer reaches the first or last image, navigation stops instead of wrapping around.

Proposed behavior:

  • Previous on the first image → last image
  • Next on the last image → first image

Proposed UI Placement

To make the wrap-around behavior clear, I propose showing a small, always-visible image position indicator at the top-center of the Image Viewer.

For example:

1 of 5 → 2 of 5 → 3 of 5 → 4 of 5 → 5 of 5

When the user reaches the last image:

5 of 5 → Next → 1 of 5

And when navigating backwards from the first image:

1 of 5 → Previous → 5 of 5

The existing Previous/Next buttons would remain on the left and right sides.

I suggest the top-center because it keeps the position visible while browsing without interfering with the existing viewer controls or thumbnail/zoom area.

Mockup

[Add annotated screenshot here showing 3 of 5 at the top-center of the Image Viewer]

Record

  • [x] I agree to follow this project's Code of Conduct
  • [x] I want to work on this issue

jaydeep83721-dev avatar Oct 06 '26 16:10 jaydeep83721-dev

👋 Thanks for opening this issue! The maintainers will review it shortly. Till then, do not open any PR. This is a strict rule we like to follow around here :)

github-actions[bot] avatar Oct 06 '26 16:10 github-actions[bot]

⚠️ Potential Duplicate Issue (Semantic Match)

This issue appears semantically similar to the following issues in AOSSIE-Org/PictoPy:

  1. BUG:Slideshow Doesn't Loop (#1090, closed) https://github.com/AOSSIE-Org/PictoPy/issues/1090 Similarity: 59.1%

  2. Enhancement: Bottom Horizontal Scroll Grid in Media View (#522, closed) https://github.com/AOSSIE-Org/PictoPy/issues/522 Similarity: 57.8%

  3. Suggestion: Add a floating “Back to Top” button for easier navigation (#979, closed) https://github.com/AOSSIE-Org/PictoPy/issues/979 Similarity: 57.6%

Please review before proceeding.

github-actions[bot] avatar Oct 06 '26 16:10 github-actions[bot]

Thanks for flagging the possible duplicates. I checked the referenced issues:

  • #1090 is about looping in the slideshow.
  • #522 is about a horizontal media navigation grid.
  • #979 is about a Back to Top navigation button. This proposal is specifically for the regular image viewer: when manually navigating with Previous/Next, pressing Next on the last image should open the first image, and pressing Previous on the first image should open the last image. So I believe this is a separate enhancement rather than a duplicate. I’d be happy to work on it if the maintainers agree with the behavior.

jaydeep83721-dev avatar Oct 06 '26 16:10 jaydeep83721-dev

Link your account with Gitcord

Thanks for opening this issue, @jaydeep83721-dev!

To receive Discord notifications and contributor tracking for this organization:

  1. Join Discord: https://discord.gg/hjUhu33uAn
  2. In Discord, run /link jaydeep83721-dev
  3. Paste the verification code into your GitHub bio (or a public gist)
  4. Click Verify in Discord (or run /verify-link jaydeep83721-dev)

Once linked, Gitcord can notify you about assignments, mentions, and more.

— Posted by Gitcord

gitcordapp[bot] avatar Oct 06 '26 16:10 gitcordapp[bot]

Hi @rohan-pandeyy I'd like to contribute to issue #1595. I saw the discussion distinguishing wrap-around navigation in the regular image viewer from the existing slideshow behavior. Could you confirm whether this enhancement is available to work on? I'll wait for your approval before making changes or opening a PR. Thank you!

codewithchotu avatar Oct 12 '26 17:10 codewithchotu

Clicking the Next button on the last image should open the first image. Clicking the Previous button on the first image should open the last image.

How does the user realize when he/she's on the first/last picture while scouring through the images?

rohan-pandeyy avatar Oct 21 '26 18:10 rohan-pandeyy

8. > Clicking the Next button on the last image should open the first image. > Clicking the Previous button on the first image should open the last image.

How does the user realize when he/she's on the first/last picture while scouring through the images?

That’s a good point. With wrap-around enabled, the disabled navigation button would no longer indicate that the user has reached the first or last image.

I think we could keep the navigation cyclic while still making the current position clear by showing a small image counter such as 1 / N, 2 / N, etc. Then, when the user goes Next from N / N, it would wrap back to 1 / N, and Previous from 1 / N would wrap to N / N.

This way the user can always tell where they are in the image set without losing the convenience of continuous navigation. Would this approach make sense for the issue?

jaydeep83721-dev avatar Oct 21 '26 18:10 jaydeep83721-dev

@rohan-pandeyy can you review my approach ??

jaydeep83721-dev avatar Oct 24 '26 08:10 jaydeep83721-dev

Hi @rohan-pandeyy, I'd like to contribute to issue #1595. I checked MediaView.tsx and found that the current navigation handlers stop at the first and last images, while MediaInfoPanel.tsx already displays the current image position.

My proposed approach is to implement wrap-around navigation for both Previous and Next, keep the navigation buttons enabled at the boundaries, and reuse the existing image counter rather than duplicating it. I'll also test keyboard navigation and slideshow behavior.

Could you please confirm whether this approach is acceptable and whether I can proceed with the implementation? I'll wait for your approval before opening a PR. Thank you!

shravdalvi avatar Oct 29 '26 08:10 shravdalvi

11. Hi @rohan-pandeyy, I'd like to contribute to issue #1595. I checked MediaView.tsx and found that the current navigation handlers stop at the first and last images, while MediaInfoPanel.tsx already displays the current image position. My proposed approach is to implement wrap-around navigation for both Previous and Next, keep the navigation buttons enabled at the boundaries, and reuse the existing image counter rather than duplicating it. I'll also test keyboard navigation and slideshow behavior. Could you please confirm whether this approach is acceptable and whether I can proceed with the implementation? I'll wait for your approval before opening a PR. Thank you!

i am working on it and as well as i need approval if @rohan-pandeyy so can you find some other issue??

jaydeep83721-dev avatar Oct 29 '26 08:10 jaydeep83721-dev

@rohan-pandeyy if it looks viable then can you please assign me to the issue. waiting to hear your side

jaydeep83721-dev avatar Nov 03 '26 09:11 jaydeep83721-dev