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: Update the dots container dynamically when dimensions change #17

Merged
merged 13 commits into from
Jan 4, 2024

Conversation

anjuca154
Copy link
Contributor

Pull Request Checklist

  • Read the contributing guidelines.
  • Linked to an issue: Fixes # (replace with the issue number, if applicable)
  • Branch is up-to-date with the base branch: main
  • Changes pass tests locally: npm test or yarn test
  • Documentation has been updated, if necessary
  • Code follows the style guide of the project

Description

Update the dots container dynamically when dimensions change

Screenshots (if applicable)

Additional Notes

Related Issues or PRs

Reviewer Guidelines

Testing Instructions

Checklist for Reviewers

  • Code follows project conventions and style
  • Changes do not introduce new warnings or errors
  • Unit tests cover the changes
  • Documentation is updated

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT License.

anjuca154 and others added 9 commits November 22, 2023 14:44
* Renamed few functions and variables

* Updated storybook readme and test files

* Updated the codesandbox link and email

* Formatted the files and readme changes

* Added pull request template and style guidelines

* Added version and prettier config in package.json

* Fixed bug in the initial width calculation
@@ -5,14 +5,10 @@ import { findContainerWidth } from "../utils/utils";

const useChartContainerWidth = (
id: string,
dependencyArray: Array<boolean | string>
dependencyArray: Array<boolean | string | number | undefined>

Choose a reason for hiding this comment

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

Is undefined expected as an array element ?

if (isDecimal(currentDots[i])) {
let remainingDecimal =
1 - (currentDots[i] - Math.floor(currentDots[i]));

Choose a reason for hiding this comment

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

Math.floor(currentDots[i]) this is done in multiple places. Can we assign it to a variable and reuse ?

@bilta-keyvalue bilta-keyvalue merged commit e9624d5 into main Jan 4, 2024
1 check passed
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