Upgrade the github issue template for wide review#397
Conversation
plehegar
commented
Feb 3, 2026
- points to github labels
- point to TAG review repo
- add checkboxes for completing the review
tidoust
left a comment
There was a problem hiding this comment.
Minor improvement suggestions but that looks good to me otherwise!
| function generateGitHubIssueBody() { | ||
| const dl = document.querySelector('#how-to-get-horizontal-review ~ dl'); | ||
| if (!dl) { | ||
| console.error('Could not find right anchor in "How to get horizontal review" section'); |
There was a problem hiding this comment.
Seems like a good occasion to fix the existing code ;)
The function should return if the anchor is not found, and now that trap errors in the code that calls this function, it seems appropriate to throw an error (this should never happen unless someone changes the markup in the page, in which case it seems good not to fail silently)
| console.error('Could not find right anchor in "How to get horizontal review" section'); | |
| throw new Error('Could not find right anchor in "How to get horizontal review" section'); |
| console.error('Could not find a DD tag after DT', dt); | ||
| return; |
There was a problem hiding this comment.
Similar comment.
| console.error('Could not find a DD tag after DT', dt); | |
| return; | |
| throw new Error('Could not find a DD tag after DT in one of the horizontal sections'); |
| @@ -1,54 +1,133 @@ | |||
| window.addEventListener('load', addGitHubIssueButton); | |||
| const repositories = fetch('https://w3c.github.io/groups/repositories.json').then(res => res.ok ? res.json() : []) | |||
There was a problem hiding this comment.
That could be a good opportunity to start explaining what the script does. Something like:
| const repositories = fetch('https://w3c.github.io/groups/repositories.json').then(res => res.ok ? res.json() : []) | |
| /** | |
| * Script that adds a button to the Document review page that readers may use | |
| * to draft a meta issue in the GitHub repository of their choice to track wide | |
| * review steps. | |
| * | |
| * The script expects to find specific anchors in the Document review page, | |
| * including a definition list for each horizontal flagged with a `data-type` | |
| * attribute whose value matches the prefix used in GitHub labels | |
| * `[foo]-needs-resolution` and `[foo]-tracker`, with individual steps flagged | |
| * as such. | |
| */ | |
| const repositories = fetch('https://w3c.github.io/groups/repositories.json').then(res => res.ok ? res.json() : []) |
|
|
||
| <dl> | ||
| <dt>Accessibility</dt> | ||
| <dt data-type='a11y'>Accessibility</dt> |
There was a problem hiding this comment.
I agree that data-* attributes are the clean way to create anchors for the script. In order to be consistent, would it be possible to turn the class="step" attributes into data-step attributes? (I don't think there's any CSS rule on .step in particular)
| >Legend: | ||
| >🔴 Review request not submitted | ||
| >🟡 Review request submitted | ||
| >🔵 Review feedback received | ||
| >🟢 Review closed as completed |
There was a problem hiding this comment.
Forgot one thing: how is that legend supposed to be applied? Are people supposed to manually update the colored circles of individual horizontal reviews in the issue description as progress gets made? That may be nice-looking but seems easy to get wrong.