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

refactor: 采用usePrefix以及withConfigConsumer进行组件 prefixCls 构建 #485

Merged
merged 5 commits into from
Nov 18, 2020
Merged

Conversation

phyzess
Copy link
Contributor

@phyzess phyzess commented Nov 17, 2020

@gio-design/components

  • Tooltip, Popover, Popconfirm
    • 新增 subPrefixCls props 进行 tooltip 的 subPrefix 替换
  • 新增 utils/hooks/use-prefix-cls.ts 用于在函数式组件中进行prefixCls的构造
  • 重构了 withConfigConsumer HOC,使其能够拿到最新外层 Provider 提供的rootPrefixCls

改动的地方比较多,并且很多组件内的功能我并不了解,所以请大家仔细 review,有问题请尽快指出,该 pr 需要尽快 merge

@vercel
Copy link

vercel bot commented Nov 17, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/growingio/gio-design/bynmvdhuy
✅ Preview: https://gio-design-git-cls-prefix-fix.growingio.vercel.app

@codecov
Copy link

codecov bot commented Nov 17, 2020

Codecov Report

Merging #485 (a588969) into master (79974bc) will decrease coverage by 0.50%.
The diff coverage is 88.09%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #485      +/-   ##
==========================================
- Coverage   74.27%   73.76%   -0.51%     
==========================================
  Files         117      118       +1     
  Lines        3032     3019      -13     
  Branches      865      868       +3     
==========================================
- Hits         2252     2227      -25     
- Misses        778      790      +12     
  Partials        2        2              
Impacted Files Coverage Δ
...nts/src/components/date-picker/dateRangePicker.tsx 1.66% <0.00%> (+0.02%) ⬆️
...ents/src/components/list/Sortable/SortableItem.tsx 4.44% <0.00%> (ø)
...mponents/src/components/list/Sortable/template.tsx 15.38% <0.00%> (ø)
packages/components/src/components/list/drag.tsx 8.33% <0.00%> (ø)
...kages/components/src/components/upload/Actions.tsx 70.58% <0.00%> (ø)
packages/components/src/components/list/normal.tsx 66.66% <75.00%> (-8.34%) ⬇️
packages/components/src/components/alert/alert.tsx 93.75% <100.00%> (+0.20%) ⬆️
...ckages/components/src/components/avatar/Avatar.tsx 100.00% <100.00%> (ø)
...s/components/src/components/avatar/AvatarGroup.tsx 100.00% <100.00%> (ø)
...ckages/components/src/components/banner/Banner.tsx 100.00% <100.00%> (ø)
... and 51 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 79974bc...7ab8aec. Read the comment docs.

@azure-pipelines
Copy link

Deploy preview for gio-design failed.

@zzt1224
Copy link
Collaborator

zzt1224 commented Nov 17, 2020

Progress, Select, Tag. Approved

@azure-pipelines
Copy link

Deploy preview for ready! ✅ https://deploy-preview-485--gio-design.surge.sh

@azure-pipelines
Copy link

Deploy preview for ready! ✅ https://deploy-preview-485--gio-design.surge.sh

@HunterGitHub HunterGitHub merged commit d80ea0c into growingio:master Nov 18, 2020
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.

[All components] 所有组件样式 prefix 都使用 ConfigContext
6 participants