-
Notifications
You must be signed in to change notification settings - Fork 33
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
fix(Icons): prevent icons from having same IDs (duplicate-id violation) #1714
Conversation
Because we removed the original timestamp with the reset.
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit a4a2791:
|
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.
Thanks for the super quick fix 🙌
✅ DNB Eufemia Portal deploy preview ready
|
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.
✅
# [9.38.0-beta.1](v9.37.0...v9.38.0-beta.1) (2022-11-17) ### Bug Fixes * add support to IS_SAFARI_DESKTOP for Safari v16 on macOS ([#1718](#1718)) ([54e2cba](54e2cba)) * **Anchor:** export types as AnchorAllProps and original instance ([#1715](#1715)) ([92ec784](92ec784)) * **Icons:** prevent icons from having same IDs (duplicate-id violation) ([#1714](#1714)) ([5e4079d](5e4079d)) * **Provider:** rewrite to functional component ([#1731](#1731)) ([b504d06](b504d06)) * **Table:** align odd/even modifiers with CSS nth ([#1724](#1724)) ([8bdad07](8bdad07)) ### Features * **Table:** add "fixed" prop for fixed table layouts ([#1708](#1708)) ([241ee0f](241ee0f)) * **Table:** add Table.SortButton ([#1709](#1709)) ([288a8db](288a8db)) * **Table:** add Th.HelpButton to be used in Table Headers ([#1711](#1711)) ([c142323](c142323)) * **Th:** add table header sortable props ([#1706](#1706)) ([c40393a](c40393a)) * **Tr:** automate odd/even and make it overridable ([#1705](#1705)) ([d73d3cb](d73d3cb)) * **Upload:** support files dropped on the document body ([#1719](#1719)) ([f206243](f206243))
🎉 This PR is included in version 9.38.0-beta.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [9.38.0](v9.37.0...v9.38.0) (2022-11-22) ### Bug Fixes * add support to IS_SAFARI_DESKTOP for Safari v16 on macOS ([#1718](#1718)) ([54e2cba](54e2cba)) * **Anchor:** export types as AnchorAllProps and original instance ([#1715](#1715)) ([92ec784](92ec784)) * **Icons:** prevent icons from having same IDs (duplicate-id violation) ([#1714](#1714)) ([5e4079d](5e4079d)) * **Provider:** rewrite to functional component ([#1731](#1731)) ([b504d06](b504d06)) * **Table:** align odd/even modifiers with CSS nth ([#1724](#1724)) ([8bdad07](8bdad07)) ### Features * **Table:** add "fixed" prop for fixed table layouts ([#1708](#1708)) ([241ee0f](241ee0f)) * **Table:** add table "border" and "outline" property ([#1739](#1739)) ([ad63ffb](ad63ffb)) * **Table:** add Table.ScrolView to support horizontal scroll ([#1735](#1735)) ([85a4d86](85a4d86)) * **Table:** add Table.SortButton ([#1709](#1709)) ([288a8db](288a8db)) * **Table:** add TableContainer to stack tables with an outline ([#1740](#1740)) ([376ac06](376ac06)) * **Table:** add Th.HelpButton to be used in Table Headers ([#1711](#1711)) ([c142323](c142323)) * **Table:** support rowSpan ([#1733](#1733)) ([463692d](463692d)) * **Th:** add table header sortable props ([#1706](#1706)) ([c40393a](c40393a)) * **Tr:** automate odd/even and make it overridable ([#1705](#1705)) ([d73d3cb](d73d3cb)) * **Typography:** support styles for superscript and subscript elements ([#1721](#1721)) ([c2b043d](c2b043d)) * **Upload:** support files dropped on the document body ([#1719](#1719)) ([f206243](f206243))
🎉 This PR is included in version 9.38.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Just so y'all know, Figma exports In the majority of cases, you don't need to clip any content. So if you uncheck it, there are no visual changes, but the exported SVG doesn't have this
|
…n) (#1714) * fix(Icons): prevent icons from having same IDs (duplicate-id violation) * Refetch icons with the command: `yarn figma:reset` * Update snapshots with new order Because we removed the original timestamp with the reset.
thanks for pointing out @buzinas ❤️ |
Thanks for @dinarosv for reporting 🙏
After the change, SVG IDs get the file-name, so they will be unique per icon. But not per page. So that's still an issue. And can lower a lighthouse score, still.
IDs in SVGs are used in order to link the usage of
clipPath
.Its the Figma export that sets this. 52 icons are effected (from a total of 260).
E.g. the
thumb_up
(16px) uses this, but notthumb_up
(24px) – I'm not sure why this difference. We may try to find out more about it.Approaches we can do to enhance this beyond this PR:
clipPath
on some icons, and sddenly not on very similar icons.clipPath
. What are the side-effects? They can be different from icon to icon.clipPath
usage. But that's not so easy. There is an open issue/request for it.In this PR, we get this change: