chore: Add FieldContext and connect it to input components#26543
chore: Add FieldContext and connect it to input components#26543behowell wants to merge 1 commit into
Conversation
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 4e058ce9ac62585e7062b8badfa85f74ebe51f84 (build) |
📊 Bundle size reportUnchanged fixtures
|
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 72c70d5:
|
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 1620 | 1620 | 5000 | |
| Button | mount | 1159 | 1158 | 5000 | |
| FluentProvider | mount | 2071 | 2014 | 5000 | |
| FluentProviderWithTheme | mount | 775 | 784 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 731 | 733 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 781 | 785 | 10 | |
| InfoButton | mount | 709 | 709 | 5000 | |
| MakeStyles | mount | 2397 | 2326 | 50000 | |
| Persona | mount | 3781 | 3836 | 5000 | |
| SpinButton | mount | 3169 | 3136 | 5000 |
| @@ -6,13 +6,14 @@ import { ComboboxField_unstable as ComboboxField } from '@fluentui/react-combobo | |||
| import { SparkleFilled } from '@fluentui/react-icons'; | |||
There was a problem hiding this comment.
🕵 fluentuiv9 Open the Visual Regressions report to inspect the 5 screenshots
✅ There was 0 screenshots added, 0 screenshots removed, 1864 screenshots unchanged, 0 screenshots with different dimensions and 5 screenshots with visible difference.
unknown 5 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| ProgressField converged.base.default.chromium.png | 132 | Changed |
| ProgressField converged.hint.default.chromium.png | 132 | Changed |
| ProgressField converged.horizontal.default.chromium.png | 83 | Changed |
| ProgressField converged.required.default.chromium.png | 132 | Changed |
| ProgressField converged.validation.default.chromium.png | 534 | Changed |
|
Given the cost to bundle size, and relatively minor benefit from FieldContext, we've decided not to add it at this time. If there is a compelling reason to add it in the future, we may revisit this. For now, the <Field size="small">
<Input size="small />
</Field> |

Previous Behavior
Now that
Fieldis a standalone component as of PR #26430, we don't have a direct way to pass the field'ssizeorvalidationStateto controls likeInputandProgressBar.New Behavior
Add
FieldContextso that controls can apply styling customizations when they're in a Field, likesizeorvalidationState.Related Issue(s)