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

feat: icons插件增加ant-design/icons类型提示 #11891

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

wangyangexpo
Copy link

No description provided.

Copy link

vercel bot commented Nov 22, 2023

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
umi ⬜️ Ignored (Inspect) Visit Preview Nov 23, 2023 2:37pm

packages/preset-umi/src/features/icons/icons.ts Outdated Show resolved Hide resolved
packages/preset-umi/src/features/icons/icons.ts Outdated Show resolved Hide resolved
packages/preset-umi/src/features/icons/icons.ts Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 23, 2023

Codecov Report

Attention: 31 lines in your changes are missing coverage. Please review.

Comparison is base (2fc2a8c) 28.89% compared to head (0f780c6) 28.81%.
Report is 4 commits behind head on master.

Files Patch % Lines
packages/preset-umi/src/features/icons/icons.ts 0.00% 29 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11891      +/-   ##
==========================================
- Coverage   28.89%   28.81%   -0.09%     
==========================================
  Files         488      488              
  Lines       14892    14935      +43     
  Branches     3538     3545       +7     
==========================================
  Hits         4303     4303              
- Misses       9829     9869      +40     
- Partials      760      763       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fz6m
Copy link
Contributor

fz6m commented Nov 23, 2023

我实际看了一下,用户不一定需要 ant design icons 这个依赖他就能用 antd icons ,因为 iconify 把所有 svg 给抽取变成 json 了,所以代码逻辑我做了一些调整。

因为 antd icons 已经很多了,类型字符串很大,特别是如果还用了 mdi ,那更加庞大,在我的电脑(比较旧)上如果不人为按下类型提示按钮甚至都不会有类型提示自动出现,另外我感觉 array[number] 这种好像性能比较差,类型提示出不来。

@fz6m
Copy link
Contributor

fz6m commented Nov 23, 2023

我认为这个 PR 可以提升一部分体验,但生成的类型真的很大,实际上可能会造成较大的 IDE 加载类型时带来的性能压力(如风扇一直转)。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants