You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.
Implementing gestures and scrolling present several challenges:
They require intimate knowledge of the DOM and DOM events.
They are somewhat inconsistent across browsers.
To truly model the user action, it requires the widget to break encapsulation of the DOM to listen for events outside of its own DOM structure.
Currently require duplication of code across widgets needing to support these features.
Therefore we should consider abstracting these features via the meta API. Conceptually an interaction would look something like this:
Widget indicates that it wasn't to know about scrolling for itself or one of its keys.
The meta manager ensure that it is listening for the proper events if it isn't already.
When the scroll event occurs that applies to the widget, it invalidates the widget.
When the widget renders, it requests the information about the scroll position.
Additional considerations:
Integration and further abstraction of the Intersection Observers meta?
Implement a full drag and drop solution, including target acceptance and other features over time?
For scrolling, it would be a good idea to deal in abstract concepts and likely would need to integrate into the dimensions meta as well. For example, it would be good if the widget could offload the calculation of the changes from a relative value to a specific value. Specifically, given a horizontal scroll event, the widget would have offered up some relative scale to meta on subscription (e.g. 100) and the change would be relative. (e.g. 1 or -1) and to the meta dimensions it could say "tell me what my absolute scroll top would be if the change was a relative -1 out of 100). That way, the widget would have no need to be concerned about its absolute values, it simply would trust whatever is returned is accurate.
Drag meta has been available for sometime now and there no concrete requirements for additional work. Closing in favour of specific issues when use-cases are identified.
Enhancement
Implementing gestures and scrolling present several challenges:
Therefore we should consider abstracting these features via the meta API. Conceptually an interaction would look something like this:
Additional considerations:
100
) and the change would be relative. (e.g.1
or-1
) and to the meta dimensions it could say "tell me what my absolute scroll top would be if the change was a relative-1
out of100
). That way, the widget would have no need to be concerned about its absolute values, it simply would trust whatever is returned is accurate.Prior art/references:
Refs: #507
The text was updated successfully, but these errors were encountered: