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

added new sizes to ActivityIndicator #8640

Closed
wants to merge 1 commit into from

Conversation

PierBover
Copy link

@PierBover PierBover commented Jul 7, 2016

Motivation
The docs on ActivityIndicator say that:

Size of the indicator. Small has a height of 20, large has a height of 36. Other sizes can be obtained using a scale transform.

But when using scale transform the pixels are blown out in iOS (haven't tested on Android).

For example when using this:

<ActivityIndicator style={{transform: [{scale: 2}]}} size="large" />

This is the zoomed result where you can clearly see the aliasing on the spinner is the result of an interpolation compared to the pixels of the text.

image

Solution
To remedy this, I've created two new sizes medium and extralarge so that these new sizes can be used without having to resort to using transform: [{scale: 2}] which I presume is causing the interpolation problem.

Added medium and extralarge
@ghost
Copy link

ghost commented Jul 7, 2016

By analyzing the blame information on this pull request, we identified @janicduplessis and @davidaurelio to be potential reviewers.

@ghost ghost added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Jul 7, 2016
@@ -41,7 +41,9 @@ var ActivityIndicatorIOS = React.createClass({
*/
size: PropTypes.oneOf([
'small',
'medium',
Copy link
Contributor

Choose a reason for hiding this comment

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

This is needed I think since this component is deprecated?

@janicduplessis
Copy link
Contributor

What about instead of adding more predefined sizes we allow passing an arbitrary number to size?

@PierBover
Copy link
Author

@janicduplessis since this is my first contribution I didn't want to mess around with the code too much.

I will look into this again when I have some time.

@ghost ghost added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 16, 2016
@janicduplessis
Copy link
Contributor

#8935 added custom sizes so we can close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants