question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

💡 Proposal - Icons Package

See original GitHub issue

The problem

As we expand and scale, we see a rise in requests to add more icons, whether the user is building a feature in Contentful web-app, a separate app or an internal tool, etc.

With the current structure adding more icons will increase the bundle size, and it also increases the overhead on the maintainers to follow up on what goes in and out.

The proposed solution

Moving all icons to a separate new package @contentful/forma-36-icons where users can import only what they need as svg which will get inline within their bundle

This way we can have a huge icons library without worrying about f36 or consumer’s bundle size as they only get what they ask for.

Adding extra icons would be simpler, and doesn’t require much reviews

Removing icons in the future won’t be necessary, and we could avoid potential breaking changes, and easily support backward compatibility

Usage example

import { search } from '@contentful/forma-36-icons`
import { Icon } from '@contentful/forma-36-react-components`

<Icon color="primary" size="m" icon={search} />

Breaking changes

This change will eventually require forma-36 to remove the current icons from our bundle, and consumers will need to migrate accordingly

Other thoughts

Possibly we could upload these SVG icons to S3 bucket and keep only reference inside the package for faster builds?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
m10lcommented, Jul 2, 2020

Nice, sounds good. I’d advise against S3 - it’d make the contribution process a lot harder and less-open.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Proposal Icons - Free SVG & PNG Proposal Images
Find 1010 Proposal images and millions more royalty free PNG & vector images from the world's most diverse collection of free icons.
Read more >
Proposal Icons & Symbols - Flaticon
Pack : Premium download. Over 8,860,000 icons for 7.50 EUR/month. No attribution required; 8.9M icons & stickers in SVG, EPS, PSD & BASE64 ......
Read more >
709 Commercial Proposal Icon Images, Stock Photos & Vectors
Find Commercial Proposal Icon stock images in HD and millions of other royalty-free stock ... sale, discount, package, commercial proposal Stock Vector.
Read more >
🫠 Melting Face Emoji - Emojipedia
Melting Face. Emoji Meaning. A yellow smiley face melting into a puddle. The eyes and mouth slip down the face, yet still maintain...
Read more >
keyboard shortcuts for all commentbox toolbar icons (#25290 ...
"feature proposal" keyboard shortcuts for all commentbox toolbar icons example: CTRL+SHIFT+B for bold note: once available, documentation...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found