Skip to content

feat(specifications): render a list in simplified mode#1504

Merged
LeoMcA merged 3 commits into
mainfrom
specifications-simplified
Apr 22, 2026
Merged

feat(specifications): render a list in simplified mode#1504
LeoMcA merged 3 commits into
mainfrom
specifications-simplified

Conversation

@LeoMcA
Copy link
Copy Markdown
Member

@LeoMcA LeoMcA commented Apr 21, 2026

It would've taken a whole lot of repetition (or overhead plumbing) to DRY render and renderSimplified here, so I've added a new simplifiedMode property which can be used instead.

This also gives us the flexibility to turn simplifiedMode into an enum in the future to specify different simplified targets, imagine something like:

renderSimplified() {
  switch(this.simplifiedMode) {
    case "mcp":
        return ...
    case "standalone-zip":
        return ...
    case "carrier-pigeon":
        return ...

@LeoMcA LeoMcA requested a review from a team as a code owner April 21, 2026 16:15
@LeoMcA LeoMcA requested a review from caugner April 21, 2026 16:15
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

207dbc6 was deployed to: https://fred-pr1504.review.mdn.allizom.net/

Copy link
Copy Markdown
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

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

LGTM, just one nit.

PS: If we document simplifiedMode somewhere, we could mention this (alternative) strategy.

Comment on lines +31 to +34
return this.simplifiedMode
? html`<ul>
${links.map((link) => html`<li>${link}</li>`)}
</ul>`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: Could we make this an if (this.simplifiedMode) { return html; } block instead? Even though it's obvious, I had to look twice to see which branch is which.

@LeoMcA LeoMcA merged commit abf1784 into main Apr 22, 2026
13 checks passed
@LeoMcA LeoMcA deleted the specifications-simplified branch April 22, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants