-
-
Notifications
You must be signed in to change notification settings - Fork 114
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: improve Chart component #2138
Conversation
Bug Fixes
ContributorsHellWolf93, TahimiLeonBravo, LeandroTorresSicilia Commit-Lint commandsYou can trigger Commit-Lint actions by commenting on this PR:
|
wrapper.setProps({ | ||
values: [4, 5, 6], | ||
}); | ||
expect(context.updateDataset).toHaveBeenCalledWith(expect.any(String), { |
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.
Similar blocks of code found in 2 locations. Consider refactoring.
type="line" | ||
/>, | ||
); | ||
expect(context.registerDataset).toHaveBeenCalledWith(expect.any(String), { |
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.
Similar blocks of code found in 2 locations. Consider refactoring.
}); | ||
|
||
it('should call updateDataset when props changes', () => { | ||
const wrapper = mount( |
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.
Identical blocks of code found in 2 locations. Consider refactoring.
}); | ||
|
||
it('should call unregisterDataset when unmounted', () => { | ||
const wrapper = mount( |
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.
Identical blocks of code found in 2 locations. Consider refactoring.
|
||
/** @category DataView */ | ||
export default function Dataset() { | ||
return <div />; | ||
export default function Dataset(props) { |
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.
Function Dataset
has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Visit the preview URL for this PR (updated for commit 1c3469f): https://react-rainbow--pr2138-improve-chart-z9185fpo.web.app (expires Tue, 09 Feb 2021 18:36:01 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
Code Climate has analyzed commit 1c3469f and detected 7 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
fix: nexxtway#2053 Co-authored-by: Tahimi <tahimileon@gmail.com> Co-authored-by: Jose Leandro Torres <jtorressicilia@gmail.com>
fix: #2053
Changes proposed in this PR:
Improve Chart component. Now it does nor re-renders the chart on each update, instead plays a smooth animation, as implemented in Chart.js
I have followed (at least) the PR section of the contributing guide.