Skip to content
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: revert removal of defs, add instanceId suffix to ensure uniquene… #3303

Merged
merged 4 commits into from
Nov 5, 2024

Conversation

Arukuen
Copy link
Contributor

@Arukuen Arukuen commented Sep 4, 2024

…ss of IDs

fixes #3265

Copy link

github-actions bot commented Sep 4, 2024

🤖 Pull request artifacts

file commit
pr3303-stackable-3303-merge.zip 7b7ac5a

github-actions bot added a commit that referenced this pull request Sep 4, 2024
github-actions bot added a commit that referenced this pull request Sep 4, 2024
Copy link
Contributor

@bfintal bfintal left a comment

Choose a reason for hiding this comment

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

useInstanceId just counts the instances of the object in the editor. So there is a large chance that this can conflict when used across the site - e.g. the first icon used in a page is always instance "#1"

Instead of doing useInstanceId, generate a random number to append instead directly inside cleanSvgString

github-actions bot added a commit that referenced this pull request Sep 11, 2024
github-actions bot added a commit that referenced this pull request Sep 11, 2024
@andeng1106
Copy link

@Arukuen @bfintal When uploading this SVG, it still doesn't display both on frontend and editor. The SVG icon is from the user that causes the issue to be reopened.

Screen.Recording.2024-09-23.at.2.mp4

@bfintal
Copy link
Contributor

bfintal commented Nov 5, 2024

The SVG pointed out seems to have an image embedded inside it. I believe we will not support this one (and WP might be stripping this out as well)

@bfintal bfintal merged commit afd519e into develop Nov 5, 2024
1 of 6 checks passed
@bfintal bfintal deleted the fix/3265-clean-svg-id branch November 5, 2024 10:27
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.

Uploaded SVG icon from Icon block causes the Icon List icons to be invisible
3 participants