-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cssom-view] New feature - scroll-boundary-behavior (an extension of -ms-scroll-chaining) #769
Comments
/cc @zcorpan @ChumpChief |
Personally I think this is a reasonable proposal and cssom-view seems like a good home for the feature. The name of the property was brought up in the WICG thread. I don't have a strong opinion at this time. The property IE/Edge support has been discussed in the context of Houdini:
Did someone complain? :-) It would be good to have relevant people from Apple and Mozilla also, so we don't spec and ship something that they object to. cc @hober @dbaron |
I think at that point in time @RByers assumption was that Chrome has disabled chaining only during the gesture and I don't think we have any major complains there. However, it still does scroll chaining at the beginning of the gesture and I doubt very much if we ever want to disable that by default. This is the case that we see the most value for having an API that provides an escape hatch. |
FWIW I think this is a reasonable proposal and it would give us a good way to fix bug 951793 in Firefox. |
So from today's teleconference a number of points came up:
So I think, at the very least, the initial value would need to have a better match for what today's behavior is, assuming we don't have a wide agreement to change the behavior. There was also concern about the name of the |
Thanks for the feedback.
We can actually leave when the decision is made unspecified and leave it up to UA implementation. I More below.
I can confirm this is indeed the case in Gecko for keyboard (tested on Linux).
I think this is reasonable. I don't believe we need to have all UAs agree on which inputs and exactly when (per-pixel or per-gesture) they chain the scroll. All main usecases that need this feature actually care about a consistent method to prevent the default chaining as opposed to forcing chaining to happen for a particular input or at a particular time. Here is one way we can spec this to achieve the above without taking away the UA flexibility in deciding when to chain.
|
+1 for Also agreed the specifics of when to propagate don't need specification. Something like this should be fine: "UAs may elect to scroll an ancestor element when the targeted element has reached its boundary in the direction of the scroll. This ancestor scrolling behavior must be disabled by..." |
If I am reading this correctly, it seems that there is enough consensus around the last proposed version of the API and its applicability. We are planning to start working on its implementation in Blink fairly soon. Perhaps, it is best to start a pull request to the spec to clarify the language and details. BTW, in last BlinkOn conference, we had a chance to chat with some Facebook DevRel folks which mentioned they are very interested in this feature:
|
Confirming that this is really important to FB. We can test this out pretty quickly once it's committed to Blink. |
@majido yes a pull request sounds good to me, we can discuss in more detail then. |
We'd really like this in AMP as well. |
There's a related proposal with a confusingly similar name 'overscroll-action': overscroll-action applies to the gesture on the viewport for history navigation (2 finger swipe back on Mac) and pull-to-refresh. I find the nomenclature a bit confusing because 'overscroll-action: auto' would suggest that the element would behave as if it had 'scroll-boundary-behavior: propagate' which is orthogonal.
[edit] Corrected property name to scroll-boundary-behavior in 3) |
Agenda+ to discuss adding it to an actual spec draft. If this is something we want to add, we should have it in a draft somewhere and people can file issues on specifics. |
Also, since this is (afaict) a CSS property and not an OM feature, it probably belongs in css-overflow rather than cssom-view... |
We (@flackr, @majido, @RByers ) will be in Tokyo for the CSSWG meeting and would be happy to lead a session to get into details there if this would be helpful. We can draft up something after Tokyo F2F if that makes sense.
No particular opinion here. It will be great if we land on an answer here in next telecom. The original rationale for why cssom was in comment#1:
I have chatted with @majido to ensure we are on the same page with regards to the overscroll-action vs scroll-boundary-behavior API:
A bit of history here, we developed overscroll-action API idea first in response to a specific set of overscroll navigation usecases. But now we think it is possible to address those use cases with scroll-boundary-behavior API in a simpler and more generic way.
We should avoid having two different ways to control overscroll navigation actions. So if we allow scroll-boundary-behavior to control overscroll navigation then it is best to ditch overscroll-action. Toggling overscroll animations independent from navigation gesture could be accomplished using the extended API you proposed in #3.
I think it’s best left to the UA’s discretion whether showing a bounce or glow makes sense when you are going to propagate the scroll. The intention of disabling it is to allow the author to control the containment case.
scroll-boundary-behavior-x: contain (I assume you meant scroll-boundary-behavior-x since contain is not a property of overscroll-action-x) does behave as if overscroll-action: no-navigation-x was set as the scroll does not propagate to the “default” browser behavior, e.g. this may be navigation, refresh, etc. This is equivalent to the script performing preventDefault on the additional events as you had suggested. |
Agreed. From the Edge perspective, any UA reactions to scrolls beyond the boundary (navigation, pull-to-refresh, Flip Ahead) are well-controlled by simply blocking the propagation of the scroll above the root scroller.
I think this proposal should be That said, I'm not aware of any implementation that propagates in combination with showing a visual effect of any sort. Implementation-wise this would be unusual since the transform from the input is "applied towards" a particular target. Visually to a user it would also look strange as the ancestor scrolls (or does some other effect) while the child displays an effect that is meant to signify "you can't scroll any further". When that effect is a bounce e.g. in response to touch panning it would result in the bounced content moving twice as fast as the user's finger (the transform being applied to both the element and its ancestor). I don't think that's a combination we should support. Without that combination there are only 3 states, which map to the |
I think it'd be reasonable for a UA to show a visual indication of overscroll on a contained scroll. Rather than showing a bounce on the ancestor which would indeed look weird you'd show it on the element that was over scrolled.
…Sent from my iPhone
On Mar 28, 2017, at 9:44 AM, Matt Rakow ***@***.***> wrote:
A bit of history here, we developed overscroll-action API idea first in response to a specific set of overscroll navigation usecases. But now we think it is possible to address those use cases with scroll-boundary-behavior API in a simpler and more generic way.
We should avoid having two different ways to control overscroll navigation actions. So if we allow scroll-boundary-behavior to control overscroll navigation then it is best to ditch overscroll-action.
Agreed. From the Edge perspective, any UA reactions to scrolls beyond the boundary (navigation, pull-to-refresh, Flip Ahead) are well-controlled by simply blocking the propagation of the scroll above the root scroller.
Right now it's not possible to propagate scrolling while disabling the overscroll animation. If this is something that's important perhaps a better proposal to cover the 4 logical states could be:
scroll-boundary-behavior: [auto || [ [propagate || contain] | [overscroll || no-overscroll] ]
I think this proposal should be [auto | contain] || [overscroll | no-overscroll] for the reasons David and Majid mentioned in the previous comments about input type discrepancies and spelling difficulty.
That said, I'm not aware of any implementation that propagates in combination with showing a visual effect of any sort. Implementation-wise this would be unusual since the transform from the input is "applied towards" a particular target. Visually to a user it would also look strange as the ancestor scrolls (or does some other effect) while the child displays an effect that is meant to signify "you can't scroll any further". When that effect is a bounce e.g. in response to touch panning it would result in the bounced content moving twice as fast as the user's finger (the transform being applied to both the element and its ancestor). I don't think that's a combination we should support.
Without that combination there are only 3 states, which map to the auto | contain | none values. I strongly prefer this option over providing 4 states.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
This is the |
What if I want to contain but have no bounce?
…Sent from my iPhone
On Mar 28, 2017, at 10:56 AM, Matt Rakow ***@***.***> wrote:
I think it'd be reasonable for a UA to show a visual indication of overscroll on a contained scroll. Rather than showing a bounce on the ancestor which would indeed look weird you'd show it on the element that was over scrolled.
This is the contain value in the 3-state model. None of the values would result in a visual effect on an ancestor of an element that contained the scroll.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
That would be the |
The CSSWG resolved to work on this in a WICG repo for now, to test out the whole incubation process. |
The repo is now live: I've tried to summarize this discussion. All discussion is welcome in this repo. I'll start a spec draft in the repo after a bit more discussion (or lack of) has happened. |
I've posted a draft here: Feedback is welcome |
Our implementation is now in Canary behind a flag and you can test it (simple demo). Feedback and bug reports are very welcome. As our implementation has matured we have been giving @bgirard feedback based on it. We feel confident enough with our implementation and the spec and thus are considering to ship it in Chrome M63. What works:
Work that is still in progress:
|
@majido Thanks for Canary implementation! Tested. But without Hope it will be possible by the time feature released! |
@klimashkin this chromium bug tracks that particular feature. You can star that to follow our progress and leave specific comments there but current plan is to fix that for M64. |
I filed for TAG review for this API and here is the full feedback. One of the feedback items which I am not fully sure about is whether this should be part of the
I am inclined to think it is best if this is a separate property i.e., the current design. I can imagine cases where one component want to control I provided a tentative response based on the above. However, if there is anyone here who has a strong opinion one way or another I love to hear it and will reflect that to TAG. Same goes for any other feedback item there. |
I like your response and agree it should be a separate property from |
As a non-US speller, a property name that doesn't include |
I'd argue this property is highly related to
I think other synonyms for "behavior" could potentially be fine, though I don't necessarily think there's anything wrong with that choice and I kind of like the parallel to |
Those two things sound different to me and seem only related by the fact they have something to do with scroll. Furthermore, With regards to the length, our experience with |
I think there's some good points here. But I would like to note that Another example: I do somewhat like I think a better place to discuss this would be under a new issue in the repo: |
I agree with Brian—"behavior", like "mode", is a zero-information word that should not be included in the property name. Most properties could have But yeah, we should move the discussion to the WICG. I'll close this issue. ^_^ |
I've noticed a small issue unless this is by design. When you have a drawer that doesn't need scrolling, due to content size, it allows overscroll but I presume most people would want overscroll to still be blocked. |
@Link2Twenty It's by design, though cross axis scrolling (not exactly overscroll effects) seems surely overlooked in the spec language. See #3349 But in your example, for the nav you could add |
We are proposing standardization of "-ms-scroll-chaining" with some modification. The details of the proposal can be found in this WICG where it is being incubated but here is the executive summary of proposed feature:
scroll-boundary-behavior: propagate | contain | none
propagate
: propagate scroll to the parent scroller. If there is no parent scroller (e.g., viewport) user-agent may perform a default action (e.g. navigation) or show any appropriate overscroll UI affordance. This is the default value.contain
: do not propoagate. The user agent may show an appropriate overscroll UI affordance such as glow/bounce etc.none
: same as contain but also prevents any overscroll UI affordance e.g. bounce or glow.There will be scroll-boundary-behavior-{x,y} long-hands too.
Here are the differences compared to existing
-ms-scroll-chaining
which is fairly limited in functionality:I think CSSOM View is probably the right spec to host this new attribute as it provides an API to control certain aspects of scrolling (similar to
scroll-behavior
in this respect).There is some agreement on WICG that the proposed changes are reasonable and useful. So if you think this is the right spec to standardize I can start working on a pull request with appropriate changes to make the proposal more concrete. Any feedback on functionality and naming is also very welcome and appreciated.
The text was updated successfully, but these errors were encountered: