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

Add permanent anchor/required IDs support #128

Open
domenic opened this issue Jun 25, 2020 · 2 comments
Open

Add permanent anchor/required IDs support #128

domenic opened this issue Jun 25, 2020 · 2 comments

Comments

@domenic
Copy link
Member

domenic commented Jun 25, 2020

To support https://whatwg.org/working-mode#anchors, Wattsi should have a means of checking that anchors are permanent, like Bikeshed does. In particular we should have some metadata in the source (near the top), which lists the "required IDs", which Wattsi can read. And then, when Wattsi gets to the bottom, if those IDs have never shown up, the build fatally errors.

The big question here is how we store the information. One quick-and-easy idea is <html data-required-ids="space separated list"> (with that attribute being removed in the output) but there might be something simpler.

@sideshowbarker, you've looked a lot at the ID code for MDN annotation stuff; any thoughts?

@sideshowbarker
Copy link
Contributor

@sideshowbarker, you've looked a lot at the ID code for MDN annotation stuff; any thoughts?

I think what’s outlined in the issue description is doable in the Wattsi code with a relatively low level of effort.

The big question here is how we store the information. One quick-and-easy idea is <html data-required-ids="space separated list"> (with that attribute being removed in the output)

That would be fine, but I wonder why not instead just hardcode the ID values into an array in the Wattsi source? Maybe I’m overlooking some obvious reason for not doing it that way — but otherwise, it seems to me that would most-robust, least-error-prone way to ensure the output gets published with the required IDs.

@domenic
Copy link
Member Author

domenic commented Jun 26, 2020

It feels like we shouldn't need to update and recompile our build tools when a new permanent anchor is requested. I.e., the list of permanent anchors is data, not code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants