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

fix(text-field): add missing prop style #184

Merged

Conversation

simsim0709
Copy link
Contributor

TextField component is not passing otherProps, because of that we cannot use style prop.
It seems like it's your intention not passing otherProps to the root element, so I have explicitly added style prop.

TextField component is not passing `otherProps`, because of that we cannot use style prop.
It seems like it's your intention not passing `otherProps` to the root element, so I have explicitly added `style` prop.
@moog16
Copy link

moog16 commented Jul 30, 2018

Hmmm is the correct thing to do to actually pass ...otherProps? I think it is. It is just the wrapper component, but are there other events that this component should handle as well?

Also if we decide to just keep style on here, we will need tests.

@simsim0709
Copy link
Contributor Author

I understand your concern, but it seems like a bit weird in that I can add className prop to root div element, but not style prop. Both className and style props are to change style.

@moog16
Copy link

moog16 commented Jul 31, 2018

Oh no I am agreeing with you. But I'm saying someone should be able to pass whatever they want including style. It could be a tabIndex or aria-foo. If so we should make your change to {...otherProps}. What do you think?

@simsim0709
Copy link
Contributor Author

Yeah, I like that. Actually, it's better. 👍

@moog16
Copy link

moog16 commented Jul 31, 2018

Cool! Would you mind doing the changes? Also adding a test case for the style object being passed?

@simsim0709
Copy link
Contributor Author

Yep. I will try! 😄

@moog16
Copy link

moog16 commented Jul 31, 2018

Thanks :) We appreciate the help!

@codecov-io
Copy link

codecov-io commented Jul 31, 2018

Codecov Report

Merging #184 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #184      +/-   ##
==========================================
+ Coverage   98.78%   98.78%   +<.01%     
==========================================
  Files          21       21              
  Lines         821      824       +3     
  Branches       76       76              
==========================================
+ Hits          811      814       +3     
  Misses         10       10
Impacted Files Coverage Δ
packages/text-field/index.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 cd7192d...5c5ffd1. Read the comment docs.

@simsim0709
Copy link
Contributor Author

I just added otherProps support.
Regarding test case you mentioned "the style object being passed", is this test case is needed?
I don't think it is because it just passes rest props to div element.

@moog16
Copy link

moog16 commented Jul 31, 2018

I understand what you're saying but if we have one for classNames we should also have one for styles. In case someone wants to refactors the implementation, we'll know that styles needs to be included.

@simsim0709
Copy link
Contributor Author

It makes sense. I will add the test! 😄

@moog16
Copy link

moog16 commented Aug 1, 2018

Thanks!

@simsim0709
Copy link
Contributor Author

I just added the test case. I think it's enough to check if style attribute exists at the root element.

Please check this out! 😄

@moog16
Copy link

moog16 commented Aug 3, 2018

@simsim0709 sorry I dropped the ball on this one. Looking now

@moog16
Copy link

moog16 commented Aug 3, 2018

Running tests on #184

@moog16
Copy link

moog16 commented Aug 3, 2018

@simsim0709 can you also sign it for the CLA please

Copy link

@moog16 moog16 left a comment

Choose a reason for hiding this comment

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

@simsim0709 I thik you might need to add isRtl to the props blacklist. Getting a warning in the screenshot tests. See image:

screenshot from 2018-08-03 15-25-48

@simsim0709
Copy link
Contributor Author

@moog16 . I just added isRtl prop to be ignored.
Regarding CLA, I already did sign up, though. (material-components/material-components-web#796). Should I do once again?

Thanks.

@moog16
Copy link

moog16 commented Aug 7, 2018

@simsim0709 you have to sign each PR you submit. Thanks!

Copy link

@moog16 moog16 left a comment

Choose a reason for hiding this comment

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

looks good - we can merge this once the Test's PR #204 test's pass and @simsim0709 signs this PR

@simsim0709
Copy link
Contributor Author

Hmm, @moog16
I'm not sure, what "CLAs are signed, but unable to verify author consent" means and how to handle this.

Can you give me an instruction?

Thanks.

@moog16
Copy link

moog16 commented Aug 8, 2018

@simsim0709 I'm not sure what you're referring to, but it looks like that cla/google check has passed. We are good to go.

@moog16
Copy link

moog16 commented Aug 8, 2018

#204's tests are passing - merging!

@moog16 moog16 merged commit ff9704d into material-components:master Aug 8, 2018
@simsim0709
Copy link
Contributor Author

Then, no problem. I saw CI warning yesterday.

Have a good day! 👍

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