-
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: navigate back directed to Workflows page instead of Get assistance page #42459
Conversation
I'll review this tmr as it's end of day for me |
src/pages/GetAssistancePage.tsx
Outdated
@@ -34,10 +35,11 @@ function GetAssistancePage({route, account}: GetAssistancePageProps) { | |||
const styles = useThemeStyles(); | |||
const {translate} = useLocalize(); | |||
const navigateBackTo = route?.params.backTo || ROUTES.SETTINGS_CONTACT_METHODS.getRoute(); | |||
const canUseTouchScreen = DeviceCapabilities.canUseTouchScreen(); |
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.
Should we use const {isLargeScreenWidth} = useWindowDimensions();
instead? As devices with touchscreen possibly have large screens.
Note: we only want to dismiss modal on large screens.
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.
- Previously, we call
Report.navigateToConciergeChat(true)
to fix this bug.
So I think we should useDeviceCapabilities.canUseTouchScreen()
because: In here:
App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx
Lines 283 to 284 in 8375abe
const shouldAutoFocus = !modal?.isVisible && isFocused && (shouldFocusInputOnScreenFocus || (isEmptyChat && !ReportActionsUtils.isTransactionThread(parentReportAction))) && shouldShowComposeInput;
we also use it to check theshouldAutoFocus
.
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.
@nkdengineer Sorry, I'm not following you. Or can you just share your concerns about my suggestion?
Should we use const {isLargeScreenWidth} = useWindowDimensions(); instead? As devices with touchscreen possibly have large screens.
Note: we only want to dismiss modal on large screens.
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.
- I just concern that your suggestion use
isLargeScreenWidth
but here:
App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx
Lines 283 to 284 in 8375abe
const shouldAutoFocus = !modal?.isVisible && isFocused && (shouldFocusInputOnScreenFocus || (isEmptyChat && !ReportActionsUtils.isTransactionThread(parentReportAction))) && shouldShowComposeInput;
we useDeviceCapabilities.canUseTouchScreen()
, so it is inconsistency and afraid that it can lead to this bug in the future (but now I cannot find any bug with your suggestion).
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.
You mean canFocusInputOnScreenFocus
is also determined by DeviceCapabilities.canUseTouchScreen()
right? Yes I understand that your consideration to ensure consistent auto focus behavior on touch devices.
While I think as we’re fixing regression from
#40708, we should fix the root cause - dismiss modal when there’s a RHP page. There’s a RHP page only if it’s wide screen right?
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.
Yes, it makes sense. I will update the PR based on your suggestion 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.
@eh2077 I updated, please check again
Reviewer Checklist
Screenshots/VideosAndroid: Native0-android.mp4Android: mWeb Chrome0-mobile-chrome.mp4iOS: Native0-ios.mp4iOS: mWeb Safari0-mobile-safari.mp4MacOS: Chrome / Safari0-web.mp4MacOS: Desktop0-desktop.mp4 |
@nkdengineer I think test steps are different between mobile devices and Web/Desktop. === Mobile ===
=== Web/Desktop ===
Can you help to update them? |
@eh2077 thanks your suggestion, i updated |
Hey @roryabraham , kindly take a look when you get a chance |
✋ 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/roryabraham in version: 1.4.77-11 🚀
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 1.4.77-11 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.78-5 🚀
|
Details
Fixed Issues
$ #41610
PROPOSAL: #41610 (comment)
Tests
=== Mobile ===
=== Web/Desktop ===
Offline tests
QA Steps
=== Mobile ===
=== Web/Desktop ===
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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
android.mov
Android: mWeb Chrome
android-mweb.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov