-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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: Current currency is not highlighted and not marked #18059
Fix: Current currency is not highlighted and not marked #18059
Conversation
@iwiznia @rushatgabhane 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] |
@@ -127,6 +145,7 @@ class IOUCurrencySelection extends Component { | |||
placeholderText={this.props.translate('common.search')} | |||
headerMessage={headerMessage} | |||
safeAreaPaddingBottomStyle={safeAreaPaddingBottomStyle} | |||
initiallyFocusedOptionKey={_.get(_.find(this.state.currencyData, crc => crc.currencyCode === this.props.iou.selectedCurrencyCode), 'keyForList')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iwiznia @rushatgabhane I added initiallyFocusedOptionKey
prop to OptionsSelector
to focus to the current currency instead of the first currency in list when we go to this page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice touch!
@@ -79,6 +95,8 @@ class IOUCurrencySelection extends Component { | |||
text: `${currencyCode} - ${CurrencySymbolUtils.getLocalizedCurrencySymbol(this.props.preferredLocale, currencyCode)}`, | |||
currencyCode, | |||
keyForList: currencyCode, | |||
customIcon: currencyCode === this.props.iou.selectedCurrencyCode ? greenCheckmark : undefined, | |||
boldStyle: currencyCode === this.props.iou.selectedCurrencyCode, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NAB (polish): create a variable isSelectedCurrency
and use that instead.
boldStyle: currencyCode === this.props.iou.selectedCurrencyCode, | |
customIcon: isSelectedCurrency ? greenCheckmark : undefined | |
boldStyle: isSelectedCurrency, |
@@ -127,6 +145,7 @@ class IOUCurrencySelection extends Component { | |||
placeholderText={this.props.translate('common.search')} | |||
headerMessage={headerMessage} | |||
safeAreaPaddingBottomStyle={safeAreaPaddingBottomStyle} | |||
initiallyFocusedOptionKey={_.get(_.find(this.state.currencyData, crc => crc.currencyCode === this.props.iou.selectedCurrencyCode), 'keyForList')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crc => crc.currencyCode
nitpick: @dukenv0307 could you please rename crc
to something more descriptive and meaningful? 🙇
I don't have a suggestion because I don't know what crc
means
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rushatgabhane crc
means currency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, let's rename it to currency
@rushatgabhane I just updated, please help to check again |
Reviewer Checklist
Screenshots/Videos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iwiznia LGTM!
✋ 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 staging by https://github.com/iwiznia in version: 1.3.9-12 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.12-0 🚀
|
Details
Current currency is not highlighted and not marked
Fixed Issues
$ #17372
PROPOSAL: #17372 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Screencast.2023-04-27.10.26.47.mp4
Mobile Web - Chrome
Record_2023-04-27-10-28-54.mp4
Mobile Web - Safari
processed-2B8DF3FF-BC97-465A-9681-167E10A470DC-992FC4B4-A6FB-45B3-A234-B9205555477C.mp4
Desktop
Screen.Recording.2023-04-27.at.16.29.22.mov
iOS
Screen.Recording.2023-04-27.at.16.27.10.mov
Android
17372.mp4