Repository navigation
Conversation
- CG-LIVING - CG-SNAPSHOT Include the cgbgStatus and new CG assets (base.css, cg-spec.css, dark.css, cg-fixup.js and cg-metadata.js) for these new profiles. Introduce <meta> tags required by the new profiles. Run some validation.
…ata + introduce new boilerplates depending on the type of CG specs
8585b0b to
a938dcf
Compare
…oscript>' parses its content as raw text
|
@sidvishnoi, do you mind reviewing this first if you have cycles. If you're busy, happy to dive in. |
| const COMMUNITY = "https://www.w3.org/community/"; | ||
| const INCUBATION = "https://incubation.w3.org/"; | ||
|
|
||
| const chevron = () => |
There was a problem hiding this comment.
this is only called once, so we can probably just inline it. Does this need any ARIA stuff?
| @@ -0,0 +1,52 @@ | |||
| <!doctype html> | |||
There was a problem hiding this comment.
Not sure we should add this example at all to be honest.
| * @param {string} noScriptText | ||
| * @param {"div" | "li"} as | ||
| */ | ||
| export function region(name, noScriptText, as = "div") { |
There was a problem hiding this comment.
Maybe more clear:
| export function region(name, noScriptText, as = "div") { | |
| export function region(name, noScriptText, elementName = "div") { |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Type-qualified and joint group configurations currently generate incorrect links and header markup.
Review effort: Balanced
Findings: 4
Open (6)
Use the shortname when constructing group join URLs · New Parse the shortname from type-qualified group identifiers · New Render separate copyright links for joint groups · New Correct test fixture to use type/shortname group format · New Include new statuses in the invalid-status recovery hint · New Fix ungrammatical status information sentence · New
What changed in this PR
Adds redesigned CG-LIVING and CG-SNAPSHOT Community Group profiles with dedicated headers, metadata, assets, and supporting sections.
Changes:
- Adds CG profile configuration, validation, templates, and pipeline modules.
- Integrates external CG assets and metadata regions.
- Adds comprehensive integration and unit coverage plus an example document.
| File | Description |
|---|---|
tests/unit/w3c/cg-headers-spec.js |
Tests snapshot-index URL generation. |
tests/spec/w3c/cg-spec.js |
Covers profiles, metadata, assets, and variants. |
src/w3c/templates/cg-sotd.js |
Adds the redesigned minimal SotD. |
src/w3c/templates/cg-headers.js |
Builds redesigned CG headers. |
src/w3c/style.js |
Selects CG-specific assets. |
src/w3c/headers.js |
Registers statuses and templates. |
src/w3c/defaults.js |
Validates new configuration options. |
src/w3c/cg-spec.js |
Emits CG metadata identity. |
src/w3c/cg-sections.js |
Adds involvement and usage sections. |
src/w3c/cg-assets.js |
Loads and restores CG assets. |
src/type-helper.d.ts |
Types the new configuration. |
profiles/w3c.js |
Registers the new modules. |
examples/cg-living.html |
Demonstrates the living profile. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| const joinURL = | ||
| typeof conf.group === "string" ? `${COMMUNITY}${conf.group}/join` : null; |
| // TODO: | ||
| // - `conf.group` is an array for joint publications | ||
| // - `conf.group` is an id | ||
| const group = typeof conf.group === "string" ? conf.group.split("/")[0] : ""; |
| the Contributors to the ${titleNodes} Specification, published by the | ||
| <a href="${conf.wgURI}">${conf.wg}</a> under the ${agreement} |
| it("uses the group's own short name from a type-qualified group", () => { | ||
| expect(snapshotsIndex({ group: "wicg/cg", shortName: "foo" })).toBe( | ||
| "https://incubation.w3.org/groups/wicg/specs/#foo" |
| if ( | ||
| ![...cgStatus, ...cgRedesignStatus, "unofficial", "UD"].includes( | ||
| specStatus | ||
| ) | ||
| ) { | ||
| const msg = docLink`W3C Community Group documents can't use \`"${specStatus}"\` for the ${"[specStatus]"} configuration option.`; | ||
| const supportedStatus = codedJoinOr(cgStatus, { quotes: true }); |
| The text of this specification and the status information support | ||
| for this specification are expected to change in place at this | ||
| address. |


CG-LIVINGandCG-SNAPSHOTfollowing the upcoming updates with the CG spec lifecycle. These profiles use different headers (see mockups) and rely on assets and metadata. The existing profilesCG-DRAFTandCG-FINALremain untouched.cgMaturity(draft,transferredorunmaintained) andtransferredTo(only applies ifcgMaturity = transferred)Description of the new processing files:
src/w3c/templates/cg-headers.jsbuilds the redesign headers for the 4 variants (draft, transferred, unmaintained and snapshot) and adds the different containers (with adata-cg-regionattribute) thatcg-metadatafills when the spec loadssrc/w3c/cg-sections.jsadds the "Get involved" and "Usage guidance" sectionssrc/w3c/cg-spec.jsemits three new tags thatcg-metadatarelies on to fetch the appropriate metadatasrc/w3c/templates/cg-sotd.jsreduces the SotD to what the editors wrote (we do not have required paragraphs for the new profiles)Some URLs are still subject to change so it's not ready to be merged.