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

Update pencil icon. #25135

Merged
merged 2 commits into from Sep 9, 2020
Merged

Update pencil icon. #25135

merged 2 commits into from Sep 9, 2020

Conversation

jasmussen
Copy link
Contributor

Before:

Screenshot 2020-09-08 at 08 47 37

After:

Screenshot 2020-09-08 at 08 53 17

Note, the essence of this PR is to update the icon currently named pencil. There's also a separate edit icon, which is this one:

Screenshot 2020-09-08 at 08 51 52

Perhaps the "pencil" should be renamed "paintbrush" or "brush", but for now at least this updates the icon.

There's also this icon, which could be used for global styles:

Screenshot 2020-09-08 at 08 49 04

@jasmussen jasmussen added [Type] Code Quality Issues or PRs that relate to code quality [Package] Icons /packages/icons labels Sep 8, 2020
@jasmussen jasmussen self-assigned this Sep 8, 2020
@github-actions
Copy link

github-actions bot commented Sep 8, 2020

Size Change: -153 B (0%)

Total Size: 1.2 MB

Filename Size Change
build/a11y/index.js 1.14 kB -1 B
build/annotations/index.js 3.67 kB +2 B (0%)
build/block-editor/index.js 128 kB -35 B (0%)
build/block-library/index.js 139 kB -118 B (0%)
build/blocks/index.js 47.7 kB +5 B (0%)
build/components/index.js 200 kB -3 B (0%)
build/compose/index.js 9.68 kB +1 B
build/data-controls/index.js 1.29 kB +2 B (0%)
build/date/index.js 31.9 kB -2 B (0%)
build/edit-navigation/index.js 11.7 kB -4 B (0%)
build/edit-post/index.js 305 kB +1 B
build/edit-widgets/index.js 12.1 kB +1 B
build/editor/index.js 45.6 kB -2 B (0%)
build/element/index.js 4.65 kB +4 B (0%)
build/format-library/index.js 7.71 kB -1 B
build/html-entities/index.js 621 B -1 B
build/is-shallow-equal/index.js 710 B -1 B
build/keyboard-shortcuts/index.js 2.52 kB -1 B
build/keycodes/index.js 1.94 kB -1 B
build/list-reusable-blocks/index.js 3.12 kB -1 B
build/media-utils/index.js 5.32 kB +2 B (0%)
build/notices/index.js 1.79 kB -1 B
build/plugins/index.js 2.56 kB -1 B
build/redux-routine/index.js 2.85 kB -1 B
build/rich-text/index.js 13.9 kB -1 B
build/server-side-render/index.js 2.77 kB -1 B
build/url/index.js 4.06 kB +4 B (0%)
build/warning/index.js 1.14 kB +1 B
ℹ️ View Unchanged
Filename Size Change
build/api-fetch/index.js 3.41 kB 0 B
build/autop/index.js 2.82 kB 0 B
build/blob/index.js 620 B 0 B
build/block-directory/index.js 8.5 kB 0 B
build/block-directory/style-rtl.css 953 B 0 B
build/block-directory/style.css 952 B 0 B
build/block-editor/style-rtl.css 11.1 kB 0 B
build/block-editor/style.css 11.1 kB 0 B
build/block-library/editor-rtl.css 8.68 kB 0 B
build/block-library/editor.css 8.68 kB 0 B
build/block-library/style-rtl.css 7.59 kB 0 B
build/block-library/style.css 7.58 kB 0 B
build/block-library/theme-rtl.css 754 B 0 B
build/block-library/theme.css 754 B 0 B
build/block-serialization-default-parser/index.js 1.88 kB 0 B
build/block-serialization-spec-parser/index.js 3.1 kB 0 B
build/components/style-rtl.css 15.5 kB 0 B
build/components/style.css 15.5 kB 0 B
build/core-data/index.js 12.3 kB 0 B
build/data/index.js 8.55 kB 0 B
build/deprecated/index.js 772 B 0 B
build/dom-ready/index.js 568 B 0 B
build/dom/index.js 4.48 kB 0 B
build/edit-navigation/style-rtl.css 1.16 kB 0 B
build/edit-navigation/style.css 1.16 kB 0 B
build/edit-post/style-rtl.css 6.26 kB 0 B
build/edit-post/style.css 6.25 kB 0 B
build/edit-site/index.js 19.4 kB 0 B
build/edit-site/style-rtl.css 3.06 kB 0 B
build/edit-site/style.css 3.06 kB 0 B
build/edit-widgets/style-rtl.css 2.46 kB 0 B
build/edit-widgets/style.css 2.45 kB 0 B
build/editor/editor-styles-rtl.css 492 B 0 B
build/editor/editor-styles.css 493 B 0 B
build/editor/style-rtl.css 3.81 kB 0 B
build/editor/style.css 3.81 kB 0 B
build/escape-html/index.js 733 B 0 B
build/format-library/style-rtl.css 547 B 0 B
build/format-library/style.css 548 B 0 B
build/hooks/index.js 2.13 kB 0 B
build/i18n/index.js 3.57 kB 0 B
build/list-reusable-blocks/style-rtl.css 476 B 0 B
build/list-reusable-blocks/style.css 476 B 0 B
build/nux/index.js 3.4 kB 0 B
build/nux/style-rtl.css 671 B 0 B
build/nux/style.css 668 B 0 B
build/primitives/index.js 1.41 kB 0 B
build/priority-queue/index.js 789 B 0 B
build/shortcode/index.js 1.7 kB 0 B
build/token-list/index.js 1.27 kB 0 B
build/viewport/index.js 1.85 kB 0 B
build/wordcount/index.js 1.17 kB 0 B

compressed-size-action

Copy link
Contributor

@ntsekouras ntsekouras left a comment

Choose a reason for hiding this comment

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

Hey @jasmussen! Great icon here but pencil is being used from other components as well, that doesn't make much sense to show a brush icon. For example edit in rss or embed blocks among some others.

So we can have two directions here:

  1. Create a new brush icon ( this one ) and use it FSE page for global styles
  2. Rename this one properly and leave or change the pencil icon that was used in other components for edit to edit icon, as you mention in your PR's description.

What do you think?

@jasmussen
Copy link
Contributor Author

Awesome observation, thank you for that context.

The thing is, the edit icon that this replaces should not be used anywhere, it's an old icon. I will see if it makes sense to add a commit that updates those other components to use better icons.

@ntsekouras
Copy link
Contributor

The thing is, the edit icon that this replaces should not be used anywhere, it's an old icon. I will see if it makes sense to add a commit that updates those other components to use better icons.

Do you want me to make these changes for changing pencil to the newer edit icon and push them here?

@jasmussen
Copy link
Contributor Author

Do you want me to make these changes for changing pencil to the newer edit icon and push them here?

Thanks for the offer, that's okay I'll take a look now!

@jasmussen
Copy link
Contributor Author

Again, excellent catch. I believe I caught them all. Before:

Screenshot 2020-09-08 at 10 12 54

After:

Screenshot 2020-09-08 at 10 13 44

(honestly that component could use love and refactor to use the same link popover as normal links, but that's separate)

Embed before:

Screenshot 2020-09-08 at 10 14 41

After:

Screenshot 2020-09-08 at 10 16 23

Actually that one should probably have a "Replace" label just like Image. But that's also separate, so as to keep this PR focused.

I think the remaining question is whether to rename the "pencil" to "brush" given that we already have a pencil in the "edit" icon. @youknowriad any thoughts?

@ntsekouras
Copy link
Contributor

ntsekouras commented Sep 8, 2020

The only one left is in rss component and then you're done.

I think the remaining question is whether to rename the "pencil" to "brush" given that we already have a pencil in the "edit" icon.

I think you could rename the pencil here..

Copy link
Contributor

@ntsekouras ntsekouras left a comment

Choose a reason for hiding this comment

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

That's great 💯 . Even if you decide to rename, it's a small change. Green CI and land this!

@jasmussen
Copy link
Contributor Author

Ugh, I had forgotten to search for "icon: pencil". Updated now:

Screenshot 2020-09-08 at 10 33 00

I think you could rename the pencil here..

Definitely happy to, just want to make sure that's okay to do with a green light from Riad, for example, since it updates the icon component.

@ntsekouras
Copy link
Contributor

Definitely happy to, just want to make sure that's okay to do with a green light from Riad, for example, since it updates the icon component.

Yes you're right! It might be used by third party code..

@ocean90
Copy link
Member

Is there a reason why we can't have a separate pencil icon and a new brush icon? This would also allow us to copy the current edit icon to pencil and let edit export the "new" pencil icon without any back-compat issues.

// edit.js
import { default as pencil } from './pencil';
export default pencil;

@jasmussen
Copy link
Contributor Author

Is there a reason why we can't have a separate pencil icon and a new brush icon?

I can do whatever we agree is best. Just making sure I understand correctly: this would effectively be a deprecation of the edit icon and suggesting the use of pencil instead? Or would we have both an edit and pencil icon that looked identical?

@ntsekouras
Copy link
Contributor

I think what is suggested and probably is a good idea is to leave edit and pencil icons intact and create a new brush icon (the svg you created now) to be used in FSE edit mode. @ocean90 is this correct?

@jasmussen
Copy link
Contributor Author

Ah, if that's the case we'll still need to revisit the pencil icon and update it. Conceptually it's the same icon as edit and should be updated, as the old icon is deprecated..

@ocean90
Copy link
Member

this would effectively be a deprecation of the edit icon and suggesting the use of pencil instead? Or would we have both an edit and pencil icon that looked identical?

I wouldn't deprecate it, just making edit an alias for pencil for now after the current edit icon has been copied to pencil, basically replacing the old Dashicon. And yes, they would look identical because they would be the same.

@jasmussen
Copy link
Contributor Author

Oooh that makes sense. Thank you, I'll give that a shot (tomorrow, the kids are clawing at me).

@shaunandrews
Copy link
Contributor

shaunandrews commented Sep 8, 2020

I wouldn't deprecate it, just making edit an alias for pencil

This makes a lot of sense to me, too. Has this been done before, and if so are there examples? I like the idea of having matches for both a specific icon (pencil) and a more general description (edit) and linking between the two.

--

Its not clear to me if the paintbrush is a new or existing icon; Does this icon exist in WP currently?

image

For what it's worth, my first response to seeing this icon is "broom" or "sweep." I think that's because I see a "floor" represented by the horizontal line.

I understand you're attempting to keep it consistent with the existing pencil icon (which has this line), but I'm not sure its helpful or actually even logical. When I think of paint brushes, I don't think of thin, straight lines; I think of swirls and blobs and drips.

@stokesman
Copy link
Contributor

stokesman commented Sep 8, 2020

I'll second @shaunandrews, that the icon is ambiguous. I wasn't sure if I was seeing a spade. I think the rather large difference in width from the handle to the fiber bundle is mostly to blame.

In case it's open to suggestion, I'll posit a brush meant for more coverage might be better:

Or if the intended purpose is to denote style settings maybe it doesn't have to be a brush:

@jasmussen jasmussen added the [Status] In Progress Tracking issues with work in progress label Sep 9, 2020
@jasmussen
Copy link
Contributor Author

Its not clear to me if the paintbrush is a new or existing icon; Does this icon exist in WP currently?

It exists insofar as it was designed for global styles and were added to the WordPress Design Library:

Screenshot 2020-09-09 at 09 31 27

(rightmost)

I'd prefer to keep this PR focused on replacing the dashicon that's incorrectly used for global styles. That's not to dismiss any critique of the brush, that's perfectly valid, and perhaps best given as comments directly in the Figma file.

So outside of addressing Dominik's feedback on making "pencil" an alias for "edit", what's the next step? I can picture two approaches:

  1. Add the brush as is, and then follow up with separate PRs to improve the design.
  2. Remove the brush icon agan, and use a different icon that's more acceptable for now.

An alternative icon for global styles was also designed:

Screenshot 2020-09-09 at 09 35 35

That's definitely more font specific, but I think it can work too. Happy to use that also.

Most importantly, I would prefer we don't overthink this — the PR is meant to be a quick win, and I'm happy to do any followup PRs.

@jasmussen
Copy link
Contributor Author

Oh that's interesting. I just rebased and now the icon looks like this:

Screenshot 2020-09-09 at 09 37 40

😆 — someone else had the same instinct! https://github.com/WordPress/gutenberg/pull/24250/files#diff-3924a41ad88da62082971d8c0aa8b20fL58

That effectively settles the discussion. I'm going to remove the Brush icon again, and encourage you all to share your thoughts in the Figma file. Then I'll refocus this PR on making the "pencil" icon an alias.

@jasmussen
Copy link
Contributor Author

Alright, I changed "edit" to be an alias for "pencil". That helps update all the blocks that used the old dashicon:

Screenshot 2020-09-09 at 10 08 12

I kept the updated brush, because it replaces this dashicon:

Screenshot 2020-09-09 at 10 13 52

So, despite what I said in this comment: #25135 (comment) — this PR can be a place where we decide what the actual brush should look like, even though it's currently only used in the Legacy Widget block, and broken at that. But here's a stab:

Screenshot 2020-09-09 at 10 33 30

Screenshot 2020-09-09 at 10 34 15

Let me know what you think and I'll update the SVG.

@shaunandrews
Copy link
Contributor

image

These work well together. The updates to the paintbrush's handle and tip do help it feel more like a paintbrush. (I also see a fountain pen now, but I think that's OK.)

I'd say push this and we can circle back around when/if we find a use for the paintbrush and see how it works in context.

@jasmussen jasmussen removed the [Status] In Progress Tracking issues with work in progress label Sep 9, 2020
@jasmussen
Copy link
Contributor Author

Awesome, thanks so much Shaun. @ntsekouras if you can sanity check my last commit, 6815a59 — not urgent, just when convenient — let's land this and I promise I'll circle back to the brush icon if/when it gets used and feels like it needs additional updating.

@jasmussen
Copy link
Contributor Author

Well there you go! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Icons /packages/icons [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants