fix(TimePicker): Selection now works in locales that don't use "am"/"pm" in their time format#28469
Merged
behowell merged 1 commit intoAug 3, 2023
Conversation
…pm" in their time format
2 tasks
|
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 edd5609:
|
Collaborator
📊 Bundle size report🤖 This report was generated against e3a0d071997ee796ba7d0931b6d3a5a341fb3921 |
Collaborator
🕵 fluentuiv8 No visual regressions between this PR and main |
Asset size changes
Baseline commit: e3a0d071997ee796ba7d0931b6d3a5a341fb3921 (build) |
Collaborator
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| BaseButton | mount | 613 | 612 | 5000 | |
| Breadcrumb | mount | 1679 | 1686 | 1000 | |
| Checkbox | mount | 1642 | 1695 | 5000 | |
| CheckboxBase | mount | 1438 | 1480 | 5000 | |
| ChoiceGroup | mount | 2883 | 2859 | 5000 | |
| ComboBox | mount | 646 | 642 | 1000 | |
| CommandBar | mount | 6064 | 6146 | 1000 | |
| ContextualMenu | mount | 12775 | 11762 | 1000 | |
| DefaultButton | mount | 751 | 744 | 5000 | |
| DetailsRow | mount | 2140 | 2163 | 5000 | |
| DetailsRowFast | mount | 2147 | 2174 | 5000 | |
| DetailsRowNoStyles | mount | 2055 | 1986 | 5000 | |
| Dialog | mount | 2613 | 2630 | 1000 | |
| DocumentCardTitle | mount | 233 | 225 | 1000 | |
| Dropdown | mount | 2034 | 1965 | 5000 | |
| FocusTrapZone | mount | undefined | err | 5000 | |
| FocusZone | mount | 1077 | 1046 | 5000 | |
| GroupedList | mount | 41455 | 41303 | 2 | |
| GroupedList | virtual-rerender | 19723 | 19816 | 2 | |
| GroupedList | virtual-rerender-with-unmount | 50136 | 50353 | 2 | |
| GroupedListV2 | mount | 220 | 225 | 2 | |
| GroupedListV2 | virtual-rerender | 216 | 212 | 2 | |
| GroupedListV2 | virtual-rerender-with-unmount | 220 | 227 | 2 | |
| IconButton | mount | 1083 | 1080 | 5000 | |
| Label | mount | 330 | 335 | 5000 | |
| Layer | mount | 2718 | 2735 | 5000 | |
| Link | mount | 389 | 387 | 5000 | |
| MenuButton | mount | 933 | 942 | 5000 | |
| MessageBar | mount | 21676 | 21675 | 5000 | |
| Nav | mount | 1907 | 1920 | 1000 | |
| OverflowSet | mount | 782 | 788 | 5000 | |
| Panel | mount | 1751 | 1781 | 1000 | |
| Persona | mount | 744 | 762 | 1000 | |
| Pivot | mount | 863 | 872 | 1000 | |
| PrimaryButton | mount | 851 | 823 | 5000 | |
| Rating | mount | 4504 | 4598 | 5000 | |
| SearchBox | mount | 903 | 868 | 5000 | |
| Shimmer | mount | 1780 | 1826 | 5000 | |
| Slider | mount | 1306 | 1302 | 5000 | |
| SpinButton | mount | 2778 | 2803 | 5000 | |
| Spinner | mount | 371 | 386 | 5000 | |
| SplitButton | mount | 1792 | 1825 | 5000 | |
| Stack | mount | 408 | 402 | 5000 | |
| StackWithIntrinsicChildren | mount | 855 | 847 | 5000 | |
| StackWithTextChildren | mount | 2637 | 2629 | 5000 | |
| SwatchColorPicker | mount | 6024 | 6044 | 5000 | |
| TagPicker | mount | 1432 | 1413 | 5000 | |
| Text | mount | 382 | 363 | 5000 | |
| TextField | mount | 897 | 939 | 5000 | |
| ThemeProvider | mount | 818 | 814 | 5000 | |
| ThemeProvider | virtual-rerender | 587 | 580 | 5000 | |
| ThemeProvider | virtual-rerender-with-unmount | 1286 | 1273 | 5000 | |
| Toggle | mount | 588 | 635 | 5000 | |
| buttonNative | mount | 192 | 190 | 5000 |
micahgodbolt
approved these changes
Aug 3, 2023
marcosmoura
added a commit
to marcosmoura/fluentui
that referenced
this pull request
Aug 7, 2023
* master: chore(cxe-prg): migrate to new slot API (microsoft#28752) chore(teams-prg): migrate to new slot API (microsoft#28751) chore: re-export slot and assertSlots methods (microsoft#28755) Docs(react-tree): Improve docs and stories (microsoft#28741) feat: implements nested tree selection (microsoft#28668) applying package updates applying package updates feature(react-utilities): implements new slot methods (`slot` and `assertSlots`) (microsoft#28373) fix(TimePicker): Selection now works in locales that don't use "am"/"pm" in their time format (microsoft#28469) bugfix: ensures controlled state works properly + (microsoft#28665) feat(tokens): Add status color tokens (microsoft#28006) feat(tokens): Add colorBrandStroke2Contrast and colorNeutralStrokeAlpha2 (microsoft#28638) Made BreadcrumbButton consistent with Item and Link (microsoft#28672)
marcosmoura
added a commit
to marcosmoura/fluentui
that referenced
this pull request
Aug 7, 2023
* master: chore(cxe-prg): migrate to new slot API (microsoft#28752) chore(teams-prg): migrate to new slot API (microsoft#28751) chore: re-export slot and assertSlots methods (microsoft#28755) Docs(react-tree): Improve docs and stories (microsoft#28741) feat: implements nested tree selection (microsoft#28668) applying package updates applying package updates feature(react-utilities): implements new slot methods (`slot` and `assertSlots`) (microsoft#28373) fix(TimePicker): Selection now works in locales that don't use "am"/"pm" in their time format (microsoft#28469) bugfix: ensures controlled state works properly + (microsoft#28665) feat(tokens): Add status color tokens (microsoft#28006) feat(tokens): Add colorBrandStroke2Contrast and colorNeutralStrokeAlpha2 (microsoft#28638) Made BreadcrumbButton consistent with Item and Link (microsoft#28672) fix(EventListener): do not use `defaultProps` (microsoft#28725)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previous Behavior
TimePicker selection does not work when using a locale that doesn't use the characters "am"/"pm" in the time format, such as Japanese. This happens because the TimePicker is attempting to parse the locale-formatted time string of the new value when the selection changes, using a parsing function that is not locale-aware.
New Behavior
Save the Date object in each of the ComboBox items used by TimePicker. When a new selection is made, use the Date object itself, rather than parsing the formatted time string.
Related Issue(s)