You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(icons): add script to automatically pull icons from Figma (#1747)
* feat: add script to pull icons automatically from Figma
* chore: run script to update all icons from Figma source of truth
* feat: add GitHub action workflow file
* chore: update CONTRIBUTION readme for contributing icons
If you updated the `components`, `icons`, or `tokens` package your PR will be decorated with preview releases ([example](https://github.com/launchdarkly/launchpad-ui/pull/1686#issuecomment-2898653450)) which will allow you to install them to your project to test/verify. This is helpful for bug fixes or ensuring no regressions result from a refactoring and/or style changes.
138
141
139
-
---
140
142
141
143
## Common Tasks
142
144
143
-
## Running LaunchPad locally
144
-
145
-
### Installation
145
+
### Local setup
146
146
147
147
[pnpm](https://pnpm.io/) is the package manager used in this monorepo.
148
148
@@ -183,12 +183,19 @@ $ pnpm test
183
183
184
184
### Adding Icons to LaunchPad
185
185
186
-
- Add the SVG body content into a new symbol entry with id `lp-icon-{name}` in the `/src/image/sprite.svg` file in the `@launchpad/icons` package.
187
-
- Add its `id` (minus prefix `lp-icon`) to the icons array in `/src/types.ts`.
188
-
- Run `pnpm storybook` and visit the `Components/Icons` page to ensure your icon was generated properly.
189
-
- Run `pnpm nx run @launchpad-ui/icons:connect` (https://github.com/figma/code-connect/blob/main/cli/scripts/README.md) to update the icons Figma Code Connect file.
186
+
_Do not add icons manually. LaunchPad icons are managed in Figma and synced to the `@launchpad-ui/icons` package via a script._
187
+
188
+
To add a new icon to LaunchPad:
189
+
190
+
- Create a branch in the LaunchPad Figma library and add your icon to the /Icons page.
191
+
- Make sure your new icon is reviewed by design. You can always ping `@uxteam` in #ask-launchpad-design-system if you need help making your icon or to get a review.
192
+
- Merge the icon to the LaunchPad Figma library
193
+
- Run the `sync-icons` GitHub action. This action does the following:
194
+
- Runs `pnpm nx run @launchpad-ui/icons:sync` to build the icons from Figma
195
+
- Runs `pnpm nx run @launchpad-ui/icons:connect` to update the icons [Figma Code Connect](https://github.com/figma/code-connect/blob/main/cli/scripts/README.md) file.
196
+
- Opens a pull request for you
197
+
- Open the `Components/Icons` page on the PR deployed Chromatic storybook to ensure your icon was generated properly.
0 commit comments