Repository navigation
Fix exact marketplace asset export dimensions - #5
Merged
Merged
Conversation
Apply marketplace target dimensions consistently to PNG, PDF, PSD, and ZIP exports, and add dimension normalization tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Infographic exports still bypass target dimensions and ZIP filenames misrepresent non-Zhaket sizes.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Normalizes marketplace exports to requested dimensions across supported formats and ZIP workflows.
Changes:
- Adds reusable canvas sizing utilities and unit tests.
- Applies target dimensions to PNG, PDF, PSD, and ZIP exports.
- Updates off-screen export canvases for marketplace aspect ratios.
| File | Description |
|---|---|
src/utils/exportUtils.ts |
Integrates dimension-aware canvas capture. |
src/utils/exportDimensions.ts |
Adds scaling and resizing utilities. |
src/utils/exportDimensions.test.ts |
Tests dimension calculations and validation. |
src/App.tsx |
Supplies marketplace dimensions to export paths. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Honor selected marketplace or custom dimensions in infographic exports and use the resolved dimensions in ZIP entry names. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

Marketplace logos and covers were exporting at larger-than-requested sizes because several export paths applied a 2x pixel ratio without normalizing to the selected marketplace dimensions. This change renders and normalizes asset output to the exact requested pixel size across PNG, PDF, PSD, full-package ZIP, and batch ZIP exports.
For ZIP exports, each asset carries its own target dimensions, including non-square marketplace formats. Added unit coverage for dimension scaling, exact canvas output, matching-size passthrough, and invalid dimensions.
Validation:
npm test(74 tests) andnpm run buildpassed.