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

Add icons to new design system #1548

Merged
merged 5 commits into from
Nov 24, 2023
Merged

Conversation

rosejbon
Copy link
Contributor

@rosejbon rosejbon commented Sep 19, 2023

What does this change?

Adds a new Icon component to the design system and removes the need to use Font Awesome packages. We were only using a small number of icons and can add ones when we need them. There are some slight variance in the icons used and the size is slightly different. This component has the following props:

  • size
  • icon
  • spin: a boolean for whether the animation should spin or not

It inherits the colour of the parent it is in.

How was this tested?

  • Have tested with Cypress (having issues with that)
  • Chromatic

Accessibility

When swapped out I have made sure that any icons have aria-labels if needed or even better are accompanied with visual text (or hidden text for screen readers). This component will require future devs to correctly use it to make sure it is accessible.

Documentation

  • Added to Storybook

@vercel
Copy link

vercel bot commented Sep 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
toiletmap ✅ Ready (Inspect) Visit Preview Nov 24, 2023 10:54am

@github-actions

This comment was marked as outdated.

@cypress
Copy link

cypress bot commented Sep 19, 2023

Passing run #1076 ↗︎

0 63 0 0 Flakiness 0

Details:

Merge d025fd6 into 2e6e689...
Project: GBPTM Commit: 51e85e5fa9 ℹ️
Status: Passed Duration: 02:16 💡
Started: Nov 24, 2023 10:57 AM Ended: Nov 24, 2023 10:59 AM

Review all test suite changes for PR #1548 ↗︎

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@rosejbon rosejbon force-pushed the add-icons-to-new-design-system branch from 0a5601e to b6e1c71 Compare September 20, 2023 13:35
@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@rosejbon rosejbon changed the title WIP: Add icons to new design system Add icons to new design system Oct 20, 2023
@rosejbon rosejbon added the Chromatic starts the Chromatic GitHub action workflow label Oct 20, 2023
Copy link
Member

@ob6160 ob6160 left a comment

Choose a reason for hiding this comment

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

looks good! just a few things slightly off in the Chromatic UI diff

@github-actions
Copy link

📦 Next.js Bundle Analysis for toiletmap

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 188.46 KB (🟢 -25.62 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Fifteen Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (200 KB)
/ 12.27 KB 200.73 KB 100.37% (🟢 -0.05%)
/404 536 B 188.99 KB 94.49% (+/- <0.01%)
/500 603 B 189.05 KB 94.53% (+/- <0.01%)
/about 2.25 KB 190.71 KB 95.36% (🟢 -0.01%)
/contact 626 B 189.07 KB 94.54% (+/- <0.01%)
/explorer 1.06 KB 189.52 KB 94.76% (+/- <0.01%)
/explorer/loos/[id] 16.49 KB 204.95 KB 102.47% (🟡 +0.22%)
/explorer/search 17.52 KB 205.98 KB 102.99% (+/- <0.01%)
/login 1.51 KB 189.97 KB 94.99% (+/- <0.01%)
/loos/[id] 19.84 KB 208.3 KB 104.15% (🟢 -0.34%)
/loos/[id]/edit 45.09 KB 233.55 KB 116.77% (🟡 +0.21%)
/loos/[id]/remove 15.62 KB 204.08 KB 102.04% (🟡 +0.21%)
/loos/add 44.58 KB 233.04 KB 116.52% (🟡 +0.21%)
/map 697 B 189.14 KB 94.57% (+/- <0.01%)
/privacy 1.43 KB 189.89 KB 94.94% (+/- <0.01%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 10% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@rosejbon rosejbon added Chromatic starts the Chromatic GitHub action workflow and removed Chromatic starts the Chromatic GitHub action workflow labels Oct 27, 2023
Copy link

📦 Next.js Bundle Analysis for toiletmap

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 188.44 KB (🟢 -25.62 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Fourteen Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (200 KB)
/ 12.27 KB 200.71 KB 100.35% (🟢 -0.04%)
/404 536 B 188.96 KB 94.48% (+/- <0.01%)
/500 603 B 189.02 KB 94.51% (+/- <0.01%)
/about 2.25 KB 190.68 KB 95.34% (+/- <0.01%)
/contact 626 B 189.05 KB 94.52% (+/- <0.01%)
/explorer 1.06 KB 189.5 KB 94.75% (+/- <0.01%)
/explorer/loos/[id] 16.48 KB 204.92 KB 102.46% (🟡 +0.22%)
/explorer/search 17.52 KB 205.95 KB 102.98% (🟢 -0.01%)
/loos/[id] 19.84 KB 208.28 KB 104.14% (🟢 -0.34%)
/loos/[id]/edit 45.09 KB 233.52 KB 116.76% (🟡 +0.21%)
/loos/[id]/remove 15.62 KB 204.05 KB 102.03% (🟡 +0.21%)
/loos/add 44.57 KB 233.01 KB 116.50% (🟡 +0.21%)
/map 697 B 189.12 KB 94.56% (+/- <0.01%)
/privacy 1.43 KB 189.86 KB 94.93% (+/- <0.01%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 10% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@rosejbon rosejbon added Chromatic starts the Chromatic GitHub action workflow and removed Chromatic starts the Chromatic GitHub action workflow labels Nov 23, 2023
@rosejbon rosejbon requested a review from ob6160 November 23, 2023 16:18
@rosejbon
Copy link
Contributor Author

looks good! just a few things slightly off in the Chromatic UI diff

I've fixed the offending svg, which was annoyingly off centre and now the cypress tests are working again, this should be good to go 🥳

Copy link
Member

@ob6160 ob6160 left a comment

Choose a reason for hiding this comment

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

great work!! :) :shipit:

Copy link

📦 Next.js Bundle Analysis for toiletmap

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 188.64 KB (🟢 -25.57 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Fourteen Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (200 KB)
/ 12.27 KB 200.91 KB 100.46% (🟢 -0.05%)
/404 536 B 189.16 KB 94.58% (+/- <0.01%)
/500 603 B 189.23 KB 94.61% (🟡 +0.01%)
/about 2.25 KB 190.89 KB 95.44% (+/- <0.01%)
/contact 626 B 189.25 KB 94.63% (+/- <0.01%)
/explorer 1.06 KB 189.7 KB 94.85% (+/- <0.01%)
/explorer/loos/[id] 16.48 KB 205.13 KB 102.56% (🟡 +0.22%)
/explorer/search 17.52 KB 206.16 KB 103.08% (+/- <0.01%)
/loos/[id] 19.84 KB 208.48 KB 104.24% (🟢 -0.34%)
/loos/[id]/edit 44.86 KB 233.5 KB 116.75% (🟡 +0.20%)
/loos/[id]/remove 15.62 KB 204.26 KB 102.13% (🟡 +0.21%)
/loos/add 44.34 KB 232.98 KB 116.49% (🟡 +0.21%)
/map 697 B 189.32 KB 94.66% (+/- <0.01%)
/privacy 1.43 KB 190.07 KB 95.03% (+/- <0.01%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 10% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@rosejbon rosejbon enabled auto-merge (rebase) November 24, 2023 15:04
@rosejbon rosejbon merged commit fe515ec into main Nov 24, 2023
15 checks passed
@rosejbon rosejbon deleted the add-icons-to-new-design-system branch November 24, 2023 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chromatic starts the Chromatic GitHub action workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants