create progress bar component #560
Labels
No labels
android: closed alpha
android: open beta
app-parity
area: devops
area: discovery
area: docs
area: livestream
area: proposal
consider soon
creator
Epic
good first issue
hacktoberfest
help wanted
icebox
Invalid
level: 1
level: 2
level: 3
level: 4
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
on hold
priority: blocker
priority: high
priority: low
priority: medium
product review
resilience
Tom's Wishlist
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbry-android#560
Loading…
Reference in a new issue
No description provided.
Delete branch "progress-bar"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replaces use of the platform-dependent
ProgressBarAndroid
component.Basically looks good. Out of curiosity, what was wrong with
ProgressBarAndroid
from ReactNative?@ -0,0 +16,4 @@
progress: function(props, propName, componentName) {
const value = parseInt(props[propName], 10);
if (isNaN(value) || props[propName] < minProgress || props[propName] > maxProgress) {
return new Error('progress should be between 0 and 100');
Should this return an error or throw one?
@ -74,4 +74,1 @@
height: 3,
flex: 1,
flexDirection: 'row'
},
Outside of this PR, but if 720 is a special value that appears in multiple places it should be a constant.
@ -0,0 +16,4 @@
progress: function(props, propName, componentName) {
const value = parseInt(props[propName], 10);
if (isNaN(value) || props[propName] < minProgress || props[propName] > maxProgress) {
return new Error('progress should be between 0 and 100');
According to https://reactjs.org/docs/typechecking-with-proptypes.html, return.
It is Android specific, so it wouldn't work on iOS. I'd have to use the
ProgressViewIOS
too, which would require adding additional platform checks in the code. Made sense to just use a single component without having to perform these checks.