refactor checkbox with label#7750
refactor checkbox with label#7750tgolen merged 12 commits intoExpensify:mainfrom thesahindia:thesahindia/refactor-checkbox-with-label
Conversation
|
Still having issues with desktop app. Will try again after sometime. |
|
@thesahindia to test on desktop, merge And temporarily create a |
|
@rushatgabhane, tried both but still it's not showing anything. |
|
@thesahindia i can't toggle the checkbox. Maybe it's because of regression in |
|
@rushatgabhane, hadn't implemented that because of getting error while testing due to the regression. It should work now. |
Nope, it doesn't work. I'm unable to toggle checkbox in storybook. |
Yeah I think it might be due to the regression as I had tested and it was working fine. |
tgolen
left a comment
There was a problem hiding this comment.
Looks like this is still needing desktop testing.
|
@thesahindia please merge |
@rushatgabhane, sure and sorry for the delay. I was waiting to get clarification about adding translation but didn't see it was resolved (don't know why I didn't get a notification for it 🤷♂️) |
…factor-checkbox-with-label merge main
|
Commenting since I can't edit the PR PR Reviewer Checklist
|
tgolen
left a comment
There was a problem hiding this comment.
Just noticed this one last thing before merging.
| @@ -13,27 +13,35 @@ const propTypes = { | |||
| onPress: PropTypes.func.isRequired, | |||
|
|
|||
| /** Should the input be styled for errors */ | |||
There was a problem hiding this comment.
Looks like this comment is out-of-date
There was a problem hiding this comment.
Earlier we were applying the error styles when hasError was true, now we are just checking if errorText is present, so the functionality hasn't change and I think we can keep this comment.
There was a problem hiding this comment.
@thesahindia "Should the input be styled for errors" gives the impression that it's a boolean.
And we're displaying whatever error is passed.
| /** Should the input be styled for errors */ | |
| /** Error text to display */ |
There was a problem hiding this comment.
@rushatgabhane, Yes makes sense, but now I think a better way would be to keep it as hasError since we are only going to use it as boolean and I will pass it like this -
<Checkbox
hasError={!!props.errorText}the errorText that we get in CheckboxWithLabel is to show the error message and for checkbox component we only need a boolean value
There was a problem hiding this comment.
@thesahindia good call. I agree, let's do that.
hasError={Boolean(props.errorText)}
tgolen
left a comment
There was a problem hiding this comment.
Thanks for that change. I love the removal of hasError!
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
Please create a follow-up PR. Edit: I've created a PR to fix this because it's 3 AM for you |
Thanks for the help 😃 |
|
🚀 Deployed to production by @chiragsalian in version: 1.1.42-6 🚀
|
Details
Fixed Issues
$ #7531
Tests
QA Steps
Tested On
Screenshots
Web
Screen.Recording.2022-02-15.at.2.34.31.AM.mov
without margin left-

with margin left-
Screen.Recording.2022-02-15.at.2.37.02.AM.mov
Mobile Web
Desktop
iOS
Android