Skip to content

Fix exact marketplace asset export dimensions - #5

Merged
ehsanking merged 2 commits into
mainfrom
ehsanking-fix-export-dimensions
Oct 3, 2026
Merged

ehsanking merged 2 commits into
mainfrom
ehsanking-fix-export-dimensions

Conversation

@ehsanking

Copy link
Copy Markdown
Owner

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) and npm run build passed.

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>
Copilot AI balanced review requested due to automatic review settings October 3, 2026 17:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Infographic exports still bypass target dimensions and ZIP filenames misrepresent non-Zhaket sizes.

Review effort: Balanced
Findings: 2 Medium severity

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.

Comment thread src/App.tsx Outdated
Comment thread src/App.tsx Outdated
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>
@ehsanking
ehsanking merged commit ed0700b into main Oct 3, 2026
2 checks passed
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