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: add useConfig hook to ConfigProvider #40215

Merged
merged 9 commits into from
Feb 14, 2023

Conversation

xliez
Copy link
Contributor

@xliez xliez commented Jan 13, 2023

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

#40025

💡 Background and solution

There are too many Context export from ConfigProvider like ConfigContext or SizeContext, it's not well maintain if need more Context export.

ref #39648

📝 Changelog

Language Changelog
🇺🇸 English add useConfig hook to ConfigProvider for get antd ContextProvider value
🇨🇳 Chinese 给 ConfigProvider 新增 useConfig 获取 antd 的 ContextProvider 值

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2023

components/config-provider/index.en-US.md Outdated Show resolved Hide resolved
@zombieJ
Copy link
Member

zombieJ commented Jan 20, 2023

CI failed. Rebase feature to resolve.

@codecov
Copy link

codecov bot commented Jan 20, 2023

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (477b7e8) compared to base (e11ef76).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##           feature    #40215   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          606       607    +1     
  Lines        10287     10296    +9     
  Branches      2789      2789           
=========================================
+ Hits         10287     10296    +9     
Impacted Files Coverage Δ
components/config-provider/hooks/useConfig.ts 100.00% <100.00%> (ø)
components/config-provider/index.tsx 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@xliez xliez requested a review from zombieJ February 7, 2023 01:55
@zombieJ
Copy link
Member

zombieJ commented Feb 8, 2023

OPS. Miss this PR. Seems this need move to 5.3.0

@xliez
Copy link
Contributor Author

xliez commented Feb 9, 2023

OPS. Miss this PR. Seems this need move to 5.3.0

Ok,I have changed the available version in doc

@xliez
Copy link
Contributor Author

xliez commented Feb 10, 2023

Codeball failded with Error: Codeball Labeler failed to access GitHub.
Is this ignorable?Decide pls @zombieJ

@zombieJ
Copy link
Member

zombieJ commented Feb 10, 2023

Codeball failded with Error: Codeball Labeler failed to access GitHub. Is this ignorable?Decide pls @zombieJ

Not sure what happen to this CI. I've restart but still failed. Guess need to push some commit to force trigger CI?

@zombieJ zombieJ merged commit 0d67bde into ant-design:feature Feb 14, 2023
@MadCcc MadCcc mentioned this pull request Mar 5, 2023
20 tasks
RedJue pushed a commit to RedJue/ant-design that referenced this pull request Apr 4, 2023
* feat: add useConfig hook to ConfigProvider

* docs: format config-provide markdown

* doc: add available version

* test: add useConfig test

* docs: add debug

* chore: fix lint error

* fix: getter dead loop

* test: promote useConfig test coverage

* docs(ConfigProvider): update available version
RedJue pushed a commit to RedJue/ant-design that referenced this pull request Apr 25, 2023
* feat: add useConfig hook to ConfigProvider

* docs: format config-provide markdown

* doc: add available version

* test: add useConfig test

* docs: add debug

* chore: fix lint error

* fix: getter dead loop

* test: promote useConfig test coverage

* docs(ConfigProvider): update available version
RedJue pushed a commit to RedJue/ant-design that referenced this pull request Apr 25, 2023
* feat: add useConfig hook to ConfigProvider

* docs: format config-provide markdown

* doc: add available version

* test: add useConfig test

* docs: add debug

* chore: fix lint error

* fix: getter dead loop

* test: promote useConfig test coverage

* docs(ConfigProvider): update available version
@xliez xliez deleted the rfc/use-config branch April 28, 2023 07:07
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.

4 participants