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

Refactor/component-types #212

Merged
merged 6 commits into from
May 6, 2016
Merged

Refactor/component-types #212

merged 6 commits into from
May 6, 2016

Conversation

ogupte
Copy link
Contributor

@ogupte ogupte commented Apr 30, 2016

Refactor createClass to be used for both normal and child components, and simplify the util functions for finding/filtering for child components.

PR Checklist

  • Manually tested across supported browsers
    • Chrome
    • Firefox
    • Safari
    • IE11 (Win 7)
    • Edge (Win 10)
  • Unit tests written
  • PR has one of the semver- labels
  • Two core team engineer approvals
  • One core team UX approval

@ogupte ogupte self-assigned this Apr 30, 2016
@ogupte ogupte added this to the 1.0.0 milestone Apr 30, 2016
@@ -87,8 +91,10 @@ const Expander = React.createClass(createLucidComponentDefinition({
},

componentWillReceiveProps(nextProps) {
const currentLabel = _.first(Expander.Label.findInAllAsProps(this.props)).children;
const nextLabel = _.first(Expander.Label.findInAllAsProps(nextProps)).children;
//const currentLabel = _.first(Expander.Label.findInAllAsProps(this.props)).children;
Copy link
Contributor Author

@ogupte ogupte May 2, 2016

Choose a reason for hiding this comment

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

remove commented code

childProps: {
Button: { ...Button.propTypes }
components: {
Button: createClass({
Copy link
Contributor

Choose a reason for hiding this comment

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

can you not just use a reference to the Button component here?

Copy link
Contributor

@sodiumjoe sodiumjoe May 4, 2016

Choose a reason for hiding this comment

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

er, i guess not since it has a render fn... this part seems a little weird

seems like it would be good to be able to get at least propTypes off of Button

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you're right we should reference it as is right here instead of creating a new type, but the goal of this change was a 1:1 change in how child components are defined and filtered, we should have another PR that cleans up any redundancies that we identify with child components

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

Choose a reason for hiding this comment

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

won't it be weird since Button has a render function, tho

@jondlm
Copy link
Contributor

jondlm commented May 5, 2016

I'm seeing an issue with the debounced TextField on this PR. I'm trying to locate the root cause.

- There are inherent collisions/weirdness when we pass an `onChange`
	from the reducer but the consumer is trying to manually handle
	`onChangeDebounced`.
Oliver Gupte added 2 commits May 6, 2016 13:30
Conflicts:
	src/components/CheckboxLabeled/CheckboxLabeled.jsx
	src/components/RadioButtonLabeled/RadioButtonLabeled.jsx
	src/components/RadioGroup/RadioGroup.spec.jsx
	src/components/SwitchLabeled/SwitchLabeled.jsx
	src/components/TextFieldValidated/TextFieldValidated.jsx
	src/index.js
lost in merge conflicts
@ogupte ogupte merged commit 81fbff2 into release/1.0.0 May 6, 2016
@ogupte ogupte deleted the refactor/component-types branch May 6, 2016 20:40
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