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

Remove autoField prop from QuickForm and AutoForm #1166

Closed
wants to merge 3 commits into from

Conversation

wadamek65
Copy link
Contributor

@wadamek65 wadamek65 commented Sep 20, 2022

In this PR the autoField prop is removed from QuickForm and AutoForm.

Closes #980.

Edit: reopened in #1180

@github-actions github-actions bot added Area: Core Affects the uniforms package Area: Docs Affects the documentation or reproductions seed labels Sep 20, 2022
@codecov
Copy link

codecov bot commented Sep 20, 2022

Codecov Report

❗ No coverage uploaded for pull request base (v4@35ff17b). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head 1fff8cb differs from pull request most recent head 6a96f71. Consider uploading reports for the commit 6a96f71 to get more accurate results

@@          Coverage Diff          @@
##             v4    #1166   +/-   ##
=====================================
  Coverage      ?   98.48%           
=====================================
  Files         ?      228           
  Lines         ?     3635           
  Branches      ?      939           
=====================================
  Hits          ?     3580           
  Misses        ?        4           
  Partials      ?       51           

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

@github-actions github-actions bot added Area: Theme Affects some of the theme packages Theme: AntD Affects the uniforms-antd package Theme: Bootstrap 3 Affects the uniforms-bootstrap3 package Theme: Bootstrap 4 Affects the uniforms-bootstrap4 package Theme: Bootstrap 5 Affects the uniforms-bootstrap5 package Theme: Material-UI Affects the uniforms-material package Theme: MUI Affects the uniforms-mui package Theme: Semantic UI Affects the uniforms-semantic package Theme: Unstyled Affects the uniforms-unstyled package labels Sep 20, 2022
@@ -87,25 +87,6 @@ describe('AutoForm', () => {
});

describe('when rendered', () => {
it('calls `onChange` before render', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be best to somehow keep these tests since they are unrelated to the autoField prop but I don't really have an idea on how to rewrite it other than move it to a theme instead which I don't think is a good place for it. Any ideas appreciated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using AutoField.componentDetectorContext.Provider to return the Field component created here would be enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But AutoFields are also theme-specific. Can I somehow use the context provider without having one in the base package or did I misunderstand something?

@wadamek65 wadamek65 self-assigned this Sep 20, 2022
@wadamek65 wadamek65 added this to the v4.0 milestone Sep 20, 2022
@wadamek65 wadamek65 linked an issue Sep 20, 2022 that may be closed by this pull request
@wadamek65 wadamek65 closed this Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Core Affects the uniforms package Area: Docs Affects the documentation or reproductions seed Area: Theme Affects some of the theme packages Theme: AntD Affects the uniforms-antd package Theme: Bootstrap 3 Affects the uniforms-bootstrap3 package Theme: Bootstrap 4 Affects the uniforms-bootstrap4 package Theme: Bootstrap 5 Affects the uniforms-bootstrap5 package Theme: Material-UI Affects the uniforms-material package Theme: MUI Affects the uniforms-mui package Theme: Semantic UI Affects the uniforms-semantic package Theme: Unstyled Affects the uniforms-unstyled package
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Consider removing the autoField prop
2 participants