App: [HOLD for payment 2023-04-28] [$500] Add a special gesture on dev to open the test tool menu
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Problem
Coming from this review comment, we want to be able to quickly toggle shouldForceOffline from anywhere in the app.
Why is this important?
Currently you have to navigate to /settings/preferences to access the test tool menu, which means that on small screens it’s not possible to observe what happens on a page when the app changes offline state.
Solution
Let’s create a special gesture that only exists on staging and dev, such as 5 taps, to open the test tool menu in a modal. I already have this PR https://github.com/Expensify/App/pull/15649 up with most of the functionality, however there are two problems that need to be fixed. I don’t really have time for this at the moment so I’m making it external. I would still like to review the PR in addition to another internal reviewer who has not committed to the PR.
Problems:
- Unable to select text, reported here
- Triple clicking the last message selects random text from the page noted here
Additional notes: I’m not sure why yet, but with the GestureDetector the InitialSettingsPage has user-select: none set on the html element. I tried setting the style on the ScreenWrapper with styles.appContent, but that didn’t work either.
Platforms:
Which of our officially supported platforms is this issue occurring on? All
- Android / native
- Android / Chrome
- iOS / native
- iOS / Safari
- MacOS / Chrome / Safari
- MacOS / Desktop
Version Number: Reproducible in staging?: Reproducible in production?: If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation Expensify/Expensify Issue URL: Issue reported by: Slack conversation:
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~01c170ef71cdccddb3
- Upwork Job ID: 1641383576311578624
- Last Price Increase: 2023-04-06
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 44 (27 by maintainers)
@hoangzinh You could use metro and press ‘d’ if you’re using emulator.
The PR is ready
Just invited @alexxxwork and @mananjadhav to the Upwork post!
Ok thank you for clarifying. I like your current proposal + adding react-native-dev menu and an item to open the test tools modal.
@neil-marcellini Updated proposal
I liked @alexxxwork’s updated proposal of using PanResponder. I think it won’t obstruct any other usage in the app.
@neil-marcellini Shure! It’s just that my approach wasn’t right. These bugs comes from GestureDetector component itself. I think it comes from Animated API incompatibility:
Working on a different approach this weekend an would update my proposal