Skip to content
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

Merged
merged 1 commit into from
Jun 7, 2017
Merged

Conversation

sideshowbarker
Copy link
Contributor

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:

@sideshowbarker
Copy link
Contributor Author

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

@annevk
Copy link
Member

annevk commented May 7, 2017

I tested a couple things and it seems to work rather well. Neat!

@zcorpan
Copy link
Member

zcorpan commented May 9, 2017

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, dfnMovePanel seems to be broken. And maybe there needs to be new logic to open the panel on load?

@domenic
Copy link
Member

domenic commented May 9, 2017

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.

The panel does not stay open when clicking a link (both when it goes to a new page or on the same page).

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.

@domenic domenic added do not merge yet Pull request must not be merged per rationale in comment spec tooling labels May 9, 2017
sideshowbarker added a commit to whatwg/resources.whatwg.org that referenced this pull request Jun 4, 2017
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)
@sideshowbarker
Copy link
Contributor Author

The panel does not stay open when clicking a link (both when it goes to a new page or on the same page).

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.

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

sideshowbarker added a commit to whatwg/resources.whatwg.org that referenced this pull request Jun 4, 2017
@sideshowbarker
Copy link
Contributor Author

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.

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.

@zcorpan
Copy link
Member

zcorpan commented Jun 5, 2017

Tested by throttling network in Opera's devtools. 👍

@domenic domenic force-pushed the sideshowbarker/multipage-dfn branch from 561eb46 to b5e92ef Compare June 7, 2017 22:47
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.
domenic added a commit to whatwg/html-build that referenced this pull request Jun 7, 2017
@domenic domenic force-pushed the sideshowbarker/multipage-dfn branch from b5e92ef to b57b559 Compare June 7, 2017 23:06
domenic pushed a commit to whatwg/wattsi that referenced this pull request Jun 7, 2017
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.
@domenic domenic merged commit e049e51 into master Jun 7, 2017
@domenic domenic deleted the sideshowbarker/multipage-dfn branch June 7, 2017 23:33
@sideshowbarker
Copy link
Contributor Author

hot diggity dog—thanks much for wrapping this one up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge yet Pull request must not be merged per rationale in comment spec tooling
Development

Successfully merging this pull request may close these issues.

None yet

4 participants