Re: [csswg-drafts] [css-scroll-snap-1] Avoid page scrolling skipping past snappable items (#10914)

The CSS Working Group just discussed `[css-scroll-snap-1] Avoid page scrolling skipping past snappable items`, and agreed to the following:

* `RESOLVED: pageUp/pageDown type operations should never scroll by more than a page, unless that's the only valid snap area`
* `ACTION: flackr to sketch out a scroll-by-page API`

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> flackr: context of scroll buttons , but pre-existing issue with snapping<br>
&lt;fantasai> flackr: currently if you pgae down, the browser can select a snap area that is more than one page away<br>
&lt;fantasai> flackr: even though there's a possible snap area that's not that far away<br>
&lt;fantasai> flackr: I propose putting wording in the spec that, at least for explicit actions like page down, find a snap area that is less than one page away<br>
&lt;fantasai> flackr: so that you don't skip over content<br>
&lt;fantasai> flackr: then I had a further open question of whether we need to solve this for scrolling APIs<br>
&lt;fantasai> flackr: original issue was calling .scrollTo<br>
&lt;fantasai> flackr: to mimic same behavior<br>
&lt;dholbert> fantasai: I think yes, page-up page-down should scroll &lt;= viewport<br>
&lt;dholbert> fantasai: might be exactly equal, but could be &lt;=<br>
&lt;dholbert> fantasai: for programmatic API, those are supposed to [...]<br>
&lt;Rossen6> ack fantasai<br>
&lt;dholbert> fantasai: ...have the same behavior as a person scrolling<br>
&lt;dholbert> fantasai: if scroll-snap is going to interfere with a person scrolling, then programmatic aPI should get that same interference<br>
&lt;dholbert> flackr: if I make a page-down button, as a web developer, and add an event listener that calls scrollTo(currentPos + 85% of scrollport)<br>
&lt;dholbert> flackr: the same problem as pressing pagedown on keyboard exists, that browser could select something further away<br>
&lt;dholbert> flackr: should we try to scroll less?<br>
&lt;dholbert> fantasai: round-down version?<br>
&lt;dholbert> flackr: most expressive version is to say "don't want to scroll more than 1 page"<br>
&lt;dholbert> fantasai: ...<br>
&lt;dholbert> flackr: that's scrollIntoView<br>
&lt;dholbert> flackr: this is for APIs where you specify how far you want to scroll, or a position<br>
&lt;dholbert> fantasai: do we want to add a scrollByPages API?<br>
&lt;dholbert> flackr: that would be reasonable<br>
&lt;dholbert> fantasai: or do we give a "bias-towards" parameter?<br>
&lt;dholbert> fantasai: which of those would make more sense<br>
&lt;dholbert> flackr: I feel like we'd be more likely to do what the dev expects, if the API was specifically "scroll by a page"<br>
&lt;dholbert> fantasai: I guess then we have 2 resolutions?<br>
&lt;dholbert> fantasai: (1) pageUp/pageDown type operations should never scroll by more than a page, unless that's the only valid snap area<br>
&lt;dholbert> PROPOSED RESOLUTION: pageUp/pageDown type operations should never scroll by more than a page, unless that's the only valid snap area<br>
&lt;dholbert> RESOLVED: pageUp/pageDown type operations should never scroll by more than a page, unless that's the only valid snap area<br>
&lt;dholbert> fantasai: (2) we want to add some kind of scroll-by-page type API, to be sketched out by flackr<br>
&lt;dholbert> flackr: I can sketch that out<br>
&lt;dholbert> Rossen6: no need to resolve on that now<br>
&lt;fantasai> ACTION: flackr to sketch out a scroll-by-page API<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10914#issuecomment-2380139977 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 27 September 2024 21:53:39 UTC