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

Support custom locale in date axis #24753

Merged
merged 12 commits into from
Sep 14, 2022
Merged

Conversation

AtishayMsft
Copy link
Contributor

@AtishayMsft AtishayMsft commented Sep 12, 2022

Current Behavior

New Behavior

Added support for custom locale in date axis. The date axis will use the date range and the multiformat specified in the definition to determine the correct labels to show in the ticks.
The consumer of the library can specify a custom locale definition as supported by d3 https://github.com/d3/d3-time-format/blob/main/locale/en-US.json

Related Issue(s)

Fixes #

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 12, 2022

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 35940bc:

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

@size-auditor
Copy link

size-auditor bot commented Sep 12, 2022

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: a40ef34fa6d1122bdfdb708f79b90de9edb2827d (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Sep 12, 2022

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1315 1324 5000
Button mount 960 953 5000
FluentProvider mount 1587 1565 5000
FluentProviderWithTheme mount 631 626 10
FluentProviderWithTheme virtual-rerender 587 592 10
FluentProviderWithTheme virtual-rerender-with-unmount 632 625 10
MakeStyles mount 1904 1921 50000
SpinButton mount 2548 2514 5000

@fabricteam
Copy link
Collaborator

fabricteam commented Sep 12, 2022

📊 Bundle size report

Unchanged fixtures
Package & Exports Size (minified/GZIP)
global-context
createContext
533 B
341 B
global-context
createContextSelector
554 B
348 B
priority-overflow
createOverflowManager
2.936 kB
1.212 kB
react-accordion
Accordion (including children components)
78.914 kB
24.06 kB
react-alert
Alert
83.511 kB
20.921 kB
react-avatar
Avatar
48.381 kB
13.696 kB
react-avatar
AvatarGroup
14.95 kB
5.989 kB
react-avatar
AvatarGroupItem
68.349 kB
19.039 kB
react-badge
Badge
22.6 kB
7.205 kB
react-badge
CounterBadge
23.503 kB
7.497 kB
react-badge
PresenceBadge
24.05 kB
7.067 kB
react-button
Button
36.119 kB
9.647 kB
react-button
CompoundButton
43.144 kB
10.86 kB
react-button
MenuButton
38.737 kB
10.521 kB
react-button
SplitButton
46.136 kB
11.9 kB
react-button
ToggleButton
51.888 kB
11.127 kB
react-card
Card - All
67.002 kB
19.261 kB
react-card
Card
62.684 kB
18.177 kB
react-card
CardFooter
8.561 kB
3.601 kB
react-card
CardHeader
9.604 kB
3.94 kB
react-card
CardPreview
8.662 kB
3.656 kB
react-combobox
Combobox (including child components)
74.636 kB
24.186 kB
react-combobox
Dropdown (including child components)
74.236 kB
24.086 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
187.939 kB
52.05 kB
react-components
react-components: FluentProvider & webLightTheme
33.359 kB
11.004 kB
react-dialog
Dialog (including children components)
80.608 kB
24.053 kB
react-divider
Divider
16.459 kB
5.902 kB
react-image
Image
10.78 kB
4.264 kB
react-input
Input
23.598 kB
7.661 kB
react-label
Label
9.338 kB
3.86 kB
react-link
Link
11.784 kB
4.867 kB
react-menu
Menu (including children components)
115.735 kB
35.419 kB
react-menu
Menu (including selectable components)
118.934 kB
35.916 kB
react-overflow
hooks only
10.685 kB
4.104 kB
react-popover
Popover
102.938 kB
31.542 kB
react-portal
Portal
10.576 kB
3.875 kB
react-portal-compat
PortalCompatProvider
5.851 kB
1.964 kB
react-positioning
usePositioning
19.7 kB
7.404 kB
react-provider
FluentProvider
15.755 kB
5.883 kB
react-radio
Radio
35.56 kB
11.929 kB
react-radio
RadioGroup
14.248 kB
5.7 kB
react-select
Select
20.846 kB
7.346 kB
react-slider
Slider
31.526 kB
10.046 kB
react-spinbutton
SpinButton
43.943 kB
12.382 kB
react-spinner
Spinner
19.977 kB
6.438 kB
react-switch
Switch
32.097 kB
10.27 kB
react-text
Text - Default
11.782 kB
4.605 kB
react-text
Text - Wrappers
15.092 kB
5.044 kB
react-textarea
Textarea
23.988 kB
8.011 kB
react-theme
Single theme token import
69 B
89 B
react-theme
Teams: all themes
29.548 kB
6.434 kB
react-theme
Teams: Light theme
17.452 kB
5.054 kB
react-tooltip
Tooltip
41.502 kB
14.623 kB
react-utilities
SSRProvider
180 B
159 B
🤖 This report was generated against a40ef34fa6d1122bdfdb708f79b90de9edb2827d

@fabricteam
Copy link
Collaborator

fabricteam commented Sep 12, 2022

Perf Analysis (@fluentui/react-northstar)

⚠️ 1 potential perf regressions detected

Potential regressions comparing to master

Scenario Current PR Ticks Baseline Ticks Ratio Regression Analysis
MenuButtonMinimalPerf.default 1391 1404 0.99:1 analysis
Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
ButtonMinimalPerf.default 137 122 1.12:1
TreeWith60ListItems.default 136 126 1.08:1
AccordionMinimalPerf.default 120 112 1.07:1
RefMinimalPerf.default 188 176 1.07:1
GridMinimalPerf.default 280 267 1.05:1
ListWith60ListItems.default 519 492 1.05:1
ButtonSlotsPerf.default 465 448 1.04:1
ChatDuplicateMessagesPerf.default 243 234 1.04:1
FormMinimalPerf.default 303 295 1.03:1
InputMinimalPerf.default 969 939 1.03:1
LabelMinimalPerf.default 319 310 1.03:1
AttachmentMinimalPerf.default 119 117 1.02:1
AvatarMinimalPerf.default 154 151 1.02:1
ChatMinimalPerf.default 593 580 1.02:1
DividerMinimalPerf.default 288 283 1.02:1
HeaderMinimalPerf.default 295 289 1.02:1
ImageMinimalPerf.default 323 318 1.02:1
ListCommonPerf.default 501 491 1.02:1
ListMinimalPerf.default 424 416 1.02:1
ListNestedPerf.default 455 445 1.02:1
LoaderMinimalPerf.default 553 542 1.02:1
TableMinimalPerf.default 327 321 1.02:1
TextMinimalPerf.default 283 277 1.02:1
VideoMinimalPerf.default 600 589 1.02:1
BoxMinimalPerf.default 282 278 1.01:1
ButtonOverridesMissPerf.default 1092 1082 1.01:1
ChatWithPopoverPerf.default 310 307 1.01:1
CheckboxMinimalPerf.default 1735 1718 1.01:1
DatepickerMinimalPerf.default 4748 4721 1.01:1
DropdownMinimalPerf.default 2232 2217 1.01:1
FlexMinimalPerf.default 230 227 1.01:1
PortalMinimalPerf.default 139 138 1.01:1
SliderMinimalPerf.default 1324 1317 1.01:1
ToolbarMinimalPerf.default 764 753 1.01:1
TreeMinimalPerf.default 655 651 1.01:1
CardMinimalPerf.default 430 430 1:1
CarouselMinimalPerf.default 369 369 1:1
DialogMinimalPerf.default 637 638 1:1
EmbedMinimalPerf.default 3040 3044 1:1
HeaderSlotsPerf.default 620 618 1:1
ItemLayoutMinimalPerf.default 976 977 1:1
LayoutMinimalPerf.default 285 284 1:1
RosterPerf.default 1757 1761 1:1
PopupMinimalPerf.default 522 522 1:1
TableManyItemsPerf.default 1547 1542 1:1
CustomToolbarPrototype.default 2241 2239 1:1
TooltipMinimalPerf.default 1968 1971 1:1
AlertMinimalPerf.default 216 218 0.99:1
MenuMinimalPerf.default 693 701 0.99:1
ProviderMergeThemesPerf.default 1052 1062 0.99:1
ProviderMinimalPerf.default 328 330 0.99:1
SkeletonMinimalPerf.default 274 276 0.99:1
SplitButtonMinimalPerf.default 3642 3677 0.99:1
StatusMinimalPerf.default 556 559 0.99:1
AnimationMinimalPerf.default 431 441 0.98:1
DropdownManyItemsPerf.default 527 540 0.98:1
RadioGroupMinimalPerf.default 358 366 0.98:1
ReactionMinimalPerf.default 302 309 0.98:1
AttachmentSlotsPerf.default 898 930 0.97:1
SegmentMinimalPerf.default 277 287 0.97:1
IconMinimalPerf.default 539 557 0.97:1
TextAreaMinimalPerf.default 377 392 0.96:1

@fabricteam
Copy link
Collaborator

fabricteam commented Sep 12, 2022

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
BaseButton mount 764 783 5000
Breadcrumb mount 2477 2459 1000
Checkbox mount 2246 2215 5000
CheckboxBase mount 1942 1961 5000
ChoiceGroup mount 3993 3982 5000
ComboBox mount 829 843 1000
CommandBar mount 9143 9162 1000
ContextualMenu mount 10379 10637 1000
DefaultButton mount 968 964 5000
DetailsRow mount 3214 3211 5000
DetailsRowFast mount 3163 3221 5000
DetailsRowNoStyles mount 3068 3060 5000
Dialog mount 2690 2691 1000
DocumentCardTitle mount 157 142 1000
Dropdown mount 2829 2844 5000
FocusTrapZone mount 1631 1594 5000
FocusZone mount 1559 1536 5000
IconButton mount 1484 1497 5000
Label mount 294 308 5000
Layer mount 3900 3841 5000
Link mount 405 412 5000
MenuButton mount 1234 1252 5000
MessageBar mount 1914 1903 5000
Nav mount 2841 2881 1000
OverflowSet mount 946 947 5000
Panel mount 2111 2149 1000
Persona mount 836 872 1000
Pivot mount 1224 1221 1000
PrimaryButton mount 1104 1100 5000
Rating mount 6701 6621 5000
SearchBox mount 1095 1111 5000
Shimmer mount 2456 2471 5000
Slider mount 1685 1715 5000
SpinButton mount 4263 4273 5000
Spinner mount 382 373 5000
SplitButton mount 2713 2695 5000
Stack mount 426 442 5000
StackWithIntrinsicChildren mount 1931 1918 5000
StackWithTextChildren mount 4422 4404 5000
SwatchColorPicker mount 10054 10182 5000
TagPicker mount 2224 2245 5000
TeachingBubble mount 86971 86649 5000
Text mount 361 354 5000
TextField mount 1184 1170 5000
ThemeProvider mount 1112 1100 5000
ThemeProvider virtual-rerender 661 643 5000
ThemeProvider virtual-rerender-with-unmount 1731 1726 5000
Toggle mount 683 697 5000
buttonNative mount 103 113 5000

@AtishayMsft AtishayMsft changed the title Usr/atisjai/custom locale2 Support custom locale in time axis Sep 13, 2022
@AtishayMsft AtishayMsft changed the title Support custom locale in time axis Support custom locale in date axis Sep 13, 2022
@AtishayMsft AtishayMsft marked this pull request as ready for review September 13, 2022 10:17
@AtishayMsft AtishayMsft requested review from a team as code owners September 13, 2022 10:17
Copy link
Contributor

@Hotell Hotell left a comment

Choose a reason for hiding this comment

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

approving for build team owned files

@AtishayMsft AtishayMsft merged commit ca89bb0 into master Sep 14, 2022
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Sep 14, 2022
* master: (28 commits)
  Fix value font-weight inside heatmap chart (microsoft#24726)
  Fix legend overflow-indication-text role (microsoft#24756)
  Support custom locale in date axis  (microsoft#24753)
  Cleanup env variables (microsoft#24739)
  ci(github): add GH Action to add issue labels based on new GH issue template (microsoft#24788)
  Update disallowedChangeTypes for newly created packages, to allow only 'prerelease' change types by default (microsoft#24763)
  feat(react-components): Adding missing AvatarGroup exports (microsoft#24770)
  remove unnecessary nohoist (microsoft#24760)
  feat(react-dialog): supports 1st rule of ARIA (microsoft#24525)
  BREAKING: TableCell layouts are handled by layout components (microsoft#24762)
  feat: Implement table cell layout components (microsoft#24773)
  applying package updates
  fix: remove readonly from DetailsList (microsoft#24615)
  chore: Cleaning up tokens in Button components so they better adhere to the design spec (microsoft#24732)
  fix: react-combobox listbox popup width matches trigger width (microsoft#24733)
  fix: react-combobox Option focus outline only shows with keyboard nav (microsoft#24700)
  feat: Publish react-field package, and export from react-components/unstable (microsoft#24235)
  fix: Replacing bottom border styles with text decoration underline in Link (microsoft#24734)
  docs(react-theme): Update readme (microsoft#24755)
  Add tests for hover states (microsoft#24390)
  ...
@khmakoto khmakoto deleted the usr/atisjai/customLocale2 branch April 5, 2023 23:54
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.

4 participants