Page MenuHomePhabricator

Remove mobile.mediaviewer swipe feature in beta
Closed, ResolvedPublic2 Estimated Story Points


Two years ago a feature was added to the image overlay to be able to swipe left and right between images in beta.


That's the only difference between the two.
After some analysis it seems the current solution doesn't work too well.
Going forward we should explore using a JS library for this functionality. There is not much use in keeping the existing code around.


sign off checklist

  • Create a new task to add swipe gestures to the mobile experience. Make sure new task captures discussion points in this task.

Event Timeline

I'm all for having this feature in stable. We'd introduce a new dependency (mobile.swipe) and a couple of new images if I'm not mistaken. The mobile.swipe is not that big, so it won't be a huge performance problem if we do so.

If I remember correctly the only reason it didn't get promoted and it didn't work in certain devices. It needs better testing and pushing.

dr0ptp4kt triaged this task as Medium priority.Aug 25 2016, 8:45 PM
dr0ptp4kt moved this task from Incoming to Needs Prioritization on the Readers-Web-Backlog board.

@dr0ptp4kt @ovasileva : Please decide whether we want swipe functionality or not on the mobile overlay and if its worth investing the effort to make that happen.

@Jdlrobson - do we have any record/task of which devices it didn't work for? For those, what was the behavior?

We don't but it included certain android devices. I don't suspect it would be a hard thing to fix so really it's a question of value.

As long as it fails back gracefully I don't think that not supporting every client under the sun should be a blocker.

I'm for this as well, especially if it's working fine for most devices and doesn't cause bugs in the devices it doesn't work for. @Nirzar - what do you think?

We should probably change the interaction too to move the image left or right with the swipe to give the user the feedback that the swipe is actually going to change the current image of the gallery. This would be a nice addition to the mobile site, most sites have mobile galleries that support swiping.

the swipe to navigate is not working on beta. if it is enabled then it is super buggy. can't promote unless we fix it.

tested on iPhone 5 / Safari / iOS 10

@Nirzar you're right, i can't get it to work on ios, but it works on chrome android. bleh.

I've checked and the code doesn't work in safari, because the way we're tracking the end touch ends up being the same as the start touch here so no swipe is detected.

In other libraries I've seen, they track the touches on touchmove and just do the final processing in touchend, that probably is the best way to make it cross-browser compatible.

I would suggest we remove this code from beta and revisit it at a later date when we have more bandwidth (we could also add swipe behaviour for left menu). What do we think?

@Jhernandez I can't get it working on android chrome too :(

I want to evaluate the capability of using gestures on mobile web, first. I still don't know if we can or cannot do it.

Let's stall this if more work is require apart from just promoting part.

Jdlrobson renamed this task from Promote mobile.mediaviewer.beta to stable to Remove mobile.mediaviewer swipe feature in beta .Apr 26 2017, 8:23 PM
Jdlrobson added a project: patch-welcome.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added subscribers: Florian, pmiazga.

Had a quick chat with Nirzar and updated the description. Sometimes you need to go backwards to go forward. I'm keen to wrap up the removal of SkinMinervaBeta (T147944).

I want to evaluate the capability of using gestures on mobile web, first. I still don't know if we can or cannot do it.

If you mean technically or if the experience would be good, I have this example that in my experience behaves pretty well on ios and android (tested on ios 10 and android 6 chrome):

Try it out and let me know what you think. The springiness, animations and resistance can be customized (in case they are off)

What I'm saying is that it can be done in the web and it is good experience. See google images for example (ios):

@Jhernandez yeah i meant technically. but cool you have a demo! I will check it out ( assuming we can deliver the exact same thing on mobilefrontend :)

There's two things here:

  1. throw out the existing code
  2. add swipe functionality to workflows.

We can either do these together or do them one at a time.

I think we should first start with removing the current functionality and then set up cards for the new swiping functionality. @Jhernandez - I liked your example - it possible on mobilefrontend?

Sounds good. Back to triaged but future :)

@ovasileva Yep, we should be able to implement something like that.

ovasileva set the point value for this task to 2.May 30 2017, 4:30 PM

Change 356768 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Remove abandoned swipe experiment

Change 356768 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Remove abandoned swipe experiment