Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On its own, this is a very simple addition to the swipe functionality on touch screen compatible devices, allowing for a swipe down to close the main image view. However, it did leave me wondering whether it'd be possible to extend the functionality of the image viewer itself.
There's a couple of open issues regarding zooming in on the single photo viewer (#217 and #236 ) - if FormidableLabs/react-swipeable#244 is to be believed, the swipe overlay on the media can easily handle a double-click/tap to zoom event. The main problem then is figuring out a simple way to actually show the media at 100% size, and allow the user to navigate around whilst zoomed in, without the existing overlay (buttons and swipe gestures) getting in the way.
[On a separate note, I do intend to implement a test for the react-swipeable component - identifying the element isn't a problem, but testing-library/react doesn't natively support a swipe gesture. I'll figure it out before adding any more swipe functionality though]