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

UI: Update every icon for v7 design #18809

Merged
merged 25 commits into from
Aug 17, 2022
Merged

UI: Update every icon for v7 design #18809

merged 25 commits into from
Aug 17, 2022

Conversation

MichaelArestad
Copy link
Contributor

@MichaelArestad MichaelArestad commented Jul 28, 2022

What I did

I updated every icon in Storybook. I also reworked the icon component a bit.

  • To do: Update the available icon list in the README

How to test

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

If your answer is yes to any of these, please make sure to include it in your PR.

@MichaelArestad MichaelArestad added ui maintenance User-facing maintenance tasks labels Jul 28, 2022
@MichaelArestad MichaelArestad self-assigned this Jul 28, 2022
);
};

export type IconType = keyof typeof icons;

export interface SymbolsProps extends ComponentProps<typeof Svg> {
icons?: IconKey[];
}

export const Symbols = memo<SymbolsProps>(({ icons: keys = Object.keys(icons) }) => (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This component differed from the one in the Design System in that there was an effort to make a symbol instead of using SVGs directly (sort of like a sprite). I left that functionality in tact here, but I am unsure if it is necessary. Thoughts?

@MichaelArestad MichaelArestad marked this pull request as ready for review August 4, 2022 22:01
docs/faq.md Show resolved Hide resolved
Copy link
Contributor

@kylegach kylegach left a comment

Choose a reason for hiding this comment

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

The code and visual output here looks great!

I took this PR on thinking that I could address the remaining checks, but ran into hiccups with both:

  1. Failing unit test check
    • There are two storyshots-related snapshots affected by these changes that need updated. I was unable to figure out how to update these locally, after running into issues trying to build addon-storyshots.
  2. Chromatic UI tests
    • There are a few failing stories that use place-hold.it for placeholder images, which has apparently become unreliable.
    • I intended to replace these with a local utility to generate a placeholder image with specific dimensions, but:
      • I didn't see a good place for those to live within the examples directory
      • There are a lot more calls to that service than just those surfaced by this PR. Felt like it should be a separate effort.

@yannbf
Copy link
Member

yannbf commented Aug 8, 2022

The code and visual output here looks great!

I took this PR on thinking that I could address the remaining checks, but ran into hiccups with both:

  1. Failing unit test check

    • There are two storyshots-related snapshots affected by these changes that need updated. I was unable to figure out how to update these locally, after running into issues trying to build addon-storyshots.

I'll take a look at this tomorrow!

  1. Chromatic UI tests

    • There are a few failing stories that use place-hold.it for placeholder images, which has apparently become unreliable.

    • I intended to replace these with a local utility to generate a placeholder image with specific dimensions, but:

      • I didn't see a good place for those to live within the examples directory
      • There are a lot more calls to that service than just those surfaced by this PR. Felt like it should be a separate effort.

Fortunately this has been resolved already, I just merged a PR that addressed this issue 🎉

@yannbf
Copy link
Member

yannbf commented Aug 12, 2022

I'll start adding my findings as comments, hope you don't mind!

I wonder why Chromatic didn't pick this up, I guess we don't have a story for such component.. but something went wrong with the spacing of the share button in docs mode:

image

And this is from an example using

yarn sandbox --template cra/default-js

docs/faq.md Show resolved Hide resolved
@yannbf
Copy link
Member

yannbf commented Aug 12, 2022

I wonder if the icons becoming smaller is also intended

[previous] --------------------------------------------------- [this PR]
image

- The snapshot styles changed because the Button component was modified
@domyen
Copy link
Member

domyen commented Aug 13, 2022

Thanks Yann!

Re: icons getting smaller, @MichaelArestad I wonder if we should embiggen the docs icon so that the doc extends to the top and bottom of the area (similar to the profile icon)

image

re: Docs mode share button
I'm not seeing that on local in Safari or Chrome. Could it be something with the build process?

image

@MichaelArestad
Copy link
Contributor Author

MichaelArestad commented Aug 16, 2022

I wonder why Chromatic didn't pick this up, I guess we don't have a story for such component.. but something went wrong with the spacing of the share button in docs mode:

I was able to confirm this but only with yarn sandbox --template cra/default-js. @domyen may be right in that this feels like a build issue. This styling is missing:

image

This is also a bug in Next so it is unrelated to this PR. You can also see on the official storybook this styling is repeated a few times, which also isn't great. @thafryer can I get some help on this?

image

@MichaelArestad
Copy link
Contributor Author

@domyen I tried making the docs icon larger and, after seeing how it looks, recommend sticking with the current version. Alternatively, we could make the component icon smaller (fourth option):

image

@domyen
Copy link
Member

domyen commented Aug 16, 2022

LGTM @MichaelArestad cc @yannbf

  • We resized the icons – thanks for the call out
  • We're punting on the weird share button in the built docs (that's unrelated to this PR)
  • @MichaelArestad can you follow up with CSF folks about what we need to add to migration.md

docs/faq.md Outdated Show resolved Hide resolved
@shilman shilman changed the title Update every icon UI: Update every icon for v7 design Aug 17, 2022
@shilman shilman merged commit 77dbaab into next Aug 17, 2022
@shilman shilman deleted the update-every-icon branch August 17, 2022 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance User-facing maintenance tasks ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants