Closed Bug 965293 Opened 10 years ago Closed 6 years ago

Visually show touch interaction with the device.

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: vingtetun, Assigned: janx)

References

Details

Attachments

(1 file)

Such a tool will be useful for moz developers in order to debug some issues like the one described in https://bugzilla.mozilla.org/show_bug.cgi?id=947337#c48.

It will also be useful to help enhancing the fluffling algorithm by drawing the fluffed area following the finger. It then can be enhance by reporting the fluffing candidates in a followup.

It may also be useful for app developers if they want to optimize their UI for fluffing, as it is not always obvious to understand which elements will be selected by the touch code.

I can imagine a canvas based layer where touches are drawn for example.
What would be the best way to intercept all the touch events from shell.html?
needinfo vingtetun for the best way to intercept touch events
Flags: needinfo?(21)
(In reply to Paul Rouget [:paul] from comment #1)
> What would be the best way to intercept all the touch events from shell.html?

Which the underlying patch I have provided in the dependency you will just need to addEventListener('touchstart/move/end') when the touch event debug pref is |true|.
Flags: needinfo?(21)
(In reply to Vivien Nicolas (:vingtetun) (:21) from comment #3)
> (In reply to Paul Rouget [:paul] from comment #1)
> > What would be the best way to intercept all the touch events from shell.html?
> 
> Which the underlying patch I have provided in the dependency you will just
> need to addEventListener('touchstart/move/end') when the touch event debug
> pref is |true|.

s/Which/With
Assignee: nobody → janx
Status: NEW → ASSIGNED
Component: Developer Tools: App Manager → Gaia::System
Product: Firefox → Firefox OS
Version: Trunk → unspecified
Attached file gaia pull request
WIP, misses tests.
Blocks: 985886
Comment on attachment 8394041 [details] [review]
gaia pull request

Added a fadeout animation on touches. Vivien, how do you think I should test this?
Attachment #8394041 - Flags: feedback?(21)
(In reply to Jan Keromnes [:janx] from comment #6)
> Comment on attachment 8394041 [details] [review]
> gaia pull request
> 
> Added a fadeout animation on touches. Vivien, how do you think I should test
> this?

Spoked about it IRL, let's remove the needinfo?.
Comment on attachment 8394041 [details] [review]
gaia pull request

Looks good. I'm curious to see if we support touchcancel and I would like to make sure we don't instantiate any devtools until the pref is flipped.
Attachment #8394041 - Flags: feedback?(21) → feedback+
Depends on: 1005880
Summary: Implement a layer on top of Gaia to display touch interactions with the device → Visually show touch interaction with the device.
Comment on attachment 8394041 [details] [review]
gaia pull request

Updated the pull request with a dependence on 1005880 that fixes the homescreen issue.

I addressed most of the nits (except I didn't create a new devtools/ folder), and left the change as two separate commits: one with the canvas version, and one changing it to dom elements.

When things work better with the dom version, I'll squash the two commits, but for now several issues remain:

- (canvas version) too slow, shows up in profiles a lot
- (dom version) weird clipping bug when several touches are displayed
- (both) need some unit tests
Attachment #8394041 - Flags: feedback+ → feedback?(21)
Comment on attachment 8394041 [details] [review]
gaia pull request

Actually that's not really a feedback request. I need to file a bug about the graphics issue.
Attachment #8394041 - Flags: feedback?(21) → feedback+
Filed bug 1006074 about the cropped divs issue, and updated the pull request with a workaround (using opacity:0.9 on each square rather than on the container div fixes the problem).
TODO:
- use hit-target fluffing dimensions instead of 20px*20px: http://dxr.mozilla.org/mozilla-central/source/b2g/app/b2g.js#729-740
- a few unit tests
No longer depends on: 1005880
No longer blocks: 985886
Depends on: 985886
No longer depends on: 964904
Depends on: 1006500
Depends on: 1010407
Firefox OS is not being worked on
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: