-
Notifications
You must be signed in to change notification settings - Fork 3k
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: keyboard not dismissed #53907
base: main
Are you sure you want to change the base?
fix: keyboard not dismissed #53907
Conversation
@alitoshmatov Please 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] |
@daledah Can you resolve conflicts |
@@ -296,7 +296,7 @@ function PureReportActionItem({ | |||
}: PureReportActionItemProps) { | |||
const {translate} = useLocalize(); | |||
const {shouldUseNarrowLayout} = useResponsiveLayout(); | |||
const reportID = report?.reportID ?? ''; | |||
const reportID = report?.reportID ?? `${CONST.DEFAULT_NUMBER_ID}`; |
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.
@daledah Why this changes are in this PR? Do main does not have this changes already, I assume when eslint rule is added all the refactoring is also made to app
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.
It's not added in main. I tried to fix all errors, but turns out we need a lot (20-ish) of file changes. Do you think we should continue to make these changes or just ignore it and move on?
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.
https://expensify.slack.com/archives/C01GTK53T8Q/p1734427537784129 so this is a new eslint which effects a lot of places. It looks like everyone is handling it in their own PR. @daledah Let's update the code according to eslint rule only in the file we are meant to originally change.
Wow, this is a lot of changes, I think it is too much for one PR, and is way beyond our scope. I believe this much change might come with a lot of regressions. -we need a lot (20-ish) of file changes Anyways, I am not sure what our next step should be. @AndrewGable what do you think of whole situation? |
|
||
const policy = PolicyUtils.getPolicy(iouReport?.policyID); | ||
const isMoneyRequestAction = ReportActionsUtils.isMoneyRequestAction(action); | ||
const transactionID = isMoneyRequestAction ? ReportActionsUtils.getOriginalMessage(action)?.IOUTransactionID : '-1'; | ||
const transactionID = isMoneyRequestAction ? ReportActionsUtils.getOriginalMessage(action)?.IOUTransactionID : undefined; |
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.
Any reason why used undefined
instead of CONST.DEFAULT_NUMBER_ID
here?
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.
transactionID
is string
, so we can’t set it to CONST.DEFAULT_NUMBER_ID
. Also, undefined
and CONST.DEFAULT_NUMBER_ID
has the same effect here, as they’re both falsy.
@@ -186,7 +186,7 @@ function MoneyRequestPreviewContent({ | |||
}; | |||
|
|||
const showContextMenu = (event: GestureResponderEvent) => { | |||
if (!shouldDisplayContextMenu) { | |||
if (!shouldDisplayContextMenu || !reportID) { |
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.
Is this change needed, I don't how it is related to eslint problem, and why can't we leave it as it is?
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.
showContextMenuForReport
requires truthy reportID
, so we can early return. To prevent this we have to change showContextMenuForReport
inputs but it will lead to even more changes.
I'd be curious how this PR will relate to this P/S |
Explanation of Change
Fixed Issues
$ #53196
PROPOSAL: #53196 (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 methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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
Android: Native
Screen.Recording.2024-12-11.at.16.36.31.mov
Android: mWeb Chrome
Screen.Recording.2024-12-11.at.16.47.19.mov
iOS: Native
Screen.Recording.2024-12-12.at.10.36.02.mov
iOS: mWeb Safari
Screen.Recording.2024-12-11.at.16.51.36.mp4
MacOS: Chrome / Safari
Screen.Recording.2024-12-11.at.15.58.37.mov
MacOS: Desktop
Screen.Recording.2024-12-11.at.16.55.54.mov