Skip to content

Conversation

@WillPorter
Copy link

@WillPorter WillPorter commented Jun 22, 2021

…ustom block icons in the toolbar

Description

Fixes #32599

How has this been tested?

Using npm run test

Screenshots

Types of changes

conditional class render block-switcher.js and new css for those icons. I'm not sure the reusable block icon is being stretched. I think the file is displaying properly. Perhaps the file is stretched? Not 100% confident on that.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@WillPorter WillPorter requested a review from ellatrix as a code owner June 22, 2021 22:11
@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @WillPorter! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Jun 22, 2021
@critterverse
Copy link
Contributor

Nice, it looks like this fixes the spacing.

I'm not sure the reusable block icon is being stretched. I think the file is displaying properly. Perhaps the file is stretched?

It's a very small visual difference but I do believe there is something weird happening with the icon — see the Figma version above and screenshot below. It appears to be off by 2px:

Screen Shot 2021-06-23 at 3 42 47 PM

Here's a link to the relevant page in the Figma Design Library for reference: https://www.figma.com/file/e4tLacmlPuZV47l7901FEs/WordPress-Design-Library?node-id=5415%3A22557

Thanks for looking into this @WillPorter! If you don't hear back from me in a timely manner, it's probably because I left on vacation 🏖️ If you have any questions, the Making WordPress Slack is a great place to ask.

@ntsekouras ntsekouras requested a review from jasmussen July 6, 2021 12:48
@jasmussen
Copy link
Contributor

Hello, @WillPorter, thanks so much for this PR. I think I may have inadvertently fixed this issue myself in #33031 (comment) without having noticed the ticket in the first place:

fix

Can you let me know if it was fixed? And if it was, I regret taking this opportunity from you to contribute. If you have some other PR I can help you land, I'd be happy to help ship it. Ping me any time: @jasmussen.

@jasmussen
Copy link
Contributor

From what I can tell, the icon is correctly sized now as far as the SVG that ships in the block editor:

Screenshot 2021-07-07 at 15 47 36

I'm seeing a bit of a discrepancy with the icon in the Figma library:

Screenshot 2021-07-07 at 15 49 46

It looks off center and, well, squashed compared to what's shipping.

I'm happy to fix that, both in Figma and in the code. Any preference on the wide or squished version of that default block icon?

@critterverse
Copy link
Contributor

Thanks so much for looking into this @jasmussen!

I don't have a strong preference either way (other than not being sure if it was a bug), so I've gone ahead and updated the icon in the Figma file to match the wide version that's currently being shipped 😁

@skorasaurus
Copy link
Member

Closing this since the core issue for this #32599 has been resolved; thanks for your contributions @WillPorter

@skorasaurus skorasaurus closed this Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misaligned custom title in block toolbars

4 participants