Skip to content

Conversation

@KManolov3
Copy link
Contributor

…ries

Resolves

https://scratchfoundation.atlassian.net/browse/UEPR-467

Proposed Changes

Support using dynamic assets optionally passed down to the editor.

Reason for Changes

Part of the wider effort of supporting in-app delivery of assets.

@KManolov3 KManolov3 requested a review from Copilot January 9, 2026 13:09
@KManolov3 KManolov3 requested a review from a team as a code owner January 9, 2026 13:09
Copy link

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

This PR implements support for dynamic assets (sprites, backdrops, costumes, and sounds) that can be passed to the editor at runtime and merged with the bundled static assets. This enables in-app delivery of assets as part of the wider effort described in UEPR-467.

Key Changes:

  • Added a new Redux reducer to manage dynamic assets state
  • Implemented asset merging logic that combines static and dynamic assets, with dynamic assets taking precedence when names match
  • Integrated dynamic assets into the sprite, costume, backdrop, and sound library containers

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/scratch-gui/src/reducers/gui.ts Integrated the new dynamic assets reducer into the root GUI reducer and initial state
packages/scratch-gui/src/reducers/dynamic-assets.js Created new reducer to handle dynamic assets state with action creator for setting assets
packages/scratch-gui/src/lib/merge-dynamic-assets.js Implemented utility function to merge static and dynamic asset arrays using name-based deduplication
packages/scratch-gui/src/lib/assets-prop-types.js Defined PropTypes shapes for costume, sound, and sprite assets for type validation
packages/scratch-gui/src/containers/sprite-library.jsx Connected to Redux store and integrated dynamic sprite merging into the sprite library
packages/scratch-gui/src/containers/sound-library.jsx Connected to Redux store and integrated dynamic sound merging into the sound library
packages/scratch-gui/src/containers/gui.jsx Added props for dynamic assets and dispatches updates to the store on mount and prop changes
packages/scratch-gui/src/containers/costume-library.jsx Connected to Redux store and integrated dynamic costume merging into the costume library
packages/scratch-gui/src/containers/backdrop-library.jsx Connected to Redux store and integrated dynamic backdrop merging into the backdrop library

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Test report for scratch-gui

  2 files  ±0   62 suites  ±0   9m 31s ⏱️ +17s
398 tests ±0  390 ✅ ±0  8 💤 ±0  0 ❌ ±0 
416 runs  ±0  408 ✅ ±0  8 💤 ±0  0 ❌ ±0 

Results for commit ced7c82. ± Comparison against base commit 8c13b2b.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@adzhindzhi adzhindzhi left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

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