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 the background, arrowUpLeft, keyboardReturn and square icons #69075

Closed
2 of 6 tasks
afercia opened this issue Feb 6, 2025 · 2 comments · Fixed by #69076
Closed
2 of 6 tasks

Fix the background, arrowUpLeft, keyboardReturn and square icons #69075

afercia opened this issue Feb 6, 2025 · 2 comments · Fixed by #69076
Assignees
Labels
[Package] Icons /packages/icons [Type] Bug An existing feature does not function as intended

Comments

@afercia
Copy link
Contributor

afercia commented Feb 6, 2025

Description

Icons in the icons package should use consistent props passed to the SVG component.

Turns out that:

  • background and arrowUpLeft:
    • miss the viewBox="0 0 24 24" attribute as such their default size is smaller than expected
    • have explicit width="24" height="24" set, they are unnecessary because the size is added later
    • have a fill="none" attribute so by default they are not visible
  • square:
    • has a a fill="none" attribute which doesn't impact the visibility but it is unnecessary

introduced in
#65183
#65304
#65497

Step-by-step reproduction instructions

Screenshots, screen recording, code snippet

Image

Image

Environment info

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
@afercia afercia added [Package] Icons /packages/icons [Type] Bug An existing feature does not function as intended labels Feb 6, 2025
@afercia afercia self-assigned this Feb 6, 2025
@afercia
Copy link
Contributor Author

afercia commented Feb 6, 2025

The keyboardReturn icon has probems as well, it misses the viewBx attribute so that by defualt the sizes are messed up:

Image

Will push an update to the associated PR.

@afercia afercia changed the title Fix the background, arrowUpLeft and square icons Fix the background, arrowUpLeft, keyboardReturn and square icons Feb 6, 2025
@afercia
Copy link
Contributor Author

afercia commented Feb 6, 2025

Re: the keyboardReturn icon, I see the viewBox was removed in #59669 intentionally. I'm not sure that was the correct fix. Rather, the buttons that contain the icon and the size passed to the Button should make the icon render correctly. Adding back the removed viewBox sems to work fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Icons /packages/icons [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant