Skip to content

Conversation

@wzhudev
Copy link

@wzhudev wzhudev commented Aug 6, 2019

@afc163 I think we should release a new version? I should update the main package as well.

fix ant-design/ant-design#18113

Quick preview:

Screen Shot 2019-08-14 at 11 02 03

@wzhudev
Copy link
Author

wzhudev commented Aug 6, 2019

@zombieJ Please read this issue ant-design/ant-design#18113 (comment). How to treat progress which has successPercent? Should the path for success percent be gradient of just green?

@zombieJ
Copy link
Member

zombieJ commented Aug 8, 2019

Current is green. But I think this can be discuss.

@wzhudev
Copy link
Author

wzhudev commented Aug 8, 2019

Current is green. But I think this can be discuss.

In my opinion we should keep it green.

Due to how the gradient is implemented now, all paths would have the same stroke color and paths on the top would be completely invisible.

@codecov
Copy link

codecov bot commented Aug 12, 2019

Codecov Report

Merging #76 into master will increase coverage by 0.19%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
+ Coverage   98.14%   98.34%   +0.19%     
==========================================
  Files           5        5              
  Lines         108      121      +13     
  Branches       24       24              
==========================================
+ Hits          106      119      +13     
  Misses          2        2
Impacted Files Coverage Δ
src/types.js 100% <ø> (ø) ⬆️
src/Circle.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update acdae83...9a34d82. Read the comment docs.

@wzhudev
Copy link
Author

wzhudev commented Aug 12, 2019

@zombieJ Ping.

@wzhudev
Copy link
Author

wzhudev commented Aug 14, 2019

I need some help with PropTypes.

PropTypes.arrayOf(PropTypes.any) // loose

// in TypeScript
export type Color = Array<string | Object>

How can I write an equivalent using PropTypes?

I tried:

 PropTypes.arrayOf(PropTypes.oneOf([PropTypes.string, PropTypes.object])),

but no luck.

@zombieJ
Copy link
Member

zombieJ commented Aug 14, 2019

PropTypes.arrayOf(
  PropTypes.oneOfType([
    PropTypes.string,
    PropTypes.object,
  ])
)

@wzhudev
Copy link
Author

wzhudev commented Aug 14, 2019

PropTypes.arrayOf(
  PropTypes.oneOfType([
    PropTypes.string,
    PropTypes. object,
  ])
)

Oh I see...

@zombieJ
Copy link
Member

zombieJ commented Aug 14, 2019

Hmmm...
Origin test case dose not test anything on gradient:
https://github.com/react-component/progress/blob/master/tests/index.spec.js#L82

Could you help to update this. Render with 2 gradient chart and check id should be different.

@wzhudev
Copy link
Author

wzhudev commented Aug 14, 2019

Ok. Will do.

@wzhudev
Copy link
Author

wzhudev commented Aug 14, 2019

As a matter of fact, all tests only have an expectation:

expect(circle.state.percent).toBe('30');

@zombieJ
Copy link
Member

zombieJ commented Aug 14, 2019

Yes. That's not cool.

@wzhudev
Copy link
Author

wzhudev commented Aug 14, 2019

I only added tests about gradient. Maybe we could enhance tests in another pr.

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.

progress gradient color settings

2 participants