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

fix(w3c/sotd): update stability tempate for NOTEs #4428

Merged
merged 3 commits into from
Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/w3c/headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -548,10 +548,6 @@ export async function run(conf) {
}
if (Array.isArray(conf.wg)) {
conf.multipleWGs = conf.wg.length > 1;
conf.wgHTML = htmlJoinAnd(conf.wg, (wg, idx) => {
return html`the <a href="${conf.wgURI[idx]}">${wg}</a>`;
});

conf.wgPatentHTML = htmlJoinAnd(conf.wg, (wg, i) => {
return html`a
<a href="${conf.wgPatentURI[i]}" rel="disclosure"
Expand All @@ -560,9 +556,6 @@ export async function run(conf) {
});
} else {
conf.multipleWGs = false;
if (conf.wg) {
conf.wgHTML = html`the <a href="${conf.wgURI}">${conf.wg}</a>`;
}
}
if (conf.isPR && !conf.crEnd) {
const msg = docLink`${"[specStatus]"} is "PR" but no ${"[crEnd]"} is specified in the ${"[respecConfig]"} (needed to indicate end of previous CR).`;
Expand Down
21 changes: 18 additions & 3 deletions src/w3c/templates/sotd.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check
import { W3CDate, getIntlData } from "../../core/utils.js";
import { W3CDate, getIntlData, htmlJoinAnd } from "../../core/utils.js";
import { html } from "../../core/import-maps.js";
import { status2track } from "../headers.js";
const localizationStrings = {
Expand Down Expand Up @@ -253,10 +253,15 @@ function renderNotRec(conf) {
</p>`;
break;
case "DNOTE":
case "NOTE":
endorsement = html`${conf.textStatus}s are not endorsed by
<abbr title="World Wide Web Consortium">W3C</abbr> nor its Members.`;
break;
case "NOTE":
endorsement = html`This ${conf.textStatus} is endorsed by
${getWgHTML(conf)}, but is not endorsed by
<abbr title="World Wide Web Consortium">W3C</abbr> itself nor its
Members.`;
break;
}
return html`<p>${endorsement} ${statusExplanation}</p>
${updatePolicy} ${reviewPolicy}`;
Expand Down Expand Up @@ -492,11 +497,21 @@ function linkToWorkingGroup(conf) {
>`
: "";
return html`<p>
This document was published by ${conf.wgHTML} as
This document was published by ${getWgHTML(conf)} as
${prefix(conf.longStatus)}${track}. ${changes}
</p>`;
}

function getWgHTML(conf) {
if (Array.isArray(conf.wg)) {
return htmlJoinAnd(conf.wg, (wg, idx) => {
return html`the <a href="${conf.wgURI[idx]}">${wg}</a>`;
});
} else if (conf.wg) {
return html`the <a href="${conf.wgURI}">${conf.wg}</a>`;
}
}

export function linkToCommunity(conf, opts) {
if (!conf.github && !conf.wgPublicList) {
return;
Expand Down