Skip to content

Add contributor attribution to canvas extension cards#2111

Merged
aaronpowell merged 1 commit into
mainfrom
ashleywolf/extension-contributors
Jun 25, 2026
Merged

Add contributor attribution to canvas extension cards#2111
aaronpowell merged 1 commit into
mainfrom
ashleywolf/extension-contributors

Conversation

@ashleywolf

Copy link
Copy Markdown
Collaborator

Every canvas extension on the extensions page now credits the person who built it, the same by {author} line that plugins and samples already show.

What changed

  • Added a standard npm author field ({ name, url }) to each extension's package.json, and an author field to the Coffilot entry in external.json.
  • eng/generate-website-data.mjs reads the author (npm string or object form) and emits it on each extension in the generated extensions.json.
  • The card renderer (extensions-render.ts) and the details modal (extensions.ts) render the name as a link to the contributor's GitHub profile.

How I picked each contributor

I traced each extension to the author of its original PR or first commit on staged, excluding the Copilot co-author, since main is published by a bot and loses that history.

Extension Contributor
accessibility-kanban, color-orb, diagram-viewer, feedback-themes, gesture-review, where-was-i @aaronpowell (#1900)
backlog-swipe-triage, release-notes-showcase @jamesmontemagno (#1987)
arcade-canvas @DanWahlin (#2031)
chromium-control-canvas @AndreaGriffiths11
coffilot (external) @jdubois

For arcade-canvas and chromium-control-canvas I kept the name each author already set in package.json and only added their profile URL.

Verifying

  • npm run website:data emits an author for all 11 extensions (10 local + 1 external).
  • astro build passes with no type errors.
  • Local preview shows the by {name} profile link on every card and in the details modal, for both local and external extensions.

The generated website/public/data/extensions.json is gitignored, so this PR only touches source.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Copilot AI review requested due to automatic review settings June 24, 2026 02:41
@ashleywolf ashleywolf requested a review from aaronpowell as a code owner June 24, 2026 02:41
@github-actions github-actions Bot added canvas-extension PR touches canvas extensions website-update PR touches website content or code labels Jun 24, 2026

Copilot AI left a comment

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.

Pull request overview

This pull request adds contributor attribution for canvas extensions on the website, emitting normalized author metadata during website data generation and rendering a by {author} line in both extension cards and the extension details modal.

Changes:

  • Added author metadata (npm author field / external registry author) for all canvas extensions.
  • Extended eng/generate-website-data.mjs to normalize and emit author into generated extensions website data.
  • Updated the extensions listing renderer and details modal to display author name (optionally linked to the author URL).
Show a summary per file
File Description
website/src/scripts/pages/extensions.ts Renders by {author} in the extension details modal (with optional outbound link).
website/src/scripts/pages/extensions-render.ts Renders by {author} on extension cards (with optional outbound link).
eng/generate-website-data.mjs Normalizes author values (string or {name,url}) and emits them into extension data.
extensions/accessibility-kanban/package.json Adds npm author metadata for attribution.
extensions/arcade-canvas/package.json Converts npm author from string to object and adds URL.
extensions/backlog-swipe-triage/package.json Adds npm author metadata for attribution.
extensions/chromium-control-canvas/package.json Converts npm author from string to object and adds URL.
extensions/color-orb/package.json Adds npm author metadata for attribution.
extensions/diagram-viewer/package.json Adds npm author metadata for attribution.
extensions/feedback-themes/package.json Adds npm author metadata for attribution.
extensions/gesture-review/package.json Adds npm author metadata for attribution.
extensions/release-notes-showcase/package.json Adds npm author metadata for attribution.
extensions/where-was-i/package.json Adds npm author metadata for attribution.
extensions/external.json Adds author metadata for the external Coffilot entry.

Copilot's findings

  • Files reviewed: 14/14 changed files
  • Comments generated: 2

Comment on lines +99 to +103
? `<a href="${sanitizeUrl(
item.author.url
)}" target="_blank" rel="noopener noreferrer">${escapeHtml(
item.author.name
)}</a>`
Comment thread website/src/scripts/pages/extensions.ts Outdated
Comment on lines +185 to +189
? `<span class="resource-author">by <a href="${sanitizeUrl(
item.author.url
)}" target="_blank" rel="noopener noreferrer">${escapeHtml(
item.author.name
)}</a></span>`

@aaronpowell aaronpowell left a comment

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.

could we move this to the canvas.json file, as that's where we're storing the metadata about the canvas

Show "by @handle" on each canvas extension card and in the details
modal, linking to the contributor's GitHub profile. Author metadata
lives in each extension's canvas.json (and external.json for external
extensions), where the rest of the canvas metadata is stored.

- Store author {name, url} in canvas.json / external.json
- Read author from canvas.json in the website data generator and emit
  it to extensions.json
- Render the GitHub @handle, derived from the profile URL, as the link
  text, with the contributor's name as the link title
- Escape the sanitized author URL before interpolating it into href

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ashleywolf ashleywolf force-pushed the ashleywolf/extension-contributors branch from f895487 to 66ef3f6 Compare June 25, 2026 03:58
@ashleywolf

Copy link
Copy Markdown
Collaborator Author

Moved it. author {name, url} now lives in each extension's canvas.json (and external.json for the external one), read by the generator — package.json is untouched now.

Two related changes while I was in there:

  • Cards and the details modal show the GitHub @handle (derived from the profile URL), with the full name on hover.
  • Wrapped the author URL in escapeHtml() before it goes into the href, per Copilot's note.

Pushed as one clean commit (66ef3f6). Re-requesting your review when you have a sec, @aaronpowell.

@ashleywolf ashleywolf requested a review from aaronpowell June 25, 2026 04:02
@aaronpowell aaronpowell changed the base branch from staged to main June 25, 2026 04:41
@github-actions github-actions Bot added the targets-main PR targets main instead of staged label Jun 25, 2026
@aaronpowell aaronpowell removed the targets-main PR targets main instead of staged label Jun 25, 2026
@aaronpowell aaronpowell merged commit e9c8e37 into main Jun 25, 2026
15 checks passed
@aaronpowell aaronpowell deleted the ashleywolf/extension-contributors branch June 25, 2026 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

canvas-extension PR touches canvas extensions migration: bulk-retarget migration: manual-review website-update PR touches website content or code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants