-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Meta: Use cross-multipage dfn.js #2638
Conversation
https://sideshowbarker.net/html/multipage/ has cross-multipage dfn.js enabled for testing/review https://sideshowbarker.net/html/ has single-page using the cross-multipage dfn.js code |
I tested a couple things and it seems to work rather well. Neat! |
The panel does not stay open when clicking a link (both when it goes to a new page or on the same page). That is, |
Just got a chance to play with this. Amazing! I noticed the first load is a little slow. I wonder if we want to open the popup with a message like "Loading cross-references..." that we then replace when the loading is done. That can easily be added later though.
It would be good to fix this for same-page at least. For going to a new page, that might not be worth it for now. |
This makes the dfn panel stay open when clicking a dfn link that goes to the same page, but not when going to a new page. See whatwg/html#2638 (comment) and whatwg/html#2638 (comment)
I’ve gone ahead and fixed it for just same-page for now. I hope we can agree that making it work when navigating to a new page is something that can wait til later. https://sideshowbarker.net/html/multipage/ and https://sideshowbarker.net/html/ have the latest |
OK I’ve pushed a refinement which adds that. https://sideshowbarker.net/html/multipage/ and https://sideshowbarker.net/html/ both now have that. For me it’s a little hard to test the presentation of it, since on my network it loads so quickly that the "Loading cross-references..." panel shows only very briefly. But functionally it seems to work. |
Tested by throttling network in Opera's devtools. 👍 |
561eb46
to
b5e92ef
Compare
This change enables the dfn popups in multipage output to show links to all cross-references for a term across all files in the multipage output.
This allows multipage dfn.js, per whatwg/html#2638.
b5e92ef
to
b57b559
Compare
This change causes wattsi to emit a new xrefs.json file as part of the build. For each <dfn> element in the spec source, the xrefs.json file has a list of the spec section names that have a cross-reference to that <dfn>, and for each section name, a list of cross-reference anchors from that section to the <dfn>. This is part of whatwg/html#2638.
hot diggity dog—thanks much for wrapping this one up |
This change enables the dfn popups in multipage output to show links to all
cross-references for a term across all files in the multipage output.
Not be merged to master as-is at this point; instead we first need to decide
where the multipage dfn.js script will live, the update the URL in the patch on
this PR branch.
For now, this PR just uses the URL for the dfn.js version on the branch at
whatwg/resources.whatwg.org#56 branch (in the interest
of providing a way to run the build with multipage dfn.js enabled, and to
review the output).
Depends on: