-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Fixing re-render issue for all charts when empty #28321
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
Merged
AtishayMsft
merged 45 commits into
microsoft:master
from
srmukher:users/srmukher/ReRenderFix
Aug 1, 2023
Merged
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
ac46b1e
Fixing re-render issue for area chart
srmukher 5c4fdfa
Area chart re-render fix
srmukher bf3c9b9
Fixing re-rendering for GVBC, HBC, Donut and HeatMap
srmukher f06dca4
Fixing the re-render issue for other charts
srmukher f0889a7
Change file
srmukher 05fb1b9
Merge branch 'master' of https://github.com/srmukher/fluentui into us…
srmukher 81f9338
Updating snapshots
srmukher 8dc2069
Resolving build error
srmukher 4847827
Updating the charts to reduce re-renders
srmukher 09867c5
Fixing build errors
srmukher 5c09505
Merge branch 'master' of https://github.com/srmukher/fluentui into us…
srmukher 9f99a39
Merging master and updating snapshots
srmukher 84a74b8
Updating snapshots
srmukher 8953795
Merge branch 'master' of https://github.com/srmukher/fluentui into us…
srmukher 14d5684
Update test
srmukher 930e581
Fixing build and test errors
srmukher b5b58be
Fixing build and test errors
srmukher 777ea8c
Merge branch 'master' into users/srmukher/ReRenderFix
srmukher 1f8251f
Merge branch 'master' of https://github.com/microsoft/fluentui into u…
srmukher c0382ac
Fixing build errors
srmukher 481bc2d
Merge branch 'master' into users/srmukher/ReRenderFix
srmukher dc2f2df
Fixing test error
srmukher fa9b91e
Removing the test causing error
srmukher 10b9ea2
Resolving sankey chart test error
srmukher 9a1c9f3
Fixing Sankey chart test failures
srmukher 807de57
Fixing errors in line chart tests
srmukher 489ee0b
Merge branch 'master' of https://github.com/microsoft/fluentui into u…
srmukher 08164c7
Fixing errors
srmukher 9eaf5c9
Fixing test errors
srmukher 0f33129
Removing 2 tests
srmukher 654062f
Resolving donut test issue
srmukher 642c2d0
Removing tests using act in donut chart
srmukher 4dc7b02
Resetting ids for donut test fix
srmukher ef7f9e4
Deleting tests causing test errors in PR build
srmukher 1afb7d1
Merge branch 'master' into users/srmukher/ReRenderFix
srmukher a348021
Updating the charts for empty scenario
srmukher 5795deb
Removing tests that are failing the tests
srmukher 12143de
Merge branch 'master' of https://github.com/microsoft/fluentui into u…
srmukher 06100dc
Resolving PR comments
srmukher 2989a83
Merge branch 'master' into users/srmukher/ReRenderFix
srmukher b92f0c7
Heatmap test update
srmukher c0bee00
Merge branch 'master' into users/srmukher/ReRenderFix
srmukher 19e1aaf
Sparkline test update
srmukher 759b5da
Merge branch 'users/srmukher/ReRenderFix' of https://github.com/srmuk…
srmukher 10e675e
Merge branch 'master' into users/srmukher/ReRenderFix
srmukher File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-charting-556f2e0e-35f0-44cd-9bd6-aa9b24aaa57e.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "patch", | ||
| "comment": "Fixing re-render issue for all charts when empty", | ||
| "packageName": "@fluentui/react-charting", | ||
| "email": "[email protected]", | ||
| "dependentChangeType": "patch" | ||
| } | ||
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
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
22 changes: 22 additions & 0 deletions
22
packages/react-charting/src/components/AreaChart/AreaChartRTL.test.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import * as React from 'react'; | ||
| import { queryAllByAttribute, render, waitFor } from '@testing-library/react'; | ||
| import { chartPoints, emptyChartPoints } from './AreaChart.test'; | ||
| import { AreaChart } from './index'; | ||
|
|
||
| describe('Area chart rendering', () => { | ||
| test('Should re-render the Area chart with data', async () => { | ||
| // Arrange | ||
| const { container, rerender } = render(<AreaChart data={emptyChartPoints} />); | ||
| const getById = queryAllByAttribute.bind(null, 'id'); | ||
| // Assert | ||
| expect(container).toMatchSnapshot(); | ||
| expect(getById(container, /_AreaChart_empty/i)).toHaveLength(1); | ||
| // Act | ||
| rerender(<AreaChart data={chartPoints} />); | ||
| await waitFor(() => { | ||
| // Assert | ||
| expect(container).toMatchSnapshot(); | ||
| expect(getById(container, /_AreaChart_empty/i)).toHaveLength(0); | ||
| }); | ||
| }); | ||
| }); |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.