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

NavigatorOnline.onLine IDL attribute is not exported to bikeshed's database #6053

Open
dbaron opened this issue Oct 11, 2020 · 8 comments
Open
Labels
meta Changes to the ecosystem around the standard, not its contents

Comments

@dbaron
Copy link
Member

dbaron commented Oct 11, 2020

NavigatorOnline.onLine is not exported to bikeshed's database as an IDL attribute. (It's exported as the navigator.online dfn, though.) This means that a reasonable way to reference it in bikeshed like {{NavigatorOnline/onLine|navigator.onLine}} or {{Navigator/onLine|navigator.onLine}} doesn't work. See the following test bikeshed document:

<pre class="metadata">
Title: Web Platform Design Principles
Group: tag
Shortname: design-principles
Repository: w3ctag/design-principles
Status: ED
Level: none
ED: https://w3ctag.github.io/design-principles/
Editor: Sangwhan Moon, Invited Expert, https://sangwhan.com
Abstract: This document contains a set of design principles to be used when designing Web Platform technologies. These principles have been collected during the Technical Architecture Group's discussions in <a href="https://github.com/w3ctag/design-reviews/">reviewing</a> developing specifications. We encourage specification designers to read this document and use it as a resource when making design decisions.
</pre>

<div class="example">
If a JavaScript task has accessed the {{NavigatorOnline/onLine|navigator.onLine}} property,
and browser's online status changes,
the property won't be updated until the next task runs.
</div>

which produces the output:

LINK ERROR: No 'idl' refs found for 'onLine'.
{{NavigatorOnline/onLine|navigator.onLine}}
 ✔  Successfully generated, with 1 linking errors

We worked around this in w3ctag/design-principles#242.

dbaron added a commit to dbaron/design-principles that referenced this issue Oct 11, 2020
This links to whatwg/html#6053 for the workaround added in w3ctag#242.
@annevk annevk added the meta Changes to the ecosystem around the standard, not its contents label Oct 12, 2020
@annevk
Copy link
Member

annevk commented Oct 12, 2020

@plinss is this something you could help with? I thought IDL was taken care of automatically.

@domenic
Copy link
Member

domenic commented Oct 12, 2020

The intent is to mark up all our <dfn>s explicitly, so that we can transition away from the fallible heuristics Shepherd uses. It looks like this was missed in #5916. #5957 doesn't cover it either because the <dfn> is outside the IDL fragment. /cc @dontcallmedom.

@dontcallmedom
Copy link
Contributor

https://raw.githubusercontent.com/w3c/webref/master/ed/dfns/html.json correctly identifies it with the proper dfn-type. and as a result #5956 would fix this I believe.

Also, once speced/bikeshed#1761, the right dfn type will be exposed to bikeshed and respec specs independently of whether or when #5956 gets merged.

@dontcallmedom
Copy link
Contributor

hmm... looking into #5956 it would probably need to be tweaked since right now the <dfn> would try to expose the full navigator.onLine as the attribute, rather than just onLine - will flag it there.

@plinss
Copy link

plinss commented Oct 12, 2020

Shepherd does parse IDL and uses that to classify existing anchors where names match, but it doesn't generate dfns that don't exist. Having explicit markup on dfns is preferred. Bikeshed uses the same IDL parser and similar heuristics to generate the proper markup on the output spec. Ideally wattsi should do something similar.

dbaron added a commit to w3ctag/design-principles that referenced this issue Oct 12, 2020
This links to whatwg/html#6053 for the workaround added in #242.
@annevk
Copy link
Member

annevk commented Oct 13, 2020

@dontcallmedom FWIW, I would not mind dropping navigator. from the text. If that helps I can prepare a PR. That's an old-style leftover.

@dontcallmedom
Copy link
Contributor

I have just suggested dropping navigator. in https://github.com/whatwg/html/pull/5956/files#r503712458

@annevk
Copy link
Member

annevk commented Oct 13, 2020

Okay, that also works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Changes to the ecosystem around the standard, not its contents
Development

No branches or pull requests

5 participants