contentful / forma-36

A design system by Contentful
https://f36.contentful.com
MIT License
329 stars 81 forks source link

feat(paint-brush-icon): add new icon for paint brush #2819

Closed ethan-ozelius-contentful closed 1 week ago

ethan-ozelius-contentful commented 4 weeks ago

Purpose of PR

  1. Fix a support issue that came up, where users are unable to resolve import { PaintBrushIcon } from '@contentful/f36-icons-alpha'; dependency when using yarn.

    • (hypothesis) root cause: forma v4 was importing the v5 alpha icons package which contains the paintbrush via "@contentful/f36-icons-alpha": "npm:@contentful/f36-icons@^5.0.0-alpha.26" which uses the npm: prefix to alias the v5 package since the v4 and v5 f36-icons package both have the same name.
    • Solution:: Add paintbrush icon to v4 and not worry about v5. This PR removes the @contentful/f36-icons@^5.0.0-alpha dependency and adds the paintbrush to v4. (see number 2). Once the paintbrush icon has been merged into v4, <EntityListItem> will import that icon and add it back.
  2. As part of an effort to improve the UX of forma36's <EntityCard>, by supporting Experiences, as an entity type, this PR adds the paintbrush icon which will be the default icon for Experiences in the <EntityCard>. However, since Entity List has a dependency on f36-icons, the icon has to be added before it can be referenced anywhere else.

This Icon technically already exists in user_interface navbar in the Studio Experiences tab (see screenshot), but is obviously not accessible to forma.

Screenshot 2024-07-05 at 1 33 08 PM

Screenshot of Icon

Screenshot 2024-07-05 at 1 02 15 PM

PR Checklist

vercel[bot] commented 4 weeks ago

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

Name Status Preview Updated (UTC)
forma-36 ✅ Ready (Inspect) Visit Preview Jul 22, 2024 2:47pm
changeset-bot[bot] commented 4 weeks ago

🦋 Changeset detected

Latest commit: 44dccff22195fdfa6f8e637f292a81bd51fc81d4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 37 packages | Name | Type | | ---------------------------- | ----- | | @contentful/f36-entity-list | Patch | | @contentful/f36-icons | Minor | | @contentful/f36-accordion | Patch | | @contentful/f36-asset | Patch | | @contentful/f36-autocomplete | Patch | | @contentful/f36-badge | Patch | | @contentful/f36-button | Patch | | @contentful/f36-card | Patch | | @contentful/f36-collapse | Patch | | @contentful/f36-copybutton | Patch | | @contentful/f36-core | Patch | | @contentful/f36-datetime | Patch | | @contentful/f36-datepicker | Patch | | @contentful/f36-drag-handle | Patch | | @contentful/f36-empty-state | Patch | | @contentful/f36-forms | Patch | | @contentful/f36-icon | Patch | | @contentful/f36-header | Patch | | @contentful/f36-list | Patch | | @contentful/f36-menu | Patch | | @contentful/f36-modal | Patch | | @contentful/f36-navbar | Patch | | @contentful/f36-note | Patch | | @contentful/f36-notification | Patch | | @contentful/f36-pagination | Patch | | @contentful/f36-pill | Patch | | @contentful/f36-popover | Patch | | @contentful/f36-skeleton | Patch | | @contentful/f36-spinner | Patch | | @contentful/f36-table | Patch | | @contentful/f36-tabs | Patch | | @contentful/f36-text-link | Patch | | @contentful/f36-tooltip | Patch | | @contentful/f36-typography | Patch | | @contentful/f36-components | Patch | | @contentful/f36-image | Patch | | @contentful/f36-avatar | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

github-actions[bot] commented 4 weeks ago

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
CommonJS 136.69 KB (-1.16% 🔽) 2.8 s (-1.16% 🔽) 740 ms (+5.61% 🔺) 3.5 s
Module 132.94 KB (-1.23% 🔽) 2.7 s (-1.23% 🔽) 865 ms (+15.48% 🔺) 3.6 s
cf-remylenoir commented 3 weeks ago

Hello Ethan,

I am sorry you missed this. We introduced the icon as part of the v5 alpha icons and you can already use it.

import { PaintBrushIcon } from ‘@contentful/f36-icons-alpha’;

We introduced it in the updated navigation (internal beta as we speak).

We migrated all v4 icons to use v5, but it was missed in Experiences because it was a custom SVG, which the codemod does not support.

default active