fix: refresh rush lockfile for Node 24 canvas install#2065
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds and wires up background-image layout capabilities (sizing + positioning) across stage/group/text rendering, and includes a browser demo page plus unit tests validating the new behavior.
Changes:
- Introduce shared background-image layout helpers (
drawBackgroundImage, sizing + position resolution) and use them in stage clear and background render contributions. - Extend core types/defaults to support
backgroundSizingandbackgroundPosition(CSS-like anchoring). - Add a browser demo page and a new Jest test suite covering layout behaviors and wrapped-background resource key handling.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/vrender/tests/browser/src/pages/index.ts | Adds the new “background” demo page entry. |
| packages/vrender/tests/browser/src/pages/background.ts | New browser demo exercising background sizing/position/clip across stage/group/text. |
| packages/vrender-core/src/render/contributions/render/draw-contribution.ts | Uses shared background-image drawing during clear-screen for stage backgrounds. |
| packages/vrender-core/src/render/contributions/render/contributions/text-contribution-render.ts | Adds clip/sizing/position forwarding for text background images. |
| packages/vrender-core/src/render/contributions/render/contributions/group-contribution-render.ts | Forwards sizing/position and updates resource-key lookup for group background images. |
| packages/vrender-core/src/render/contributions/render/contributions/base-contribution-render.ts | Adds shared sizing/position logic + resource-key normalization helpers. |
| packages/vrender-core/src/interface/stage.ts | Broadens stage background typing to allow graphic background types. |
| packages/vrender-core/src/interface/render.ts | Broadens clear typing to match graphic background types. |
| packages/vrender-core/src/interface/layer.ts | Broadens layer background typing to match graphic background types. |
| packages/vrender-core/src/interface/graphic.ts | Introduces backgroundSizing/backgroundPosition types + docs. |
| packages/vrender-core/src/graphic/graphic.ts | Unwraps { background: ... } when loading background images. |
| packages/vrender-core/src/graphic/config.ts | Adds defaults for backgroundSizing and backgroundPosition. |
| packages/vrender-core/src/core/stage.ts | Updates stage background type and background-image loading behavior. |
| packages/vrender-core/src/core/layer.ts | Aligns layer background type with updated interface. |
| packages/vrender-core/tests/background/background-image-layout.test.ts | New tests covering sizing/positioning and resource-key normalization. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
chore: update Node.js versions in workflows and rush configuration
230ae96 to
8706a3d
Compare
xuefei1313
approved these changes
Mar 31, 2026
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.
Summary
Verification