Skip to content

Inspector v2: Extension avatar image support#18132

Merged
ryantrem merged 7 commits intoBabylonJS:masterfrom
ryantrem:inspector-v2/extension-avatars
Mar 19, 2026
Merged

Inspector v2: Extension avatar image support#18132
ryantrem merged 7 commits intoBabylonJS:masterfrom
ryantrem:inspector-v2/extension-avatars

Conversation

@ryantrem
Copy link
Copy Markdown
Member

This pull request adds support for displaying custom avatar images for extension authors and contributors in the Inspector's extension list. It introduces a new script for generating base64-encoded PNG avatars, updates the extension feed and metadata to support avatars, and updates UI components to display these avatars where available.

NOTE: This adds a new dev-only npm dependency, just for tooling (for image resizing for making it simple to create small avatar base64 strings).

image

Avatar generation and integration:

  • Added a new script, makeAvatar.mjs, which resizes images (from file, URL, or Babylon.js forum username) to 32x32 PNG and outputs a base64 string for use as an avatar. (packages/dev/inspector-v2/scripts/makeAvatar.mjs)
  • Updated package.json to include the makeAvatar script and add sharp as a dependency for image processing. (packages/dev/inspector-v2/package.json) [1] [2]

Extension metadata and feed changes:

  • Extended the PersonMetadata type to support a base64-encoded PNG avatar image, and updated the default inspector extension feed to include the Babylon.js logo as the author avatar using the new script. (packages/dev/inspector-v2/src/extensibility/extensionFeed.ts, packages/dev/inspector-v2/src/extensibility/defaultInspectorExtensionFeed.ts) [1] [2] [3]

UI updates for avatar display:

  • Updated the extension list UI to display avatars for authors and contributors using the new avatar field, including in popovers and avatar groups. (packages/dev/inspector-v2/src/services/extensionsListService.tsx) [1] [2] [3]

Copilot AI review requested due to automatic review settings March 19, 2026 00:55
@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Mar 19, 2026

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Mar 19, 2026

Reviewer - this PR has made changes to one or more package.json files.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds avatar image support to Inspector v2’s extension list by extending extension-person metadata with an embedded base64 PNG and wiring it into the Fluent UI people/author UI.

Changes:

  • Extend PersonMetadata with an optional avatar (base64 PNG) field and populate it in the default built-in feed.
  • Update the extensions list UI to render author/contributor avatars in Persona and AvatarGroupItem.
  • Add a dev script (makeAvatar.mjs) plus sharp dev dependency to generate 32×32 PNG base64 avatar strings.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/dev/inspector-v2/src/services/extensionsListService.tsx Renders avatars for authors/contributors using the new metadata field.
packages/dev/inspector-v2/src/extensibility/extensionFeed.ts Adds avatar?: string to PersonMetadata.
packages/dev/inspector-v2/src/extensibility/defaultInspectorExtensionFeed.ts Adds a built-in Babylon.js author avatar (base64).
packages/dev/inspector-v2/scripts/makeAvatar.mjs New tooling script to generate 32×32 PNG base64 avatars from file/URL/forum username.
packages/dev/inspector-v2/package.json Adds makeAvatar script and sharp dev dependency.
package-lock.json Locks sharp and its platform-specific optional deps.

You can also share your feedback on Copilot code review. Take the survey.

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Mar 19, 2026

Snapshot stored with reference name:
refs/pull/18132/merge

Test environment:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/18132/merge/index.html

To test a playground add it to the URL, for example:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/18132/merge/index.html#WGZLGJ#4600

Links to test your changes to core in the published versions of the Babylon tools (does not contain changes you made to the tools themselves):

https://playground.babylonjs.com/?snapshot=refs/pull/18132/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/18132/merge
https://gui.babylonjs.com/?snapshot=refs/pull/18132/merge
https://nme.babylonjs.com/?snapshot=refs/pull/18132/merge

To test the snapshot in the playground with a playground ID add it after the snapshot query string:

https://playground.babylonjs.com/?snapshot=refs/pull/18132/merge#BCU1XR#0

If you made changes to the sandbox or playground in this PR, additional comments will be generated soon containing links to the dev versions of those tools.

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Mar 19, 2026

You have changed file(s) that made possible changes to the sandbox.
You can test the sandbox snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/18132/merge/

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Mar 19, 2026

You have made possible changes to the playground.
You can test the snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/18132/merge/

The snapshot playground with the CDN snapshot (only when available):

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/18132/merge/?snapshot=refs/pull/18132/merge

Note that neither Babylon scenes nor textures are uploaded to the snapshot directory, so some playgrounds won't work correctly.

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Mar 19, 2026

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Mar 19, 2026

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Mar 19, 2026

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@ryantrem
Copy link
Copy Markdown
Member Author

@copilot open a new pull request to apply changes based on the comments in this thread

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Mar 19, 2026

Reviewer - this PR has made changes to one or more package.json files.

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Mar 19, 2026

You have made possible changes to the playground.
You can test the snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/18132/merge/

The snapshot playground with the CDN snapshot (only when available):

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/18132/merge/?snapshot=refs/pull/18132/merge

Note that neither Babylon scenes nor textures are uploaded to the snapshot directory, so some playgrounds won't work correctly.

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Mar 19, 2026

You have changed file(s) that made possible changes to the sandbox.
You can test the sandbox snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/18132/merge/

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Mar 19, 2026

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Mar 19, 2026

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Mar 19, 2026

@ryantrem ryantrem enabled auto-merge (squash) March 19, 2026 15:57
@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Mar 19, 2026

Reviewer - this PR has made changes to one or more package.json files.

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Mar 19, 2026

You have changed file(s) that made possible changes to the sandbox.
You can test the sandbox snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/18132/merge/

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Mar 19, 2026

You have made possible changes to the playground.
You can test the snapshot here:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/18132/merge/

The snapshot playground with the CDN snapshot (only when available):

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/18132/merge/?snapshot=refs/pull/18132/merge

Note that neither Babylon scenes nor textures are uploaded to the snapshot directory, so some playgrounds won't work correctly.

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Mar 19, 2026

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Mar 19, 2026

@bjsplat
Copy link
Copy Markdown
Collaborator

bjsplat commented Mar 19, 2026

@ryantrem ryantrem merged commit 74c5d70 into BabylonJS:master Mar 19, 2026
23 checks passed
@github-actions github-actions bot mentioned this pull request Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants