Skip to content

Upgrade the github issue template for wide review#397

Open
plehegar wants to merge 2 commits intomainfrom
wd-gh-template
Open

Upgrade the github issue template for wide review#397
plehegar wants to merge 2 commits intomainfrom
wd-gh-template

Conversation

@plehegar
Copy link
Member

@plehegar plehegar commented Feb 3, 2026

  1. points to github labels
  2. point to TAG review repo
  3. add checkboxes for completing the review

@plehegar plehegar requested a review from tidoust February 3, 2026 23:35
@plehegar plehegar added the enhancement The specification works as-is but could be improved. label Feb 3, 2026
@plehegar plehegar self-assigned this Feb 4, 2026
Copy link
Member

@tidoust tidoust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Suggested change
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');

Comment on lines 81 to 82
console.error('Could not find a DD tag after DT', dt);
return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar comment.

Suggested change
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() : [])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That could be a good opportunity to start explaining what the script does. Something like:

Suggested change
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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Comment on lines +9 to +13
>Legend:
>🔴 Review request not submitted
>🟡 Review request submitted
>🔵 Review feedback received
>🟢 Review closed as completed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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

Labels

enhancement The specification works as-is but could be improved.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants