VOOZH about

URL: https://phabricator.services.mozilla.com/D301960

⇱ ⚙ D301960 Bug 2032244 - toolkit Nova icons r=#desktop-theme-reviewers!


Bug 2032244 - toolkit Nova icons r=#desktop-theme-reviewers!
ClosedPublic

Authored by sthompson on Fri, May 22, 2:11 AM.
Referenced Files
Unknown Object (File)
Tue, Jun 16, 9:54 PM
Unknown Object (File)
Tue, Jun 16, 9:54 PM
Unknown Object (File)
Tue, Jun 16, 9:54 PM
Unknown Object (File)
Wed, Jun 10, 3:27 PM
Unknown Object (File)
Sun, Jun 7, 6:45 AM
Unknown Object (File)
Sun, Jun 7, 1:39 AM
Unknown Object (File)
Sun, Jun 7, 12:24 AM
Unknown Object (File)
Sat, Jun 6, 11:07 PM
Subscribers

Details

Summary

Displays the Nova iconography when is true.

Updates 72 existing toolkit icons with the following approach:

  1. wraps the existing <path>(s) in a
  2. appends the Nova redrawn icon's <path>(s) in a
  3. adds a <style> block with rules to show only one group at a time

This is an unorthodox approach. It has several drawbacks:

  1. increases individual SVG size
  2. increases the time required to render each SVG
  3. viewing the SVGs in normal image tools will only show the Proton variant, which is confusing

However, I think this approach is better than alternatives.

  1. do not need to add new Nova icon files and CSS rules to use them conditionally
  2. SVG uses in XHTML and similar contexts doesn't require special handling
  3. this can be undone very easily after Nova is released, leaving only the Nova paths
  4. the SVG rendering performance impact is not large, and alternatives would still have non-zero performance impact
  5. total size of SVGs is not that much larger than if we added separate Nova icons

Diff Detail

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.
dao requested changes to this revision.Fri, May 22, 4:58 AM
dao added a subscriber: dao.
dao added inline comments.
toolkit/themes/shared/reader/word-spacing-20.svg
18

clip0_8069_32752 doesn't seem to exist? Might apply to other updated files as well.

toolkit/themes/windows/global/icons/menu-check.svg
7

don't we need fill and fill-opacity here like for non-nova? or I guess move those to the svg element? please check if this applies to other updated icons as well.

toolkit/themes/windows/global/icons/search-textbox.svg
18 ↗(On Diff #1280695)

same here. note that pre-nova uses fill="#939393", not sure if we'd want to keep that.

This revision now requires changes to proceed.Fri, May 22, 4:58 AM
toolkit/themes/shared/reader/word-spacing-20.svg
18

This clip path isn't defined in the acorn-icons SVG, either. Looks like 75 of the icons in the acorn-icons repo have this same problem. I'll ask the design team to update their icon tooling. I can handle this special case in my own script by stripping because none of the acorn-icons actually have a clip path defined.

toolkit/themes/windows/global/icons/menu-check.svg
7

Hmm, yeah, this one may be tricky. All of the redrawn acorn-icons have the context drawing attributes defined on <svg>. There are 27 existing icons where context attrs are defined on specific paths. I'll have to go through these to figure out whether the acorn-icon wouldn't render correctly, whether to put the attrs on the <g class="nova"> only, or whether it's OK to promote these attrs to <svg>.

toolkit/themes/windows/global/icons/search-textbox.svg
18 ↗(On Diff #1280695)

This is a bug in my script. Only the mac version should be updated with the Nova icon because the Nova version matches its style. The Windows one should be left alone because of the color issue and because there was no redrawn version in Nova. I flagged the Windows one with the design team already. I'll fix my script to apply the icon update to the right platform.

sthompson updated this revision to Diff 1284960.
sthompson edited the summary of this revision. (Show Details)
Comment Actions

A number of updates here:

  1. The Acorn team updated their icon exporter to trim clip paths and references to them. I confirmed that there are no longer any in the Nova icons. There are some in the existing Proton icons, but I don't think I need to clean those up in this patch. They should be cleaned up when Nova icons are promoted and the Proton paths are deleted.
  2. thumbs-down-20 and thumbs-up-20 were uploaded to the acorn-icons repo on Github so I was able to include those
  3. I went through all of the icons that set fill/stroke/etc. on specific paths. Among all of the toolkit icons, I found that it was sufficient to promote those attributes to the <svg> element.
  4. I updated the osx search-textbox.svg flavor for Nova and left the Windows one alone. The previous version of this patch inappropriately changed the Windows one.

Through this process of going through all of the icons, I did encounter a few novel issues that hadn't been flagged by anyone yet. Mostly, these were issues where I mapped an inappropriate Acorn icon to the codebase. I think it's likely that there are still some errata in this patch stack, but I think they should be isolated issues rather than systematic ones.

dao added inline comments.
toolkit/themes/osx/global/icons/search-textbox.svg
17

Sorry for the late suggestion, but if it's easy enough to adjust in your script: how do you feel about indenting this by only two spaces instead of four, so that after shipping we can remove the <g> wrapper without reindenting this? This would give us a simpler history on this line.

This revision is now accepted and ready to land.Thu, May 28, 11:34 AM
Comment Actions

Made non-content updates -- the only new changes were whitespace (preserving existing indentation where possible, ensuring 2 space indentation on Nova elements, and putting no indentation on new <style> and <g> tags.

toolkit/themes/osx/global/icons/search-textbox.svg
17

I updated the script to add new <g>, <style> elements with no indentation at all. The indentation from the Proton elements is preserved. The indentation from the Nova elements are capped at 2 spaces.

For most icons, this means that the <svg> and Proton elements have no changes from this stack of patches, and it means that after cleaning up the Proton + migration boilerplate, we'll be left with Nova elements indented from the <svg> element by 2 spaces.

Note that for icons like this where I also moved the fill/fill-opacity attrs from <path> to <svg>, this patch results in changes to basically all of the lines. I think this is OK, and the cleanup should not need to touch the <svg> elements again.

Revision Contents

PathSize
toolkit/
themes/
osx/
global/
icons/
17 lines
shared/
icons/
15 lines
13 lines
13 lines
13 lines
13 lines
13 lines
13 lines
13 lines
13 lines
13 lines
13 lines
13 lines
17 lines
13 lines
14 lines
13 lines
13 lines
15 lines
15 lines
13 lines
14 lines
14 lines
13 lines
13 lines
13 lines
14 lines
17 lines
13 lines
14 lines
13 lines
13 lines
15 lines
16 lines
14 lines
13 lines
13 lines
13 lines
15 lines
13 lines
13 lines
13 lines
13 lines
13 lines
13 lines
14 lines
15 lines
15 lines
15 lines
15 lines
13 lines
13 lines
13 lines
media/
13 lines
14 lines
18 lines
13 lines
15 lines
17 lines
17 lines
15 lines
13 lines
narrate/
13 lines
13 lines
reader/
13 lines
13 lines
13 lines
14 lines
13 lines
13 lines
14 lines
windows/
global/
icons/
17 lines
CommitTreeParentsAuthorSummaryDate
0a19a7c43867343bc237db63Stephen Thompson
Bug 2032244 - toolkit Nova icons r=desktop-theme-reviewers,dao (Show More…)

Diff 1286248

toolkit/themes/osx/global/icons/search-textbox.svg

Loading...

toolkit/themes/shared/icons/arrow-counterclockwise-16.svg

Loading...

toolkit/themes/shared/icons/arrow-down-12.svg

Loading...

toolkit/themes/shared/icons/arrow-down.svg

Loading...

toolkit/themes/shared/icons/arrow-left-12.svg

Loading...

toolkit/themes/shared/icons/arrow-left.svg

Loading...

toolkit/themes/shared/icons/arrow-right-12.svg

Loading...

toolkit/themes/shared/icons/arrow-right.svg

Loading...

toolkit/themes/shared/icons/arrow-up-12.svg

Loading...

toolkit/themes/shared/icons/arrow-up.svg

Loading...

toolkit/themes/shared/icons/arrows-updown.svg

Loading...

toolkit/themes/shared/icons/block.svg

Loading...

toolkit/themes/shared/icons/blocked.svg

Loading...

toolkit/themes/shared/icons/check-filled.svg

Loading...

toolkit/themes/shared/icons/check.svg

Loading...

toolkit/themes/shared/icons/chevron.svg

Loading...

toolkit/themes/shared/icons/close-fill.svg

Loading...

toolkit/themes/shared/icons/close.svg

Loading...

toolkit/themes/shared/icons/color-picker-20.svg

Loading...

toolkit/themes/shared/icons/cursor-arrow.svg

Loading...

toolkit/themes/shared/icons/defaultFavicon.svg

Loading...

toolkit/themes/shared/icons/delete.svg

Loading...

toolkit/themes/shared/icons/edit-copy.svg

Loading...

toolkit/themes/shared/icons/edit-outline.svg

Loading...

toolkit/themes/shared/icons/error.svg

Loading...

toolkit/themes/shared/icons/folder.svg

Loading...

toolkit/themes/shared/icons/help.svg

Loading...

toolkit/themes/shared/icons/highlights.svg

Loading...

toolkit/themes/shared/icons/info-filled.svg

Loading...

toolkit/themes/shared/icons/info.svg

Loading...

toolkit/themes/shared/icons/lightbulb.svg

Loading...

toolkit/themes/shared/icons/more.svg

Loading...

toolkit/themes/shared/icons/move-16.svg

Loading...

toolkit/themes/shared/icons/newsfeed.svg

Loading...

toolkit/themes/shared/icons/open-in-new.svg

Loading...

toolkit/themes/shared/icons/page-landscape.svg

Loading...

toolkit/themes/shared/icons/page-portrait.svg

Loading...

toolkit/themes/shared/icons/plugin.svg

Loading...

toolkit/themes/shared/icons/plus-20.svg

Loading...

toolkit/themes/shared/icons/plus.svg

Loading...

toolkit/themes/shared/icons/print.svg

Loading...

toolkit/themes/shared/icons/reload.svg

Loading...

toolkit/themes/shared/icons/search-glass.svg

Loading...

toolkit/themes/shared/icons/security-warning.svg

Loading...

toolkit/themes/shared/icons/security.svg

Loading...

toolkit/themes/shared/icons/settings.svg

Loading...

toolkit/themes/shared/icons/swap-horizontal-20.svg

Loading...

toolkit/themes/shared/icons/tab-notes.svg

Loading...

toolkit/themes/shared/icons/thumbs-down-20.svg

Loading...

toolkit/themes/shared/icons/thumbs-up-20.svg

Loading...

toolkit/themes/shared/icons/trending.svg

Loading...

toolkit/themes/shared/icons/update-icon.svg

Loading...

toolkit/themes/shared/icons/warning.svg

Loading...

toolkit/themes/shared/media/audio-muted.svg

Loading...

toolkit/themes/shared/media/audio.svg

Loading...

toolkit/themes/shared/media/closed-caption-settings-button.svg

Loading...

toolkit/themes/shared/media/pause-fill.svg

Loading...

toolkit/themes/shared/media/picture-in-picture-closed.svg

Loading...

toolkit/themes/shared/media/picture-in-picture-enter-fullscreen-button.svg

Loading...

toolkit/themes/shared/media/picture-in-picture-exit-fullscreen-button.svg

Loading...

toolkit/themes/shared/media/picture-in-picture-open.svg

Loading...

toolkit/themes/shared/media/play-fill.svg

Loading...

toolkit/themes/shared/narrate/skip-backward-20.svg

Loading...

toolkit/themes/shared/narrate/skip-forward-20.svg

Loading...

toolkit/themes/shared/reader/align-center-20.svg

Loading...

toolkit/themes/shared/reader/align-left-20.svg

Loading...

toolkit/themes/shared/reader/align-right-20.svg

Loading...

toolkit/themes/shared/reader/character-spacing-20.svg

Loading...

toolkit/themes/shared/reader/content-width-20.svg

Loading...

toolkit/themes/shared/reader/line-spacing-20.svg

Loading...

toolkit/themes/shared/reader/word-spacing-20.svg

Loading...

toolkit/themes/windows/global/icons/menu-check.svg

Loading...