[dojo-contributors] Fwd: Dojo & Mobile - devs needed

Evan Huang evanhuangwei at gmail.com
Fri Oct 8 09:19:13 EDT 2010


Thanks, Eugene,

Canvas might be a good candidate for experiment, not only due to
targeting the hot HTML5, but also canvas seems to run faster so more
suitable for mobile(will need a further check).

1. Actually I meant shape events in canvas, though there're already
some implementation(e.g. as below), yes, it's still arguable whether
worth to impl, since it tends to be inefficient and rigid to some
extent(never to mention if we'd like to support rich event types)
- http://www.rgraph.net/examples/rose.html
- http://www.rgraph.net/examples/hbar.html
- http://www.rgraph.net/examples/line.html
- http://www.xs4all.nl/~peterned/3d/

So (a) would be more reasonable, but just as you mentioned we still
need to figure out more suitable UX pattern(paradigm)

2.Yes, we can just ignore it for canvas

3.The mapping API(from low to high level gesture) sounds great, in
that way, it could be shared both for global HTML and canvas-level
events.

I'll keep investigating (though with very limited time pre-1.6) and
get back once any updates.

Thanks!
- Evan

On Fri, Oct 8, 2010 at 5:14 AM, Eugene Lazutkin <eugene at lazutkin.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Great ideas! The rest is inline.
>
> On 10/7/10 3:23 AM, Evan Huang wrote:
>> Yeah, having a minimized but still highly extendable Chart Main class
>> would be a great idea, also several more possible
>> items for accommodating charting on mobile:
>>
>> 1. Events enhancement for typical Touch & Gesture scenario
>> Since we won't avoid facing this increasing reqts, once a HTML
>> based Touch & Gesture layer ready in dojox.mobile, we then need to add
>> corresponding changes in charting - more specifically add related event
>> support into canvas impl in dojox.gfx?
>>
>> e.g. in mobile charting, add a new "MobilePlotEvents" by extending
>> "dojox.charting.plot2d._PlotEvents" for handling Touch & Gesture events
>
> My understanding is that when talking about events you mean SVG. Canvas
> is an image element essentially, and it cannot process events that
> target individual shapes, unless we implement the event routing ourselves.
>
> Another problem is that touch events are much more coarse/imprecise than
> mouse events, so probably we need to split them into two categories (at
> least):
>
> a) Whole chart: zooming/scaling, scrolling/panning, going full-screen to
> see more details.
>
> b) Detailed view: touching individual components to see more info
> (replaces tooltips).
>
> Maybe (b) should be available only when in the full-screen mode (a).
> Obviously we need gestures for all those actions.
>
>> 2. Lightweight animations with CSS3
>> Mobile charting may also need lightweight animations with CSS3
>>
>> e.g. add new actions by extending dojox.charting.action2d.* package,  if
>> possible the mobile actions will try to use CSS3 for animations,
>> otherwise just reuse dojo.fx from their parent classes
>
> Again it does not apply to Canvas for obvious reasons. It applies to
> HTML components we can use to supplement charts, and to some degree to
> SVG. The latter (CSS with SVG) has some vendor implementation problems
> as far as I remember (need to check on that again).
>
>> In order to reduce code size a bit, mobile charting can be packaged with
>> canvas impl in dojox.gfx, that shall make sense since dojox.mobile
>> mainly targets HTML5.
>
> It is a possibility. With canvas we don't need the shape-level event
> infrastructure, so it cuts down on code. We still can implement
> chart-level events mentioned in (a).
>
>> BTW, for big widgets used in mobile like Charting & Grid, I think good
>> support for touch & gestures like swipe, pinch, scale, rotate etc. may
>> become more important since that will provide user flexible ways to see
>> the details as expected.
>
> Absolutely! That's why I think we should have a detailed plan for (a)
> and (b) with mapping them to gestures. Probably we need a gesture
> API/filter, which can translate low-level events into high-level
> commands, which can be consistently reused in Dojo.
>
> Cheers,
>
> Eugene
>
>>
>> Regards!
>> - Evan
>>
>>
>> On Thu, Oct 7, 2010 at 4:48 AM, Eugene Lazutkin <eugene at lazutkin.com
>> <mailto:eugene at lazutkin.com>> wrote:
>>
>>     -----BEGIN PGP SIGNED MESSAGE-----
>>     Hash: SHA1
>>
>>     I like the idea, I don't like Chart2DMinimal. At the end of the day,
>>     when everything is deprecated and removed we will be stuck with
>>     Chart2DMinimal, which is long, and doesn't make any sense in the context
>>     without Chart2D.
>>
>>     I propose "Chart". Do you like it? Do yuo hate it? Let me know --- this
>>     is exactly the right time for bikeshedding.
>>
>>     Cheers,
>>
>>     Eugene
>>
>>     On 10/5/10 5:25 PM, Tom Elliott wrote:
>>     > I'm sure I'm missing something, but why not rename "Chart2D" to
>>     > "Chart2DMinimal" (or something snappier), remove all the requires
>>     (lines
>>     > 12 through 35), then have a new Chart2D that extends Chart2DMinimal
>>     > which includes all the existing requires.
>>     >
>>     > That way, the API will be consistent for anyone that doesn't care, and
>>     > anyone that does just dojo.require("Chart2DMinimal")'s and also
>>     requires
>>     > whichever plot and axis modules they want.
>>     >
>>     > ?
>>     >
>>     > On 5 October 2010 22:09, Eugene Lazutkin <eugene at lazutkin.com
>>     <mailto:eugene at lazutkin.com>
>>     > <mailto:eugene at lazutkin.com <mailto:eugene at lazutkin.com>>> wrote:
>>     >
>>     > There is one more thing I don't like in charting, and it will affect
>>     > mobile apps. Chart2D.js includes all possible axis objects (2 at the
>>     > moment), and all possible plots (20 at the moment). While it was
>>     okay in
>>     > the beginning and greatly reduced confusion of novices, it doesn't
>>     scale
>>     > going forward.
>>     >
>>     > We need to remove these references from Chart2D => user should require
>>     > plots and axes explicitly. While I know that this is the goal, I don't
>>     > know what is the good way to do it, because this change, while
>>     trivial,
>>     > is not backward compatible. I don't want to alienate users. Good
>>     plan is
>>     > needed for this transition.
>>     >
>>     > Thoughts? Ideas?
>>     >
>>     > Cheers,
>>     >
>>     > Eugene Lazutkin
>>     > Dojo Toolkit, Committer
>>     > http://lazutkin.com/
>>     >
>>     > On 10/05/2010 12:35 PM, Eugene Lazutkin wrote:
>>     >> Events are more-or-less decoupled from the drawing code. Let me know,
>>     >> what events you want supported and I'll add them.
>>     >
>>     >> I know that touch events are inaccurate, and it is hard select small
>>     >> items. If there are any UI paradigms that are more suitable for
>>     mobile
>>     >> --- again I am completely open to new ideas.
>>     >
>>     >> Cheers,
>>     >
>>     >> Eugene Lazutkin
>>     >> http://lazutkin.com/
>>     >
>>     >
>>     >> On 10/05/2010 11:22 AM, Tom Trenka wrote:
>>     >>> This is true, event handling on mobile is definitely not there for
>>     >>> Charting; IIRC there also may be some issues with Canvas and
>>     text but
>>     >>> Eugene would remember that better than I would.
>>     >
>>     >>> I *could* see a set of custom plotters that are aimed at the mobile
>>     >>> platform, though...
>>     >
>>     >>> -- Tom
>>     >
>>     >>> 2010/10/5 Tom Elliott <mrtom at cantab.net
>>     <mailto:mrtom at cantab.net> <mailto:mrtom at cantab.net
>>     <mailto:mrtom at cantab.net>>
>>     > <mailto:mrtom at cantab.net <mailto:mrtom at cantab.net>
>>     <mailto:mrtom at cantab.net <mailto:mrtom at cantab.net>>>>
>>     >
>>     >>>
>>     >
>>     http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/charting/tests/test_DataSeries.html
>>     > shows
>>     >>>     the charts fine on my iPhone fwiw.
>>     >
>>     >>>     However, whilst the charts themselves might work fine there are
>>     >>>     going to be some UX problems with tooltips that show when
>>     > hovering a
>>     >>>     data point. In the examples above clicking on the columns
>>     and pie
>>     >>>     segments shows the tooltips and works well, but it's really
>>     > hard to
>>     >>>     click on the nodes in the line chart (and if I didn't know
>>     > they were
>>     >>>     there I'd never have found them).
>>     >
>>     >>>     A mobile charting module might help here by defining an area to
>>     >>>     display the tooltip text and allowing swiping between the
>>     points?
>>     >>>     Not sure if that would want to become part of the module or
>>     > an extra
>>     >>>     component, just a thought.
>>     >
>>     >>>     Tom
>>


More information about the dojo-contributors mailing list