Re: [w3ctag/design-reviews] Delegated Ink Trail (#473)

@atanassov and I are looking at this briefly in our Wellington face-to-face.

One thing I'm wondering is why the `requestPresenter` function takes a type as a string, rather than just having a method that returns either `Promise<DelegatedInkTrailPresenter>` or just `DelegatedInkTrailPresenter`.  It's not clear to me what the reason for this string-based extensibility mechanism is or how it's intended to be extended in the future.  And what is the abstract `InkPresenter` intended to extend to in the future?  In general, extensibility mechanisms seem sensible if there's a good idea of how to extend it in the future; it would be good to get an understanding of what you see that extension as being so we can help evaluate if this API makes sense for it.

It would also be interesting to understand why `Promise` is used here; what potentially requires it to be asynchronous?

I'm also wondering why the `radius` is an unsigned long -- that seems worrying in that more fractional accuracy might be desirable.  It seems like it should either be consistent with canvas which tends to use `unrestricted double` (probably more likely) or consistent with CSS and use length strings.  It's also not clear to me what the `radius` is measuring.

It's also not clear why the Element argument to `requestPresenter` is optional, and what happens if it's omitted.  (And is that element argument always the `presentationArea` of the result?  Seems likely, but perhaps worth saying.)

I'm also a little worried about the naming of these functions, in that there isn't really a function call whose name suggests "go ahead and do ink drawing for everything that's happened since `setLastRenderedPoint`".  A call to `requestPresenter` perhaps doesn't sound like it's going to do that.  (And I *think* that's what makes it happen, although I might be misreading.)

I'm also a little concerned about the `usePrediction = true` example.  Can't the prediction be wrong?  Doesn't it then require that the example do more work to clean up the incorrect prediction data?  Or do I misunderstand what "prediction" means here.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/473#issuecomment-594932535

Received on Wednesday, 4 March 2020 23:31:09 UTC