Repository navigation
Markup arguments in navigate algorithm - #1117
Conversation
|
From a cursory look, this is an improvement, IMO. |
|
I think it is too. Next step would be refactoring things such as "exceptions enabled" and "reload-triggered navigation" to be explicit optional arguments. |
|
In step 22 and 24 there are a lot of "browsing context" strings that maybe could be browsingContext; it is hard for me to be sure. Similarly, steps 16 onward have a lot of un-italicized "resource", and it seems like some of them definitely could be resource. Happy to trust your judgment since a lot of these are ambiguous, given the nature of the algorithm. But wanted to point them out to see what you thought. |
|
Also about the commit message, I think "mark up" is the verb and "markup" is the noun. |
|
You are right about browsing context, I think I got all of them now. Resource is much more complicated and needs to be slowly untangled. Not quite sure how yet. |
|
Needs a rebase because of the javascript: stuff that just landed |
|
Was afraid of losing to that. Will do. |
There is more work to be done here, but this is a first step towards making the navigate algorithm a little easier to read and digest.
c336e31 to
d2d2d57
Compare
|
Done. |
Replace the hand-rolled window.scrollTo(rect.top - Xpx) with the
browser-native scrollIntoView({block:'start'}) + CSS scroll-margin-top.
The offset now lives in CSS (25vh) as a single source of truth,
viewport-relative, and uses the standard scroll-snap primitive.
This is the de-facto workaround pattern for iframe-embedded apps on iOS
where visualViewport doesn't expose the keyboard (well-known WebKit
limitation — see bugs.webkit.org/178855 and whatwg/html#1117).
This is a start with marking up the two most explicit arguments to the navigate algorithm. It doesn’t address any of the problems per se, such as that it’s unclear what “resource” is here and such.
It also doesn’t tackle the various algorithms navigate hooks into.
It’s not entirely clear to me how to best approach this. This algorithm is dearly in need of some serious work and I figured that maybe by taking small steps we can make it better over time, but maybe there’s a better approach?