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

Replace hard-coded values in DistributionsChart.tsx #2912

Closed
wants to merge 1 commit into from

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Jan 3, 2024

PR Feedback (click)

  • 👍 Sweep Did Well
  • 👎 Sweep Needs Improvement

I created this PR to address this rule:

"Avoid using magic numbers or hard-coded values in the code."

Description

This PR addresses the issue of hard-coded values in the file "packages/components/src/widgets/DistWidget/DistributionsChart.tsx". Specifically, the values for "legendOffset" and "radius" were hard-coded and have been replaced with constants. This improves the readability and maintainability of the code.

Summary of Changes

  • Added two new constants at the top of the file: LEGEND_OFFSET and RADIUS.
  • Replaced the hard-coded value of legendOffset with the new constant LEGEND_OFFSET.
  • Replaced the hard-coded value of radius with the new constant RADIUS.
  • Checked the entire file to ensure there are no references to the old hard-coded values.

Please review the changes and let me know if there are any concerns.

@sweep-ai sweep-ai bot requested review from OAGr and berekuk as code owners January 3, 2024 21:14
Copy link

vercel bot commented Jan 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
quri-hub ❌ Failed (Inspect) Jan 3, 2024 9:19pm
quri-ui ✅ Ready (Inspect) Visit Preview Jan 3, 2024 9:19pm
squiggle-components ❌ Failed (Inspect) Jan 3, 2024 9:19pm
squiggle-website ❌ Failed (Inspect) Jan 3, 2024 9:19pm

@sweep-ai sweep-ai bot assigned OAGr Jan 3, 2024
Copy link
Contributor Author

sweep-ai bot commented Jan 3, 2024

Rollback Files For Sweep

  • Rollback changes to packages/components/src/widgets/DistWidget/DistributionsChart.tsx
  • Rollback changes to packages/components/src/widgets/DistWidget/DistributionsChart.tsx

@sweep-ai sweep-ai bot added the sweep label Jan 3, 2024
Copy link
Contributor Author

sweep-ai bot commented Jan 3, 2024

Sandbox Executions

  • Running GitHub Actions for packages/components/src/widgets/DistWidget/DistributionsChart.tsx
Check packages/components/src/widgets/DistWidget/DistributionsChart.tsx with contents:

Ran GitHub Actions for afb8857b278699d0fcdf7c1dab7655c8d581c6e1:

Copy link

changeset-bot bot commented Jan 3, 2024

⚠️ No Changeset found

Latest commit: afb8857

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant