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

fix(DatePicker, react-datepicker-compat): Make year picker react to go to today button #28907

Merged

Conversation

sopranopillow
Copy link
Contributor

@sopranopillow sopranopillow commented Aug 17, 2023

Previous Behavior

Year picker was not updating itself when the navigated year or selected year changed. This made it so that when clicking go to today, the picker would not update to the current year.

datepicker-gototoday-doesnt-work.mp4

New Behavior

datepicker-gototoday-works.mp4

Year picker's state now takes a look at the navigated and selected date to update the current years in view accordingly.

Related Issue(s)

@sopranopillow sopranopillow self-assigned this Aug 17, 2023
@sopranopillow sopranopillow marked this pull request as ready for review August 17, 2023 18:44
@sopranopillow sopranopillow requested review from a team and khmakoto as code owners August 17, 2023 18:44
@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 17, 2023

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 cdfd573:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

sopranopillow and others added 2 commits August 17, 2023 11:55
…ar.base.tsx

Co-authored-by: Makoto Morimoto <Humberto.Morimoto@microsoft.com>
…ts/CalendarYear/CalendarYear.tsx

Co-authored-by: Makoto Morimoto <Humberto.Morimoto@microsoft.com>
@sopranopillow sopranopillow enabled auto-merge (squash) August 17, 2023 18:55
@fabricteam
Copy link
Collaborator

fabricteam commented Aug 17, 2023

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-datepicker-compat
DatePicker Compat
207.127 kB
57.41 kB
207.157 kB
57.399 kB
30 B
-11 B

🤖 This report was generated against 669c13cc90c399d2e0e727be721f868c6c6e2932

@fabricteam
Copy link
Collaborator

fabricteam commented Aug 17, 2023

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
BaseButton mount 609 630 5000
Breadcrumb mount 1658 1638 1000
Checkbox mount 1671 1679 5000
CheckboxBase mount 1503 1475 5000
ChoiceGroup mount 2977 2962 5000
ComboBox mount 649 658 1000
CommandBar mount 6169 6203 1000
ContextualMenu mount 11980 12015 1000
DefaultButton mount 736 744 5000
DetailsRow mount 2191 2163 5000
DetailsRowFast mount 2141 2178 5000
DetailsRowNoStyles mount 2003 2014 5000
Dialog mount 2731 2619 1000
DocumentCardTitle mount 222 239 1000
Dropdown mount 1948 1964 5000
FocusTrapZone mount 1106 1154 5000
FocusZone mount 1061 1072 5000
GroupedList mount 41093 41468 2
GroupedList virtual-rerender 19621 19873 2
GroupedList virtual-rerender-with-unmount 50766 49775 2
GroupedListV2 mount 210 220 2
GroupedListV2 virtual-rerender 209 202 2
GroupedListV2 virtual-rerender-with-unmount 223 234 2
IconButton mount 1092 1102 5000
Label mount 332 346 5000
Layer mount 2728 2698 5000
Link mount 405 385 5000
MenuButton mount 917 937 5000
MessageBar mount 21345 21245 5000
Nav mount 1990 1926 1000
OverflowSet mount 787 768 5000
Panel mount 2009 1755 1000
Persona mount 728 739 1000
Pivot mount 876 868 1000
PrimaryButton mount 848 851 5000
Rating mount 4536 4624 5000
SearchBox mount 905 916 5000
Shimmer mount 1876 1896 5000
Slider mount 1348 1356 5000
SpinButton mount 2856 2839 5000
Spinner mount 387 399 5000
SplitButton mount 1799 1837 5000
Stack mount 406 407 5000
StackWithIntrinsicChildren mount 856 877 5000
StackWithTextChildren mount 2635 2582 5000
SwatchColorPicker mount 6002 6161 5000
TagPicker mount 1450 1456 5000
Text mount 373 366 5000
TextField mount 970 924 5000
ThemeProvider mount 848 840 5000
ThemeProvider virtual-rerender 587 593 5000
ThemeProvider virtual-rerender-with-unmount 1271 1293 5000
Toggle mount 633 602 5000
buttonNative mount 196 190 5000

@size-auditor
Copy link

size-auditor bot commented Aug 17, 2023

Asset size changes

Project Bundle Baseline Size New Size Difference
office-ui-fabric-react fluentui-react-Calendar 118.64 kB 118.609 kB BelowBaseline     -31 bytes
office-ui-fabric-react fluentui-react-DatePicker 178.325 kB 178.294 kB BelowBaseline     -31 bytes

ExceedsTolerance Over Tolerance (1024 B) ExceedsBaseline Over Baseline BelowBaseline Below Baseline New New Deleted  Removed 1 kB = 1000 B

Baseline commit: 669c13cc90c399d2e0e727be721f868c6c6e2932 (build)

@sopranopillow sopranopillow merged commit d73590f into microsoft:master Aug 17, 2023
21 checks passed
@sopranopillow sopranopillow deleted the datepicker/gototoday-year branch August 17, 2023 20:09
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Aug 21, 2023
* master:
  fix(react-drawer): rename values of position prop from left/right to start/end (microsoft#28905)
  Breadcrumb design team fixes (microsoft#28883)
  applying package updates
  chore(react-search-preview): migrate to new slots API (microsoft#28862)
  docs: Updating version of CDN used and replacing usage of via.placeholder.com with SVG from CDN (microsoft#28895)
  fix(DatePicker, react-datepicker-compat): Make year picker react to go to today button (microsoft#28907)
  fix(DatePicker): readOnlyTextField styles should win over default TextField's (microsoft#28891)
  chore: fix lint warnings for @fluentui/react (microsoft#28888)
  Lint: fix fluent v9 warnings (microsoft#28889)
  doc: add drag & drop example (microsoft#28821)
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.

[Bug]: Go to today doesn't work for year picker
3 participants