Skip to content

refactor(components): Use ...props for destructing/spread'ing props - #305

Merged
priley86 merged 2 commits into
patternfly:masterfrom
chalettu:use-props-consistently
Apr 16, 2018
Merged

priley86 merged 2 commits into
patternfly:masterfrom
chalettu:use-props-consistently

Conversation

@chalettu

Copy link
Copy Markdown
Contributor

Updated how destructuring and spreading assigments work by making the variable name consistent. Updated code consistency documentation to reflect change

fix #229

Updated how destructuring and spreading assigments work by making the variable name consistent.

fix patternfly#229
@coveralls

coveralls commented Apr 13, 2018 •

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 1182

  • 37 of 38 (97.37%) changed or added relevant lines in 31 files are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.01%) to 73.976%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/components/ListView/ListViewInfoItem.js 1 2 50.0%
Files with Coverage Reduction New Missed Lines %
src/components/Filter/FilterItem.js 1 83.33%
src/components/Sort/SortTypeSelector.js 2 59.38%
Totals Coverage Status
Change from base Build 1164: 0.01%
Covered Lines: 1446
Relevant Lines: 1783

💛 - Coveralls

import PropTypes from 'prop-types';

const FilterActiveLabel = ({ children, className, ...rest }) => {
const FilterActiveLabel = ({ children, className, ...props }) => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks like this one can be removed or applied to the p tag... either should be fine.

@priley86 priley86 Apr 13, 2018 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i prefer to spread props on the p tag though ;)

@chalettu
chalettu force-pushed the use-props-consistently branch from f0417f7 to 6b82adb Compare April 16, 2018 16:21
@priley86

Copy link
Copy Markdown
Member

good to go... merging...

@priley86
priley86 merged commit a44b0db into patternfly:master Apr 16, 2018
@chalettu
chalettu deleted the use-props-consistently branch April 23, 2018 16:38
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.

Consistency - Use ...props for destructing/spread'ing props

4 participants