Skip to content

fixing some consistency issues with repo search vs featured cards - #11733

Open
Joey Wunderlich (jwunderl) wants to merge 1 commit into
masterfrom
dev/jwunderl/extension-meta-fix
Open

Joey Wunderlich (jwunderl) wants to merge 1 commit into
masterfrom
dev/jwunderl/extension-meta-fix

Conversation

@jwunderl

Copy link
Copy Markdown
Member

frontend side of proper fix for https://github.com/microsoft/pxt-minecraft/issues/3131 and the related issues, to make it so extensions show up the same when installed, searched, and featured. Don't wanna stick this into minecraft release since needs more testing + fix for the bug we actually saw is just removing a line from pxt.json

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.

🟡 Changes recommended

Package-name-based matching can misidentify unrelated GitHub search results as installed, opening update/remove actions for the wrong dependency.

4 open issues
What changed in this PR

This PR unifies GitHub extension card metadata in the PXT editor so featured, searched, and installed extensions use consistent names, descriptions, and images.

Changes:

  • Centralizes card metadata normalization and icon resolution.
  • Carries package metadata through GitHub responses and refreshes installed-card metadata.
  • Adds tests for metadata precedence, icon handling, and search/direct-lookup consistency.
File Description
webapp/​src/​extensionsBrowser.tsx Uses shared metadata handling and refreshes installed extension cards.
webapp/​src/​extensionMetadata.ts Adds shared card metadata normalization and fallback logic.
tests/​pxt-editor-test/​editorrunner.ts Tests card consistency, metadata fallbacks, and icon behavior.
pxtlib/​github.ts Exposes package metadata and resolves explicit versus repository-relative icons.

Review effort: Max

Comment thread pxtlib/github.ts
fileName: options?.fileName?.toLocaleLowerCase(),
name: r.name,
description: r.description,
name: r.packageMetadata?.name || r.name,
Comment thread pxtlib/github.ts
name: r.packageMetadata?.name || r.name,
displayName: r.packageMetadata?.displayName,
icon: r.packageMetadata?.icon,
description: r.packageMetadata?.description || r.description || "",
Comment thread pxtlib/github.ts
slug: rid.slug,
name: rid.fileName ? `${meta.name}-${rid.fileName}` : meta.name,
displayName: meta.displayName,
icon: meta.icon,
displayName: config.displayName,
type: ExtensionType.Github,
imageUrl: config.icon || pxt.github.repoIconUrl(repo),
pkgConfig: config,
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.

2 participants