-
Notifications
You must be signed in to change notification settings - Fork 38
Add advanced export image options with node centering controls, internationalization, and improved state management #1139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: thekingofcity <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Please address the feedback provided in the latest code review.
- Padding should also have four directions instead of one
- The center node should be an input field with nodes as an option
- top left, top right, bottom left, bottom right positions should be initialized with the current size and later be updated whenever the advanced properties are changed
- top left, top right, bottom left, bottom right positions should be used in the final export by setting the viewbox of the cloned svg element
…s, position controls, viewBox export Co-authored-by: thekingofcity <[email protected]>
All feedback has been addressed in commit cc09dfe: ✅ Padding: Changed to four directions (left, right, top, bottom) instead of one The advanced export options now provide full control over the export area boundaries with proper reactive updates. |
; Conflicts: ; package-lock.json
; Conflicts: ; package-lock.json
Co-authored-by: thekingofcity <[email protected]>
…rt modal Co-authored-by: thekingofcity <[email protected]>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
… node selected, and reorganize advanced fields layout Co-authored-by: thekingofcity <[email protected]>
| {t('header.download.currentAspectRatio')} | ||
| </Text> | ||
| <Text fontSize="sm"> | ||
| {( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Displaying proportions using the least common denominator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented aspect ratio display using least common denominator. The ratio is now calculated using the greatest common divisor (GCD) algorithm and displayed in simplified form (e.g., 16:9 instead of 1.78:1). Commit 2d65601
| {t('header.download.currentCanvasDimensions')} | ||
| </Text> | ||
| <Text fontSize="sm"> | ||
| Width:{' '} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Translate and layout width/height/ration on one row with each taking 1/3 space
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reorganized the layout to display width, height, and ratio in one row with equal spacing (1/3 each) using HStack. Added i18n translations for "Width", "Height", and "Ratio" labels in all 5 supported languages (English, Japanese, Korean, Simplified Chinese, Traditional Chinese). Commit 2d65601
…eight/ratio in one row with i18n Co-authored-by: thekingofcity <[email protected]>
This PR implements advanced export image options that allow users to better control the size and positioning of exported images, with the ability to center the export around a selected node.
New Features
The download modal now includes an expandable "Advanced options" section with the following controls:
Implementation Details
distance,padding,fourCornersPosition) for better maintainability and atomic updatesUser Interface
The advanced options are collapsed by default to maintain the simple export workflow for basic users, while providing power users with granular control over export positioning and sizing. All text elements are properly internationalized and will display in the user's selected language. The canvas information is now displayed in a clean, organized layout with width, height, and simplified aspect ratio in one row.
Before (collapsed):

Advanced options expanded:

Center node input with autocomplete:

Fixes #726.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.