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
Refactoring the utilities to reduce monosize of components #31291
base: master
Are you sure you want to change the base?
Conversation
📊 Bundle size report✅ No changes found |
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. |
change/@fluentui-react-charting-4903549d-4b4c-4971-bfce-c488ad145a47.json
Show resolved
Hide resolved
packages/react-charting/src/components/AreaChart/__snapshots__/AreaChart.test.tsx.snap
Outdated
Show resolved
Hide resolved
packages/react-charting/src/components/CommonComponents/CartesianChart.types.ts
Outdated
Show resolved
Hide resolved
@@ -424,7 +402,6 @@ export class CartesianChartBase extends React.Component<IModifiedCartesianChartP | |||
yScale, | |||
this.props.noOfCharsToTruncate || 4, | |||
this.props.showYAxisLablesTooltip || false, | |||
this.state.startFromX, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this argument was unused
packages/react-charting/src/components/CommonComponents/CartesianChart.base.tsx
Outdated
Show resolved
Hide resolved
Can you update the PR description to represent only the changes in this PR. |
change/@fluentui-react-charting-4903549d-4b4c-4971-bfce-c488ad145a47.json
Outdated
Show resolved
Hide resolved
packages/react-charting/src/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.tsx
Outdated
Show resolved
Hide resolved
packages/react-charting/src/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.tsx
Outdated
Show resolved
Hide resolved
packages/react-charting/src/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.tsx
Outdated
Show resolved
Hide resolved
@@ -970,180 +933,6 @@ describe('domainRageOfVerticalNumeric', () => { | |||
}); | |||
}); | |||
|
|||
describe('getDomainNRangeValues', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why remove test cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the test cases for the functions which were removed as the original functions were invoked. The tests for the original functions they call are still there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you share the corresponding tests for the scenario that you have removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The functions that say 'getDomainNRangeValues' function called earlier were: domainRangeOfNumericForAreaChart
domainRangeOfVSBCNumeric
domainRageOfVerticalNumeric
domainRangeOfNumericForHorizontalBarChartWithAxis
domainRangeOfDateForAreaLineVerticalBarChart
domainRangeOfXStringAxis
All tests of these internal functions exist in the same file.
packages/react-charting/src/components/HeatMapChart/HeatMapChart.base.tsx
Outdated
Show resolved
Hide resolved
d2dc25f
to
d023c9b
Compare
packages/react-charting/src/components/AreaChart/AreaChart.base.tsx
Outdated
Show resolved
Hide resolved
Performed Full test pass on this PR https://fluentuipr.z22.web.core.windows.net/pull/31291/public-docsite/index.html#/controls. |
Refactoring the utilities to remove indirect function invocations. This reduced the monosize of each cartesian components by 4kB on an average.