Skip to content

Conversation

youknowriad
Copy link
Contributor

What?

When using the DataViews component from dataviews/wp in a WordPress plugin, you can end up with icons not rendering properly. The reason is that the package bundles its own version of components and primitives packages which means that the test to check whether SVG component is used fails (two different instances of SVG).

I think that check is fragile to be honest and shouldn't have existed in the first place. We could in theory just pass "height"/"width" too all components (instead of "size") but to avoid disruptions and potential small breaking changes, I kept the "size" passing for now but just added the height/width props that way the rendering is not broken at least..

Testing instructions

There should be no impact here, but DataViews actions would look properly if used in a plugin.

@youknowriad youknowriad requested a review from aduth July 17, 2025 09:44
@youknowriad youknowriad self-assigned this Jul 17, 2025
@youknowriad youknowriad requested a review from ajitbohra as a code owner July 17, 2025 09:44
@youknowriad youknowriad added the [Type] Bug An existing feature does not function as intended label Jul 17, 2025
Copy link

github-actions bot commented Jul 17, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

youknowriad and others added 2 commits July 17, 2025 13:15
@mirka mirka added [Package] Components /packages/components [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond labels Jul 17, 2025
@youknowriad youknowriad enabled auto-merge (squash) July 17, 2025 14:42
@youknowriad youknowriad merged commit 882e371 into trunk Jul 17, 2025
76 of 78 checks passed
@youknowriad youknowriad deleted the update/icon-component branch July 17, 2025 14:59
@github-actions github-actions bot added this to the Gutenberg 21.3 milestone Jul 17, 2025
USERSATOSHI pushed a commit to USERSATOSHI/gutenberg that referenced this pull request Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants