App icon indicating copy to clipboard operation
App copied to clipboard

FIX: Not found page shows briefly when deleting a track expense

Open ikevin127 opened this issue 1 year ago • 2 comments

Explanation of Change

We're reverting the changes implemented by PR https://github.com/Expensify/App/pull/51920 as the changes caused this issue - more details in the proposal.

Fixed Issues

$ https://github.com/Expensify/App/issues/53301 PROPOSAL: https://github.com/Expensify/App/issues/53301#issuecomment-2508823498

Tests

  1. Login into the app with any account.
  2. Open self DM.
  3. Create a new track expense.
  4. Open the expense report.
  5. Click on the report header to open report Details page, then and click Delete expense.
  6. Confirm deletion and verify that It's not here page doesn't show up when the expense is being deleted.

[!note] Since PR https://github.com/Expensify/App/issues/53301 was fixing issue https://github.com/Expensify/App/issues/51388 scenario but also an additional test case mentioned in https://github.com/Expensify/App/issues/53301#issuecomment-2508823905, besides our issue's tests - we need to ensure the 2 additional tests are passing as well.

Test for issue https://github.com/Expensify/App/issues/51388:

Precondition: Go to profile icon (Settings) -> Troubleshoot > enable Debug mode.

  1. Login into the app with any account.
  2. Create a new workspace.
  3. Tap on the new workspace report to open it.
  4. Send a message.
  5. Click on the report header to open report Details page, then and click Debug.
  6. Scroll down to tap Delete.
  7. Verify that the app doesn't get stuck on a blank page.

Test for scenario mentioned in https://github.com/Expensify/App/issues/53301#issuecomment-2508823905:

Precondition: Create a new #room with Private visibility.

  1. User A invite user B to the room.
  2. User B open the room report and clicks on header to open room's Details page.
  3. User A removes B from room.
  4. Verify that User B is not stuck on a blank page once removed from the room.
  • [x] Verify that no errors appear in the JS console

Offline tests

Same as QA Steps.

QA Steps

  1. Login into the app with any account.
  2. Open self DM.
  3. Create a new track expense.
  4. Open the expense report.
  5. Click on the report header to open report Details page, then and click Delete expense.
  6. Confirm deletion and verify that It's not here page doesn't show up when the expense is being deleted.

[!note] Since PR https://github.com/Expensify/App/issues/53301 was fixing issue https://github.com/Expensify/App/issues/51388 scenario but also an additional test case mentioned in https://github.com/Expensify/App/issues/53301#issuecomment-2508823905, besides our issue's tests - we need to ensure the 2 additional tests are passing as well.

Test for issue https://github.com/Expensify/App/issues/51388:

Precondition: Go to profile icon (Settings) -> Troubleshoot > enable Debug mode.

  1. Login into the app with any account.
  2. Create a new workspace.
  3. Tap on the new workspace report to open it.
  4. Send a message.
  5. Click on the report header to open report Details page, then and click Debug.
  6. Scroll down to tap Delete.
  7. Verify that the app doesn't get stuck on a blank page.

Test for scenario mentioned in https://github.com/Expensify/App/issues/53301#issuecomment-2508823905:

Precondition: Create a new #room with Private visibility.

  1. User A invite user B to the room.
  2. User B open the room report and clicks on header to open room's Details page.
  3. User A removes B from room.
  4. Verify that User B is not stuck on a blank page once removed from the room.
  • [x] Verify that no errors appear in the JS console

PR Author Checklist

  • [x] I linked the correct issue in the ### Fixed Issues section above
  • [x] I wrote clear testing steps that cover the changes made in this PR
    • [x] I added steps for local testing in the Tests section
    • [x] I added steps for the expected offline behavior in the Offline steps section
    • [x] I added steps for Staging and/or Production testing in the QA steps section
    • [x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • [x] 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)
    • [x] 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).
  • [x] I included screenshots or videos for tests on all platforms
  • [x] I ran the tests on all platforms & verified they passed on:
    • [x] Android: Native
    • [x] Android: mWeb Chrome
    • [x] iOS: Native
    • [x] iOS: mWeb Safari
    • [x] MacOS: Chrome / Safari
    • [x] MacOS: Desktop
  • [x] 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)
  • [x] I followed proper code patterns (see Reviewing the code)
    • [x] 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)
    • [x] I verified that comments were added to code that is not self explanatory
    • [x] 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.
    • [x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • [x] If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • [x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • [x] 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 either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • [x] 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.
    • [x] I verified the JSDocs style guidelines (in STYLE.md) were followed
  • [x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • [x] I followed the guidelines as stated in the Review Guidelines
  • [x] 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)
  • [x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • [x] I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • [x] I verified that if a function's arguments changed that all usages have also been updated correctly
  • [x] If any new file was added I verified that:
    • [x] 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
  • [x] If a new CSS style is added I verified that:
    • [x] A similar style doesn't already exist
    • [x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • [x] 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.
  • [x] 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)
  • [x] 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.
  • [x] 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.
  • [x] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • [x] I verified that all the inputs inside a form are aligned with each other.
    • [x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • [x] 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.
  • [x] I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • [x] 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

https://github.com/user-attachments/assets/d0dcaf7a-cc04-44d2-97d0-e8d88700db93

Android: mWeb Chrome

https://github.com/user-attachments/assets/10799f77-bcbf-431b-9418-38b7bb91eaab

iOS: Native

https://github.com/user-attachments/assets/a540e53a-3bf8-4e7b-937f-9c340367a4fd

iOS: mWeb Safari

https://github.com/user-attachments/assets/658b25fd-39c8-427b-8459-bcf2cdb9104e

MacOS: Chrome / Safari

https://github.com/user-attachments/assets/22eae50c-945a-40f6-b33d-f8b4904a4e97

MacOS: Desktop

https://github.com/user-attachments/assets/749e0528-088b-46c1-aa8b-1dd697f33d92

ikevin127 avatar Dec 02 '24 22:12 ikevin127

@shubham1206agra 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]

melvin-bot[bot] avatar Dec 02 '24 22:12 melvin-bot[bot]

@ikevin127 https://github.com/Expensify/App/issues/51388 is failing for me

https://github.com/user-attachments/assets/ad84cf3a-e157-4ab2-9f78-4363b77856dd

shubham1206agra avatar Dec 10 '24 12:12 shubham1206agra

I'm looking into a fix for https://github.com/Expensify/App/issues/51388 not passing.

ikevin127 avatar Dec 11 '24 18:12 ikevin127

@shubham1206agra I looked into the blank screen issue and this is what I found, related to this block:

https://github.com/Expensify/App/blob/082e14b9bc1259c329c7cd186ee8f21c0397f6fb/src/pages/Debug/Report/DebugReportPage.tsx#L148

which is calling:

function navigateToConciergeChatAndDeleteReport(reportID: string, shouldPopToTop = false, shouldDeleteChildReports = false) {
    // Dismiss the current report screen and replace it with Concierge Chat
    if (shouldPopToTop) {                                    // |
        Navigation.setShouldPopAllStateOnUP(true);           // |
    }                                                        // |  -> these 4 likes are responsible from going back from the
    Navigation.goBack(undefined, undefined, shouldPopToTop); // |  -> Debug - Report page after `Delete` confirmation
    navigateToConciergeChat();    // |  -> this is resonsible for navigating to the Concierge report
    InteractionManager.runAfterInteractions(() => {
        deleteReport(reportID, shouldDeleteChildReports);
    });
}

The issue here is that, because we removed the !isFocused check from the WithReportOrNotFound to fix the other issues, and because the navigateToConciergeChatAndDeleteReport only goes back and pops the route from the stack one time, there's 2 routes that we're left with in the stack behind the Concierce route we just pushed:

  1. ReportDetailsPage (1st in stack behind Concierge) - this is the blank page observed when going back from Concierge
  2. ReportScreen (2nd in stack behind ReportDetailsPage) - which would show a dismissable skeleton loading page in place of the now deleted report (navigateToConciergeChatAndDeleteReport -> deleteReport)

In order to deal with this issue while keeping the !isFocused check removed from the WithReportOrNotFound, I performed the following changes:

  1. In navigateToConciergeChatAndDeleteReport added a new variable called shouldPopTwice which is false by default, implementing the following logic (of which pattern we also use here on Android to pop 2 screens from the stack):
-function navigateToConciergeChatAndDeleteReport(reportID: string, shouldPopToTop = false, shouldDeleteChildReports = false) {
+function navigateToConciergeChatAndDeleteReport(reportID: string, shouldPopToTop = false, shouldDeleteChildReports = false, shouldPopTwice = false) {
     // Dismiss the current report screen and replace it with Concierge Chat
     if (shouldPopToTop) {
         Navigation.setShouldPopAllStateOnUP(true);
     }
     Navigation.goBack(undefined, undefined, shouldPopToTop);
+    // When in Debug Mode and Delete report in DebugReportPage we need to pop
+    // two screens from the navigation stack before we navigate to concierge:
+    // ReportDetailsPage and ReportScreen, otherwise when going back from Concierge
+    // we'll see report skeleton page of deleted report.
+    if (shouldPopTwice) {
+        navigationRef.dispatch({...StackActions.pop()});
+        navigationRef.dispatch({...StackActions.pop()});
+    }
     navigateToConciergeChat();
     InteractionManager.runAfterInteractions(() => {
         deleteReport(reportID, shouldDeleteChildReports);
  1. In ReportDetailsPage, pass the 2nd argument as false since we don't need the shouldPopToTop logic anymore, and pass the 3rd argument (shouldPopTwice) as true to the navigateToConciergeChatAndDeleteReport.

This will work in the following way:

  • Navigation.goBack still in place but without shouldPopToTop will go back from Debug - Report page after Delete confirmation
  • the 2 pops will remove ReportDetailsPage and ReportScreen from the stack, leaving us on the Concierge report without the deleted report pages in the stack

This fixes the issue with Debug mode delete report blank page or skeleton loading page when going back from the Concierge report, which will go back to Home (all chats) in all platforms or whatever the stack route behind Concierge report was before, proof from iOS: Native:

https://github.com/user-attachments/assets/d3d6de49-b35b-402a-bd22-cbc67c0ea936

ikevin127 avatar Dec 12 '24 04:12 ikevin127

@shubham1206agra Ready for review once again! Addressed the mentioned issue in https://github.com/Expensify/App/pull/53408#issuecomment-2537798958.

ikevin127 avatar Dec 12 '24 04:12 ikevin127

@ikevin127 Is there a reason why shouldPopToTop does not work?

shubham1206agra avatar Dec 12 '24 05:12 shubham1206agra

@shubham1206agra It works, but only for popping the first screen aka Debug - Report after we confirm Delete, the other 2 report related screens remaining in the stack and causing the blank page and skeleton loading screen issues.

The reason why I went with the new prop is because of backwards compatibility since the function is used in other components as well and I wouldn't want to break any of the previous functionality.

ikevin127 avatar Dec 12 '24 05:12 ikevin127

but only for popping the first screen aka Debug

@ikevin127 It should pop all the screens. Let me see why this is happening.

shubham1206agra avatar Dec 12 '24 06:12 shubham1206agra

@shubham1206agra Indeed, popToTop should pop all but for some reason it's not working:

/**
   * Pop to the first route in the stack, dismissing all other screens.
   */
  popToTop(): void;

Looks like navigateToConciergeChatAndDeleteReport is the only function that's using the Navigation.goBack 3rd argument shouldPopToTop and it's not working as expected.

~~I'll look into this again tomorrow,~~ I'm thinking there might be a problem with the way we call popToTop on this line:

https://github.com/Expensify/App/blob/082e14b9bc1259c329c7cd186ee8f21c0397f6fb/src/libs/Navigation/Navigation.ts#L214

I noticed that most of the dispatch calls with StackActions are called with spread operator, example from resetToHome:

https://github.com/Expensify/App/blob/082e14b9bc1259c329c7cd186ee8f21c0397f6fb/src/libs/Navigation/Navigation.ts#L304-L311

and also passing a target. Will attempt to see if I can fix the Navigation.goBack function when it comes to the shouldPopToTop logic.

Edit

I confirm that fixes the issue:

    if (shouldPopToTop) {
        if (shouldPopAllStateOnUP) {
            const rootState = navigationRef.getRootState(); // <- new line
            shouldPopAllStateOnUP = false;
            navigationRef.current?.dispatch({...StackActions.popToTop(), target: rootState.key}); // <- changed line
            return;
        }
    }

Will revert the last commit and apply this fix instead.

ikevin127 avatar Dec 12 '24 07:12 ikevin127

@shubham1206agra I reverted that previous commit and fixed Navigation.goBack's shouldPopToTop logic instead, as described in https://github.com/Expensify/App/pull/53408#issuecomment-2538021480. Ready for review once again, if you find any other issues please let me know and will address again tomorrow.

ikevin127 avatar Dec 12 '24 08:12 ikevin127

@shubham1206agra Any input on the latest changes, are we good to move forward with the PR ?

ikevin127 avatar Dec 14 '24 00:12 ikevin127

Screenshot 2024-12-14 at 10 41 15 PM

@ikevin127 This test case failed :(

Precondition: Create a new #room with Private visibility.

User A invite user B to the room. User B open the room report and clicks on header to open room's Details page. User A removes B from room. Verify that User B is not stuck on a blank page once removed from the room.

shubham1206agra avatar Dec 14 '24 17:12 shubham1206agra

Looking into it, will attempt a similar fix to the previous one - will tag you once its ready.

ikevin127 avatar Dec 16 '24 05:12 ikevin127

Still working on this, will get back with some results soon.

ikevin127 avatar Dec 18 '24 18:12 ikevin127

@shubham1206agra The PR is ready for review once again!

What happens in https://github.com/Expensify/App/pull/53408#issuecomment-2543188347 is that withReportOrNotFound (which wraps ReportDetailsPage) returns null (blank page) here when pusher event comes from BE once the user is removed from the private group.

Since we removed the !isFocused check, in this specific case we didn't have any logic in withReportOrNotFound to handle the pusher event case. Therefore I added the following logic in commit https://github.com/Expensify/App/pull/53408/commits/94ee02be593e47e129598763c6cacaa16e983aa2 which:

  • tracks when we lose access to a previously accessible report
  • reset to home on narrow layout devices because only in that scenario we can be left stuck on blank page (if we are on ReportDetailsPage) or get infinite report skeleton with back button (if we're on ReportScreen) once we're removed from a private group in real-time

With this, it should pass all 3 test cases + 1 variation as demonstrated below.

Android: Native
Main issue test Debug mode test 53301 Test (ReportDetailsPage) 53301 Test (ReportScreen)

ikevin127 avatar Dec 19 '24 02:12 ikevin127

@ikevin127 Unable to see the videos you just uploaded.

shubham1206agra avatar Dec 19 '24 02:12 shubham1206agra

https://github.com/user-attachments/assets/9aff966c-bc5b-4c40-b77d-f0731f3c2f83

https://github.com/user-attachments/assets/c00212e3-ba06-49f8-926d-0c475460125c

https://github.com/user-attachments/assets/9ea2ef98-ebda-4985-aef7-b29be3b1cc89

https://github.com/user-attachments/assets/0d3a0c3b-03d2-4c6f-8ce3-79d7784b5597

ikevin127 avatar Dec 19 '24 02:12 ikevin127

@ikevin127 Unable to see the videos you just uploaded.

@shubham1206agra How's the PR looking, have you been able to see the videos I reposted in https://github.com/Expensify/App/pull/53408#issuecomment-2552649102 ?

ikevin127 avatar Dec 21 '24 08:12 ikevin127

cc @shubham1206agra bump on https://github.com/Expensify/App/pull/53408#issuecomment-2558045014

ikevin127 avatar Dec 23 '24 19:12 ikevin127

@shubham1206agra Synced w/ main as requested in slack thread.

ikevin127 avatar Dec 28 '24 04:12 ikevin127

Screenshot 2024-12-28 at 7 17 22 PM

Test stated in https://github.com/Expensify/App/pull/53408#issuecomment-2543188347 fails on large screen too.

shubham1206agra avatar Dec 28 '24 13:12 shubham1206agra

@shubham1206agra Thanks, I missed that on large layouts. Removed the getIsNarrowLayout check in commit https://github.com/Expensify/App/pull/53408/commits/a3c4282dc8c807df1ae3a4a6db99fa6b673c22ce and now it will resetToHome regardess of layout size when the report cannot be accessed anymore.

PR is ready for review again, let me know if you find any other issues!

ikevin127 avatar Dec 28 '24 23:12 ikevin127

https://github.com/user-attachments/assets/fee1623d-f1b0-4dd6-87b1-d86b43c78cbf

BUG: Deleting report from debug report will cause weird navigation.

@ikevin127 Can we just not navigate to concierge in this case or somehow we need to prevent resetToHome here?

shubham1206agra avatar Dec 29 '24 13:12 shubham1206agra

@shubham1206agra Hmm, that's weird as I'm not able to reproduce on my side:

https://github.com/user-attachments/assets/79c4f233-1b1e-4aac-83a7-4aa596fc1100

Breakdown

  • when WS report Debug - Delete is called, this doesn't actually delete the report on BE side, this is the function called on Delete here:

https://github.com/Expensify/App/blob/483d28729c6f81b6c59fd87a7fc2ed5bff04f81e/src/libs/actions/Report.ts#L2465-L2475

this is called with shouldPopToTop true and calls navigateToConciergeChat after goBack and before the FE only deleteReport is performed -> meaning this was designed to navigate from FE deleted report to Concierge chat report.

Given that Debug - Delete doesn't actually delete the report from BE, not sure how you got to reproduce this issue since the resetToHome logic added by this PR in withReportOrNotFound would not get called in this case.

  1. Is the issue mentioned in #53408 (comment) constantly reproducible for you ?
  2. If yes, should I remove the Debug - Delete navigation to Concierge report from here and simply perform goBack and deleteReport similar to what was done in all other Debug - Delete cases like here ?

ikevin127 avatar Dec 30 '24 22:12 ikevin127

@ikevin127 Answer to your questions

  1. Yes
  2. Yes

shubham1206agra avatar Jan 03 '25 16:01 shubham1206agra

@shubham1206agra Thanks for the info, I was able to reproduce the issue you mentioned in https://github.com/Expensify/App/pull/53408#issuecomment-2564726229 consistently on iOS: mWeb Safari (I tested on iOS: Native previously, that's why I wasn't able to reproduce).

I implemented the changes mentioned and agreed upon in point (2.) and the issue was fixed:

Note: I used Navigation.resetToHome() instead of Navigation.goBack() since that would still show the weird navigation issue but with the deleted Report instead of Concierge report.

Before After

✅ Re-tested all scenarios again on Web and Native and they all look good on my side. PR is ready for review once again! 🤞

ikevin127 avatar Jan 04 '25 01:01 ikevin127

cc @shubham1206agra for visibility on the latest updates

ikevin127 avatar Jan 07 '25 22:01 ikevin127

@shubham1206agra PR is ready for review as discussed on Slack, thank you!

ikevin127 avatar Jan 09 '25 09:01 ikevin127

Reviewer Checklist

  • [x] I have verified the author checklist is complete (all boxes are checked off).
  • [x] I verified the correct issue is linked in the ### Fixed Issues section above
  • [x] I verified testing steps are clear and they cover the changes made in this PR
    • [x] I verified the steps for local testing are in the Tests section
    • [x] I verified the steps for Staging and/or Production testing are in the QA steps section
    • [x] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • [x] 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)
  • [x] I checked that screenshots or videos are included for tests on all platforms
  • [x] I included screenshots or videos for tests on all platforms
  • [x] I verified tests pass on all platforms & I tested again on:
    • [x] Android: Native
    • [x] Android: mWeb Chrome
    • [x] iOS: Native
    • [x] iOS: mWeb Safari
    • [x] MacOS: Chrome / Safari
    • [x] MacOS: Desktop
  • [x] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • [x] I verified proper code patterns were followed (see Reviewing the code)
    • [x] 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).
    • [x] I verified that comments were added to code that is not self explanatory
    • [x] 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.
    • [x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • [x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • [x] 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 either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • [x] 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.
    • [x] I verified the JSDocs style guidelines (in STYLE.md) were followed
  • [x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • [x] I verified that this PR follows the guidelines as stated in the Review Guidelines
  • [x] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • [x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • [x] I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • [x] If a new component is created I verified that:
    • [x] A similar component doesn't exist in the codebase
    • [x] All props are defined accurately and each prop has a /** comment above it */
    • [x] The file is named correctly
    • [x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • [x] The only data being stored in the state is data necessary for rendering and nothing else
    • [x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • [x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • [x] All JSX used for rendering exists in the render method
    • [x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • [x] If any new file was added I verified that:
    • [x] 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
  • [x] If a new CSS style is added I verified that:
    • [x] A similar style doesn't already exist
    • [x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • [x] 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.
  • [x] 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)
  • [x] 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.
  • [x] 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.
  • [x] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • [x] I verified that all the inputs inside a form are aligned with each other.
    • [x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • [x] 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.
  • [x] For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • [x] 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.
  • [x] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native

https://github.com/user-attachments/assets/96b4b16b-40f0-4b83-830f-0e3dc2d5cc12

Android: mWeb Chrome

https://github.com/user-attachments/assets/4fe05b43-7a82-4c68-82ab-aad9cae93f0c

iOS: Native

https://github.com/user-attachments/assets/09c4b71c-ef39-4190-9f1d-38911f2cb191

iOS: mWeb Safari

https://github.com/user-attachments/assets/b08000b0-4b7b-4c7c-bde7-4c191d6a0fc5

MacOS: Chrome / Safari

https://github.com/user-attachments/assets/abadfdfd-09dc-4b36-bc8c-995627b0708b

MacOS: Desktop

https://github.com/user-attachments/assets/f79b9f48-6f3d-49ae-8960-efd1f1611e64

shubham1206agra avatar Jan 09 '25 13:01 shubham1206agra

:hand: 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 avatar Jan 10 '25 19:01 OSBotify