Add contributor attribution to canvas extension cards#2111
Open
ashleywolf wants to merge 1 commit into
Open
Conversation
Each canvas extension card now shows who contributed it, matching the by-author line already used on plugin and sample cards. Adds a standard npm author field to each extension (and the external entry), reads it in the website data generator, and renders it on the card and details modal. Contributors were sourced from the original PR/commit author for each extension on the staged branch. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
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
authormetadata (npmauthorfield / external registryauthor) for all canvas extensions. - Extended
eng/generate-website-data.mjsto normalize and emitauthorinto 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 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>` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
authorfield ({ name, url }) to each extension'spackage.json, and anauthorfield to the Coffilot entry inexternal.json.eng/generate-website-data.mjsreads the author (npm string or object form) and emits it on each extension in the generatedextensions.json.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, sincemainis published by a bot and loses that history.For arcade-canvas and chromium-control-canvas I kept the name each author already set in
package.jsonand only added their profile URL.Verifying
npm run website:dataemits anauthorfor all 11 extensions (10 local + 1 external).astro buildpasses with no type errors.by {name}profile link on every card and in the details modal, for both local and external extensions.The generated
website/public/data/extensions.jsonis gitignored, so this PR only touches source.Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com