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

Handle non-numeric progress values in progress bar #281

Merged
merged 2 commits into from
Feb 22, 2019

Conversation

andrewpye
Copy link
Member

Because the React Polaris components use TypeScript, their ProgressBar component handles non-numeric values quite cleanly. Our implementation unfortunately did not, so in this PR I've updated its behaviour to match the Shopify version's:

  • non-numeric progress values result in the bar being rendered without a value attribute, making it appear empty;
  • Values of +/-infinity are now clamped to 100 and 0 internally respectively.

@andrewpye andrewpye self-assigned this Feb 22, 2019
@andrewpye
Copy link
Member Author

@andrewpye andrewpye merged commit fba4304 into master Feb 22, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix/handle-non-numeric-values-in-progress-bar branch February 22, 2019 13:44
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.

None yet

2 participants