Skip to content
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

Add offline search functionality for addresses #35045

Merged
merged 115 commits into from
May 28, 2024

Conversation

pac-guerreiro
Copy link
Contributor

@pac-guerreiro pac-guerreiro commented Jan 24, 2024

Details

Add offline search functionality for addresses

Fixed Issues

$ #30123
PROPOSAL: #30123 (comment)

Tests

  1. Go to staging.new.expensify.com
  2. Click on FAB> Submit Expense > Distance tab
  3. Select different locations several times
  4. Go offline
  5. Select Start point
  6. Enter any letter into search field and check if search result will update according to entered letter

Since this PR introduces changes to FormWrapper which is used in 80 files, it’s important to test that these changes don’t break other forms.

The following are some tests cases of other forms:

  • Assign Task

    1. On home, click on ( + ) FAB and select “Assign task”
    2. Confirm that the form is rendered correctly
  • Start chat > Room

    1. On home, click on ( + ) FAB and select “Start chat”
    2. Select “Room” tab
    3. Confirm that the form is rendered correctly
  • Track expense > Confirmation

    1. On home, click on ( + ) FAB and select “Track expense”
    2. Select “Manual” tab
    3. Input any amount then click on “Next”
    4. Click on “Description”
    5. Confirm that the form is rendered correctly then go back
    6. Click on “Merchant”
    7. Confirm that the form is rendered correctly then go back
    8. Click on “Date”
    9. Confirm that the form is rendered correctly
  • Settings > Profile

    1. On home, click on “Settings”
    2. On settings, click on “Profile”
    3. On profile, click on “Display name”
    4. Confirm that the form is rendered correctly then go back
    5. On profile, click on “Status”
    6. Confirm that the form is rendered correctly then go back
    7. On profile, click on “Legal name”
    8. Confirm that the form is rendered correctly then go back
    9. On profile, click on “Date of birth”
    10. Confirm that the form is rendered correctly then go back
    11. On profile, click on “Address”
    12. Confirm that the form is rendered correctly
  • Settings > Security > Close account

    1. On home, click on “Settings”
    2. On settings, click on “Security”
    3. On security, click on “Close account”
    4. Confirm that the form is rendered correctly
  • Workspace > Profile > Description

    1. On home, click on “Settings”
    2. On settings, click on “Workspaces”
    3. On workspaces, click on any workspace in which you are an admin or create one
    4. On workspace home, click on “Profile”
    5. On workspace profile, click on “Description”
    6. Confirm that the form is rendered correctly
  • Workspace > Members > Invite Member > Invite Message

    1. On home, click on “Settings”
    2. On settings, click on “Workspaces”
    3. On workspaces, click on any workspace in which you are an admin or create one
    4. On workspace home, click on “Members”
    5. On workspace members, click on “Invite member”
    6. Select any user then click on “Next”
    7. Confirm that the form is rendered correctly

Offline tests

Same as above

QA Steps

Same as above

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Screen.Recording.2024-02-15.at.17.40.46.mp4
Form.testing.-.Android.mp4
Android: mWeb Chrome
Screen.Recording.2024-02-15.at.18.15.29.mp4
Form.testing.-.Android.Chrome.mp4
iOS: Native
Screen.Recording.2024-02-15.at.15.35.03.mp4
Form.testing.-.iOS.mp4
iOS: mWeb Safari
Screen.Recording.2024-02-15.at.18.12.57.mp4
Form.testing.-.iOS.Safari.mp4
MacOS: Chrome / Safari
Screen.Recording.2024-02-15.at.18.11.29.mp4
Form.testing.-.Chrome.Web.mp4
MacOS: Desktop
Screen.Recording.2024-02-15.at.18.07.23.mp4
Form.testing.-.MacOS.Desktop.mp4

@pac-guerreiro
Copy link
Contributor Author

@neil-marcellini

I think the merge freeze has been lifted 😄

@eVoloshchak
Copy link
Contributor

@pac-guerreiro, could you please merge the latest main? There are a lot of changes since merge freeze is over, let's re-test this one more time

# Conflicts:
#	src/CONST.ts
@pac-guerreiro
Copy link
Contributor Author

@eVoloshchak

I merged main and I'll be re-testing this 😄

@pac-guerreiro
Copy link
Contributor Author

@eVoloshchak

Things look the same as in the screen recordings 😄

@neil-marcellini
Copy link
Contributor

neil-marcellini commented May 24, 2024

The merge freeze isn't fully over yet, we're merging only low risk PRs, ones with minimal commits and lines changed. This is definitely not one of those. I'll try to let you know when it's over.

@neil-marcellini
Copy link
Contributor

The merge freeze is over, so finally merging this!

@neil-marcellini neil-marcellini merged commit 849a0d4 into Expensify:main May 28, 2024
16 checks passed
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/neil-marcellini in version: 1.4.77-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@arosiclair
Copy link
Contributor

Yeah this is being reverted here

@ShridharGoel
Copy link
Contributor

#42767 and #42768 are being fixed, I think we don't need to revert.

@luacmartins
Copy link
Contributor

@ShridharGoel it seems like we have more blockers stemming from this PR, so I think reverting and letting the original author work on a fix is the right path here.

arosiclair added a commit that referenced this pull request May 29, 2024
[No QA] Revert "Merge pull request #35045 from callstack-internal/issues/30123"
OSBotify pushed a commit that referenced this pull request May 29, 2024
[No QA] Revert "Merge pull request #35045 from callstack-internal/issues/30123"

(cherry picked from commit 02b0c5e)
@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.77-11 🚀

platform result
🤖 android 🤖 failure ❌
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/neil-marcellini in version: 1.4.77-11 🚀

platform result
🤖 android 🤖 failure ❌
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/neil-marcellini in version: 1.4.77-11 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.77-11 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

pac-guerreiro added a commit to callstack-internal/Expensify-App that referenced this pull request Jun 3, 2024
@OSBotify
Copy link
Contributor

OSBotify commented Jun 4, 2024

🚀 Deployed to production by https://github.com/mountiny in version: 1.4.78-5 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants