Page MenuHomePhabricator

Better support for mobile touch events in Codex
Open, Needs TriagePublic

Description

This topic came up in the discussion at T332767: OnboardingDialog: Add OnboardingDialog component pattern to Codex, but I thought it deserved consideration in its own ticket.

afaik Vue provides touch low level events, eg touchstart, touchend and there are libraries (vue3-touch-events) that implement higher level events, eg: tap, swipe, hold, drag, etc. which is the kind of interaction you are requesting. It would be interesting to know the Design-System-Team view on this. Will Codex support mobile gestures as first class interactions? Or do we have a recommended way of tying together Codex with mobile gestures, a plugin maybe?

Vue provides basic support for mobile touch events, and 3rd-party libraries (like the vue3-touch-events library that @Sgs mentioned) exist which can provide additional support for specific gestures.

It sounds like at least one component currently in development (OnboardingDialog) has need of some amount of mobile gesture support. In the future I imagine that more situations may arise that need some specific gesture support.

Questions for consideration
  • Do we need this (and do we need it now)?
  • Is this important enough that we should add additional support for touch events upstream within Codex itself?
  • Is this the sort of thing that is better handled outside of Codex (perhaps as a Vue plugin that gets installed by the consuming application on the MediaWiki side)?
  • Do we want to implement this functionality ourselves, or can we rely on a 3rd-party library (like the one mentioned above)? Any external lib we use will probably need to go through security review.
Next steps
  • Determine how we want to proceed by answering some of the above questions