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

Make pnpm process-icons remove icons no longer in assets #50864

Open
ravicious opened this issue Jan 8, 2025 · 0 comments
Open

Make pnpm process-icons remove icons no longer in assets #50864

ravicious opened this issue Jan 8, 2025 · 0 comments
Labels
developer-experience Addressing these issues will improve the experience of developers working on Teleport ui

Comments

@ravicious
Copy link
Member

I noticed that after running pnpm process-icons, not all files in web/packages/design/src/Icon/Icons/ get updated. We should do rm web/packages/design/src/Icon/Icons/* before generating icon files.

Some icons are still used in the project:

$ rm -rf web/packages/design/src/Icon/Icons/*
zsh: sure you want to delete more than 100 files in /Users/rav/src/teleport/web/packages/design/src/Icon/Icons [yn]? y

$ pnpm process-icons

> [email protected] process-icons /Users/rav/src/teleport
> node web/packages/design/src/Icon/script/script.js & pnpm prettier --log-level silent --write 'web/packages/design/src/Icon/**/*.tsx'

Generated Icons.
Generated index.ts file.
Generated stories.

$ g st
## r7s/icon-ref...origin/r7s/icon-ref
 D web/packages/design/src/Icon/Icons/CSSVisa.tsx
 D web/packages/design/src/Icon/Icons/Equalizer.tsx
 D web/packages/design/src/Icon/Icons/EqualizerVertical.tsx
 D web/packages/design/src/Icon/Icons/Fingerprint.tsx
 D web/packages/design/src/Icon/Icons/Hometemp.tsx
 D web/packages/design/src/Icon/Icons/InfoFilled.tsx
 D web/packages/design/src/Icon/Icons/MobileCamera.tsx
 D web/packages/design/src/Icon/Icons/Person.tsx
 D web/packages/design/src/Icon/Icons/PersonAdd.tsx

$ pnpm type-check

> [email protected] type-check /Users/rav/src/teleport
> NODE_OPTIONS='--max-old-space-size=4096' tsc --build

e/web/teleport/src/AccessMonitoring/Report/ReportContent.tsx:5:28 - error TS2307: Cannot find module 'design/Icon/Icons/InfoFilled' or its corresponding type declarations.

5 import { InfoFilled } from 'design/Icon/Icons/InfoFilled';
                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

web/packages/teleport/src/DeviceTrust/EmptyList.tsx:38:30 - error TS2307: Cannot find module 'design/Icon/Icons/MobileCamera' or its corresponding type declarations.

38 import { MobileCamera } from 'design/Icon/Icons/MobileCamera';
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 2 errors.

From what Bartosz has found, MobileCamera got renamed to DeviceMobileCamera. InfoFilled is basically Info, but using fill instead of color for the icon color, so we need to replace it and just make sure it doesn’t appear odd.

@ravicious ravicious added developer-experience Addressing these issues will improve the experience of developers working on Teleport ui labels Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer-experience Addressing these issues will improve the experience of developers working on Teleport ui
Projects
None yet
Development

No branches or pull requests

1 participant