Conversation
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
|
@eVoloshchak @marcaaron One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
Oh wow, thank you for fixing this, what an edge case, I didn't think that items would change after being rendered, didn't realize that changing languages when it's mounted already would cause it 😄 |
|
@eVoloshchak @marcaaron friendly bump for reviews! |
| this.placeholder = _.isEmpty(this.props.placeholder) ? {} : { | ||
| ...this.props.placeholder, | ||
| color: variables.pickerOptionsTextColor, | ||
| color: themeColors.pickerOptionsTextColor, |
There was a problem hiding this comment.
cc @shawnborton do we follow a particular naming convention for the these theme colors? I wasn't sure so wanted to ask if you're cool with the theme colors referring to specific things in the UI vs. more general stuff.
There was a problem hiding this comment.
I think that's okay? I don't feel strongly. Maybe @grgia has an opinion since she worked a lot on refactoring colors.
| items={this.items} | ||
|
|
||
| // We add a text color to prevent white text on white background dropdown items on Windows | ||
| items={_.map(this.props.items, item => ({...item, color: themeColors.pickerOptionsTextColor}))} |
There was a problem hiding this comment.
NAB, but guessing there is no way to pass the color to the picker component instead of with each option? Seems a bit weird to have to decorate the items with the color property if they are all going to be the same color.
There was a problem hiding this comment.
I agree, but unfortunately I don't think there's a way around it or I couldn't find another solution. Here's the link to the lib docs.
There was a problem hiding this comment.
No worries that's what I figured. I can't think of any reason why we might want to avoid this other than performance (though definitely not for the case this PR is fixing). But if performance is a concern we can find a more optimal way to recalculate things. Not concerned really.
Can't do it till tomorrow, could you unassign me please? |
|
Comment removed, waiting for Shawn's input here |
Reviewer Checklist
Screenshots/VideosWeb2022-12-08_10-13-24.mp4 |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to production by @chiragsalian in version: 1.2.38-6 🚀
|





Details
We changed the render items in Picker from
this.props.itemstothis.itemsand updated them in the constructor only, which caused the items to not be translated when a different language is selected. This PR fixes that issue.I'm also moving the new color to the themeColors file instead of variables.
Fixed Issues
$ #13341
Tests
Settings > PreferencesOffline tests
N/A
QA Steps
Same as test steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*filesWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)Screenshots/Videos
Web
Windows
https://user-images.githubusercontent.com/22219519/206017878-8f4ead41-c62d-4088-9920-9963d9f742bb.mov
Mac
https://user-images.githubusercontent.com/22219519/206017899-e7a66ab4-8f30-48ff-b51f-3113273c20b7.mov
Mobile Web - Chrome
chrome.mov
Mobile Web - Safari
safari.mov
Desktop
desktop.mov
iOS
ios.mov
Android
android.mov