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

fix gallery next and prev navigation #3155

Merged
merged 2 commits into from
Jan 2, 2024
Merged

Conversation

alecananian
Copy link
Collaborator

Simplifies gallery navigation logic and fixes issue with navigating to empty/deleted detail page

@mrozanski
Copy link
Contributor

What are the actual steps to reproduce the issue being fixed?
Here's what I tested:

From Newest post

  1. Open a gallery (from a mobile size screen) with two posts (photos)
  2. Open the first photo in the list (latest uploaded)
  3. Expected: no left arrow, and right arrow present (takes me to next photo in the list)
  4. Observed: Left arrow present (tapping closes the gallery) and no right arrow

This branch fixes that behavior

From Oldest post

  1. Open a gallery (from a mobile size screen) with two posts (photos)
  2. Open the last photo in the list (oldest uploaded)
  3. Expected: no right arrow, and left arrow present (takes me to previous photo in the list)
  4. Observed: both arrows present (tapping right one generates exception)

This branch fixes that behavior too

What else should I test?

@alecananian
Copy link
Collaborator Author

There seems to be some way that a post becomes null, so this PR fixes issues that arise from that by adding the filter .filter(([, v]) => v !== null) that is used elsewhere. I'm not sure the steps to reproduce (may have to do with a deleted post), but you can see the issue by following the path in the ticket and navigating through that gallery.

@alecananian alecananian merged commit 00aa397 into develop Jan 2, 2024
1 check passed
@alecananian alecananian deleted the alec/land-1440-gallery-nav branch January 2, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants