Skip to content

feat(bcd): render links to JSON in simplified HTML#1502

Merged
LeoMcA merged 2 commits into
mainfrom
bcd-simplified
Apr 22, 2026
Merged

feat(bcd): render links to JSON in simplified HTML#1502
LeoMcA merged 2 commits into
mainfrom
bcd-simplified

Conversation

@LeoMcA
Copy link
Copy Markdown
Member

@LeoMcA LeoMcA commented Apr 21, 2026

BCD sections are currently empty in the simplified HTML: this extracts the BCD section into its own server component, and renders a link to the JSON when in simplified mode.

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

github-actions Bot commented Apr 21, 2026

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

Comment thread components/bcd-section/server.js Outdated
import { HeadingAnchor } from "../heading-anchor/server.js";
import { ServerComponent } from "../server/index.js";

export class BCDSection extends ServerComponent {
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: For consistency with CompatTable, consider renaming to CompatSection.

Comment thread components/bcd-section/server.js Outdated
? nothing
: HeadingAnchor.render(2, id ? String(id) : null, String(title))}
<a
href="${BCD_BASE_URL}/bcd/api/v0/current/${query}.json"
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: Should we generate this URL with a util function?

@LeoMcA LeoMcA merged commit d82fd33 into main Apr 22, 2026
13 checks passed
@LeoMcA LeoMcA deleted the bcd-simplified branch April 22, 2026 08:57
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