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: improve Chart component #2138

Merged
merged 3 commits into from
Feb 2, 2021
Merged

fix: improve Chart component #2138

merged 3 commits into from
Feb 2, 2021

Conversation

HellWolf93
Copy link
Collaborator

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.

@commit-lint
Copy link

commit-lint bot commented Jan 29, 2021

Bug Fixes

  • improve Chart component (f939cd5)

Contributors

HellWolf93, TahimiLeonBravo, LeandroTorresSicilia

Commit-Lint commands

You can trigger Commit-Lint actions by commenting on this PR:

  • @Commit-Lint merge patch will merge dependabot PR on "patch" versions (X.X.Y - Y change)
  • @Commit-Lint merge minor will merge dependabot PR on "minor" versions (X.Y.Y - Y change)
  • @Commit-Lint merge major will merge dependabot PR on "major" versions (Y.Y.Y - Y change)
  • @Commit-Lint merge disable will desactivate merge dependabot PR
  • @Commit-Lint review will approve dependabot PR
  • @Commit-Lint stop review will stop approve dependabot PR

wrapper.setProps({
values: [4, 5, 6],
});
expect(context.updateDataset).toHaveBeenCalledWith(expect.any(String), {
Copy link

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), {
Copy link

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(
Copy link

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(
Copy link

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) {
Copy link

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.

@github-actions
Copy link

github-actions bot commented Jan 29, 2021

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 🌎

@codeclimate
Copy link

codeclimate bot commented Feb 2, 2021

Code Climate has analyzed commit 1c3469f and detected 7 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1
Duplication 6

View more on Code Climate.

@LeandroTorresSicilia LeandroTorresSicilia merged commit b3c896c into master Feb 2, 2021
@LeandroTorresSicilia LeandroTorresSicilia deleted the improve-chart branch February 2, 2021 18:41
jpetaux pushed a commit to jpetaux/react-rainbow that referenced this pull request Jun 27, 2021
fix: nexxtway#2053

Co-authored-by: Tahimi <tahimileon@gmail.com>
Co-authored-by: Jose Leandro Torres <jtorressicilia@gmail.com>
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.

fix: Chart reRenders after TextArea changeEvent occurs
3 participants