SVG copy and paste
Fixes SVG copy and paste styles - the stroke colour was missing.
Summary by CodeRabbit
- New Features
- None.
- Bug Fixes
- Icon block: “Line colour” control now correctly recognized and applied in settings, improving consistency when editing or copying/pasting icon styles.
- Style
- Standardized import formatting across multiple blocks for improved readability (no functional impact).
Walkthrough
Consolidates import statements in three block data files and updates svg-icon-maxi’s copyPasteMapping for the "Line colour" control to reference props ('svg-line') instead of label. No other logic or API changes are indicated.
Changes
| Cohort / File(s) | Summary |
|---|---|
Import formatting consolidationsrc/blocks/list-item-maxi/data.js, src/blocks/text-maxi/data.js, src/blocks/svg-icon-maxi/data.js |
Merged multi-line imports of getCanvasSettings and getAdvancedSettings from @extensions/relations into single-line imports. No functional changes. |
SVG icon mapping updatesrc/blocks/svg-icon-maxi/data.js |
In copyPasteMapping.settings["Icon colour"].group["Line colour"], changed { label: 'svg-line', isPalette: true } to { props: 'svg-line', isPalette: true }, altering how the control is bound/resolved. |
Sequence Diagram(s)
sequenceDiagram
autonumber
actor User
participant UI as Icon Settings UI
participant Mapping as copyPasteMapping
participant Store as Props Store
User->>UI: Adjust "Line colour"
UI->>Mapping: Resolve control binding for "Line colour"
Note right of Mapping: Changed: use props key 'svg-line'<br/>Instead of label lookup
Mapping->>Store: Get/Set value via props['svg-line']
Store-->>UI: Updated value applied
UI-->>User: Icon line colour reflects change
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Suggested labels
bug 🐛, size:M, Final code review
Suggested reviewers
- Olekrut
- elzadj
Poem
A hop, a skip, a tidy line—
I nibbled imports, made them fine.
A stroke of hue, the props align, 🎨
The SVG now shines in kind.
Thump-thump! My review is swift—
Carrots, code, a perfect lift. 🥕✨
Pre-merge checks and finishing touches
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Description Check | ⚠️ Warning | The pull request description consists of a single sentence and does not adhere to the repository’s required template. It is missing the “Description” section with a detailed summary and issue reference, the “How Has This Been Tested?” section with reproduction steps, and both the test and general checklists. | Please update the pull request description to follow the provided template by adding a detailed summary and motivation in the Description section, referencing the related issue (Fixes #…), including a “How Has This Been Tested?” section with your test procedure, and completing the required test and general checklists to demonstrate compliance with project standards. |
✅ Passed checks (2 passed)
| Check name | Status | Explanation |
|---|---|---|
| Docstring Coverage | ✅ Passed | No functions found in the changes. Docstring coverage check skipped. |
| Title Check | ✅ Passed | The title “SVG copy and paste” references the key domain of the change—SVG copy-and-paste functionality—and thus aligns with the adjustments to the SVG copyPasteMapping settings, but it omits mention of the style fixes and import formatting updates that constitute the main purpose of the PR. |
✨ Finishing touches
- [ ] 📝 Generate docstrings
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
- [ ] Commit unit tests in branch
copy-and-paste
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
https://www.awesomescreenshot.com/video/47112380?key=c24320156d8dd484b97751d89fcaa6ea
this was fixed in another issue