Closed Monteth closed 1 year ago
I run into a problem implementing the provideDefaultLabelFromFieldName
functionality in SimpleSchema, you can follow the issue here: https://github.com/longshotlabs/simpl-schema/issues/480
As I understand, as soon as we migrate to Zod in tests or Simple Schema solves the issue with the labels, we could remove all of these label: '' from tests?
Correct. Since we get rid of label
in context, we can no longer tell SimpleSchema not to derive the label from the field name, so we have to pass it explicitly. This behavior is specific to SimpleSchema only.
Merging #1248 (8d605b2) into master (cfaf81a) will decrease coverage by
0.97%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #1248 +/- ##
==========================================
- Coverage 97.48% 96.51% -0.97%
==========================================
Files 231 231
Lines 3821 3821
Branches 1031 1029 -2
==========================================
- Hits 3725 3688 -37
- Misses 4 12 +8
- Partials 92 121 +29
Impacted Files | Coverage Δ | |
---|---|---|
packages/uniforms/src/BaseForm.tsx | 100.00% <ø> (ø) |
|
packages/uniforms/src/connectField.tsx | 96.55% <ø> (-3.45%) |
:arrow_down: |
packages/uniforms/src/filterDOMProps.ts | 100.00% <ø> (ø) |
|
...kages/uniforms-bridge-graphql/src/GraphQLBridge.ts | 97.82% <100.00%> (+0.09%) |
:arrow_up: |
...niforms-bridge-json-schema/src/JSONSchemaBridge.ts | 100.00% <100.00%> (ø) |
|
...-bridge-simple-schema-2/src/SimpleSchema2Bridge.ts | 97.82% <100.00%> (ø) |
|
...rms-bridge-simple-schema/src/SimpleSchemaBridge.ts | 100.00% <100.00%> (ø) |
|
packages/uniforms-bridge-zod/src/ZodBridge.ts | 100.00% <100.00%> (ø) |
|
packages/uniforms/src/useField.tsx | 100.00% <100.00%> (ø) |
Changes are described here: https://github.com/vazco/uniforms/issues/973#issuecomment-1235430047.
This version doesn't include the
provideDefaultLabelFromFieldName
bridge property in SimpleSchema, since it always delivers a 'label' property. We cannot distinguish whether it was inferred from the field name or entered manually into the schema.