Repository navigation
feat: Add 4 new icons - #5240
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The four-icon addition has no active review issues.
No open issues 🎉
What changed in this PR
Adds four built-in icons to Cloudscape’s icon library: chart, eye, sliders, and view-vertical-start.
Changes:
- Adds SVG assets and exposes their names through the icon provider’s public type.
- Adds right-to-left mirroring and hover animation for
view-vertical-start. - Updates documentation snapshots and raises the widget-export bundle size limit from 1460 kB to 1470 kB.
| File | Description |
|---|---|
src/icon/styles.scss |
Enables right-to-left mirroring for view-vertical-start. |
src/icon/icons/view-vertical-start.svg |
Adds the start-aligned vertical panel icon. |
src/icon/icons/sliders.svg |
Adds the sliders icon. |
src/icon/icons/eye.svg |
Adds the eye icon. |
src/icon/icons/chart.svg |
Adds the chart icon. |
src/icon/hover-motion.scss |
Defines the new panel icon’s hover animation. |
src/icon-provider/interfaces.ts |
Adds all four names to BuiltInIconName. |
src/__tests__/snapshot-tests/__snapshots__/documenter.test.ts.snap |
Updates API documentation snapshots with the new icons. |
package.json |
Increases the widget-export bundle size allowance. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5240 +/- ##
==========================================
+ Coverage 97.76% 97.82% +0.06%
==========================================
Files 1003 1006 +3
Lines 32572 32583 +11
Branches 12110 12094 -16
==========================================
+ Hits 31843 31875 +32
+ Misses 684 666 -18
+ Partials 45 42 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| <svg x="1" y="1" width="14" height="14" viewBox="1 1 14 14" overflow="hidden"> | ||
| <path class="filled no-stroke awsui-icon-panel" d="M8.5 4H4.5C4.22386 4 4 4.22386 4 4.5V11.5C4 11.7761 4.22386 12 4.5 12H8.5C8.77614 12 9 11.7761 9 11.5V4.5C9 4.22386 8.77614 4 8.5 4Z" /> | ||
| </svg> | ||
| </svg> |
There was a problem hiding this comment.
Looks like a svg tag is nested in another svg tag
There was a problem hiding this comment.
Nice find! But I think this is fine. It was copied over from the existing view-vertical icon, was introduced here along with the icon animations and I think the purpose of the internal SVG tag is to to clip its internal element when it is animated away on hover. That is why it has overflow="hidden". A group (g tag) cannot clip in the same way.
I can't find evidence of nested SVGs being invalid, and MDN has an example of it here.
|
/override-visual-regression Expected changes from new icons |
Description
Adds icons: chart, eye, sliders, view-vertical-start.
How has this been tested?
Existing visual regression tests
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.