Skip to content

[fixed] Fix for #507#514

Merged
mtscout6 merged 1 commit into
react-bootstrap:masterfrom
AlexKVal:fix507
Apr 23, 2015
Merged

[fixed] Fix for #507#514
mtscout6 merged 1 commit into
react-bootstrap:masterfrom
AlexKVal:fix507

Conversation

@AlexKVal

Copy link
Copy Markdown
Member

Beginning is at #509.

Actually the fix itself begins from Add tests for fixing bug507 552de20

TravisCI would fail without merging #513.
And it would need to create additional PR for test unskipping.

With #513 this PR is green on TravisCI https://travis-ci.org/AlexKVal/react-bootstrap/builds/58300955

Comment thread src/Input.js Outdated

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.

We should not be mutating this.props. Future version of react will fail when doing this. They have plans to incorporate immutablejs with props.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Got it.
I will review and refactor this.

@AlexKVal

Copy link
Copy Markdown
Member Author

I haven't been able to find a better solution.
There is too much technical debt already in <Input /> component.
And it is already in need of split up #342.

Comment thread src/Input.js

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.

This is a great valid use case to present to the eslint folks. Have you considered submitting an issue with them so in the future we wouldn't need to do this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I've pondered about it.
The problem with that particular case is that only developer knows for sure is the var necessary or not. So it has to be explicitly marked.

@mtscout6

Copy link
Copy Markdown
Member

I agree that this change is a crutch until #342 is tackled but we already know that so this will suffice till then. Can you squash the three commits? There's no need for three commits to reflect this change.

In the case when `<Input />` type is `submit`,
bootstrap style set in `bsStyle` property
goes down to inner `<Button />` conponent.

Consequently default bootstrap styles for `<Button />`
are not suited for `<FormGroup />` component that
is the root element for `<Input />` component.

Therefore in that case we just need to prevent `bsStyle` passing on
to <FormGroup />.

Tests added and temporarily suspended test is unskipped.
@AlexKVal

Copy link
Copy Markdown
Member Author

Can you squash..

I've done three stand-alone commits because I had thought it needs to be formed like this.
No problem at all with it :)

Done.

As for creating new issue to eslint thank you for the hint 👍 :)

@dozoisch

Copy link
Copy Markdown
Member

looks good

mtscout6 added a commit that referenced this pull request Apr 23, 2015
@mtscout6
mtscout6 merged commit feb0752 into react-bootstrap:master Apr 23, 2015
@AlexKVal
AlexKVal deleted the fix507 branch May 3, 2015 20:36
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.

3 participants