Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Scrolling, Gesture and Dragging abstraction via meta #571

Closed
kitsonk opened this issue Jun 12, 2017 · 3 comments
Closed

Scrolling, Gesture and Dragging abstraction via meta #571

kitsonk opened this issue Jun 12, 2017 · 3 comments

Comments

@kitsonk
Copy link
Member

kitsonk commented Jun 12, 2017

Enhancement

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.

Prior art/references:

Refs: #507

@dylans dylans added this to the 2017.06 milestone Jun 16, 2017
@dylans dylans modified the milestones: 2017.06, 2017.07 Jul 4, 2017
@kitsonk kitsonk added the beta3 label Jul 28, 2017
@dylans dylans modified the milestones: 2017.08, 2017.07 Jul 29, 2017
@kitsonk kitsonk mentioned this issue Aug 22, 2017
3 tasks
@kitsonk kitsonk modified the milestones: 2017.08, 2017.09 Sep 4, 2017
kitsonk added a commit that referenced this issue Oct 6, 2017
Resolves #571 (in part)
@kitsonk
Copy link
Member Author

kitsonk commented Oct 6, 2017

Drag Meta does not fully resolve issue.

@kitsonk kitsonk reopened this Oct 6, 2017
@kitsonk kitsonk added the beta4 label Oct 9, 2017
@kitsonk kitsonk modified the milestones: 2017.09, 2017.12 Oct 9, 2017
@kitsonk kitsonk added the rc label Oct 9, 2017
@kitsonk
Copy link
Member Author

kitsonk commented Oct 9, 2017

We have delivered part of this, the rest should be delivered as we re-factor/address widgets where such functionality is required.

@agubler agubler removed the rc label Jan 4, 2018
@dylans dylans removed this from the 2017.12 milestone Jan 17, 2018
@agubler
Copy link
Member

agubler commented Jan 25, 2018

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.

@agubler agubler closed this as completed Jan 25, 2018
@dylans dylans added this to the 2018.01 milestone Feb 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants