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

style(Feed): update typings and propTypes usage #1285

Merged
merged 1 commit into from
Feb 11, 2017
Merged

Conversation

layershifter
Copy link
Member

This PR is part of work for removing propTypes in production bundle (#524, #731).
Also, cleanups and updates typings for #1072.

@codecov-io
Copy link

codecov-io commented Feb 5, 2017

Codecov Report

Merging #1285 into master will increase coverage by <.01%.

@@            Coverage Diff             @@
##           master    #1285      +/-   ##
==========================================
+ Coverage   95.91%   95.92%   +<.01%     
==========================================
  Files         883      883              
  Lines        4926     4928       +2     
==========================================
+ Hits         4725     4727       +2     
  Misses        201      201
Impacted Files Coverage Δ
src/views/Feed/FeedContent.js 100% <100%> (ø)
src/views/Feed/FeedSummary.js 100% <100%> (ø)
src/views/Feed/Feed.js 100% <100%> (ø)
src/views/Feed/FeedLabel.js 100% <100%> (ø)
src/views/Feed/FeedExtra.js 100% <100%> (ø)
src/views/Feed/FeedMeta.js 100% <100%> (ø)
src/views/Feed/FeedUser.js 100% <100%> (ø)
src/views/Feed/FeedEvent.js 100% <100%> (ø)
src/views/Feed/FeedDate.js 100% <100%> (ø)
src/views/Feed/FeedLike.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 ced73f2...ac6d573. Read the comment docs.


/** An event can contain additional information like a set of images. */
images?: any;
images?: boolean | Array<any>;
Copy link
Member

Choose a reason for hiding this comment

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

Should this be array of React.ReactNode?

Copy link
Member Author

Choose a reason for hiding this comment

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

We set React.ReactNode when we deal with contentShorthand, but in this case we have:

PropTypes.oneOfType([
  PropTypes.bool,
  customPropTypes.collectionShorthand,
]),

Which represents array of itemShorthand, we mark it as any for now.

I want to add new TS types for customPropTypes in future.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

@levithomason levithomason left a comment

Choose a reason for hiding this comment

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

Just one comment regarding the image shorthand array type.

@levithomason
Copy link
Member

Looks great, we'll follow up on types for customPropTypes in #1289 .

@levithomason levithomason merged commit 060e81d into master Feb 11, 2017
@levithomason levithomason deleted the style/feed branch February 11, 2017 06:19
@levithomason
Copy link
Member

Released in [email protected].

harel pushed a commit to harel/Semantic-UI-React that referenced this pull request Feb 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants