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

Update "Hold expense" modal copy and icons #53354

Merged
merged 34 commits into from
Jan 15, 2025

Conversation

gijoe0295
Copy link
Contributor

@gijoe0295 gijoe0295 commented Dec 1, 2024

Explanation of Change

Fixed Issues

$ #52655
PROPOSAL: #52655 (comment)

Tests

  1. Login with an account that has not seen hold request modal before (better be a new account)
  2. Submit 2 expenses to a workspace
  3. Hold 1 expense
  4. Verify hold request modal shows
  5. Press Got it (or press backdrop)
  6. Verify the modal disappears
  7. Hold the other expense
  8. Verify hold request modal does not show again

  1. Login with an account that has not seen track training modal before
  2. Go offline
  3. Press FAB > Track expense
  4. Verify the track training modal shows with an animation
  5. Go online
  6. Verify the track training modal shows with a video
  • Verify that no errors appear in the JS console

Offline tests

NA

QA Steps

  1. Login with an account that has not seen hold request modal before (better be a new account)
  2. Submit 2 expenses to a workspace
  3. Hold 1 expense
  4. Verify hold request modal shows
  5. Press Got it (or press backdrop)
  6. Verify the modal disappears
  7. Hold the other expense
  8. Verify hold request modal does not show again
  • Verify that no errors appear in the JS console

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 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 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:
    • 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 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)
    • 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.ts 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 UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design 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.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • 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.2025-01-16.at.00.39.47.mov
Android: mWeb Chrome

Screenshot_1733168470

iOS: Native

Simulator Screenshot - iPhone 16 - 2024-12-03 at 02 16 48

iOS: mWeb Safari

Simulator Screenshot - iPhone 16 - 2024-12-03 at 02 26 37

Screen.Recording.2024-12-03.at.02.26.16-recording.mov
MacOS: Chrome / Safari

Screenshot 2024-12-03 at 01 15 17

MacOS: Desktop

Screenshot 2024-12-03 at 01 24 00

@gijoe0295 gijoe0295 changed the title update "Hold expense" modal copy and icons Update "Hold expense" modal copy and icons Dec 1, 2024
@gijoe0295 gijoe0295 marked this pull request as ready for review December 2, 2024 19:46
@gijoe0295 gijoe0295 requested review from a team as code owners December 2, 2024 19:46
@melvin-bot melvin-bot bot requested review from parasharrajat and removed request for a team December 2, 2024 19:46
Copy link

melvin-bot bot commented Dec 2, 2024

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

@shawnborton
Copy link
Contributor

On mobile, the bottom corners should not be rounded:
CleanShot 2024-12-02 at 14 46 50@2x

@@ -170,9 +207,11 @@ function FeatureTrainingModal({
User.dismissTrackTrainingModal();
}
setIsModalVisible(false);
Navigation.goBack();
if (onboardingIsMediumOrLargerScreenWidth) {
Navigation.goBack();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only need to call goBack on large screens because the hold request modal is rendered inside a dedicated page route. On small screens, it's just a modal.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is creating an issue. For Track expense feature training we show the route on all platforms so we need to go back on all of them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think we no longer need modal for small screens because we stopped using RHP for hold modal.

@shawnborton
Copy link
Contributor

For light mode, I wonder if we should make the "hold" text use a lighter color? My gut says yes, but let's see what @Expensify/design thinks too.

CleanShot 2024-12-02 at 14 47 44@2x

I would just opt to use the same color we use for button text.

deleteHoldTitle: 'Eliminar lo que no se pagará',
deleteHoldExplain: 'En el raro caso de que algo se bloquee y no se pague, la persona que solicita el pago debe eliminarlo.',
holdEducationalTitle: 'Esta solicitud está',
holdEducationalText: 'retenida',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

retenida is only used in hold request modal. Hold in other places remains bloquear. Context: #52655 (comment)

@gijoe0295
Copy link
Contributor Author

On mobile, the bottom corners should not be rounded:

Updated this.

@parasharrajat
Copy link
Member

@gijoe0295 Thanks for waiting. Can you please resolve the conflicts?

@gijoe0295
Copy link
Contributor Author

Not done yet. Need to retest after resolving the conflicts.

@parasharrajat
Copy link
Member

@gijoe0295 Any update?

@melvin-bot melvin-bot bot requested a review from MarioExpensify January 12, 2025 14:00
@dubielzyk-expensify
Copy link
Contributor

Is there a difference in the space between the headline and description on mobile and desktop? It almost feels like it's bigger on desktop?
CleanShot 2025-01-13 at 08 48 04@2x

Otherwise the modal itself looks good to me 👍

@shawnborton
Copy link
Contributor

Good catch Jon - I think we use a standard gap of like 8px or something between headlines and the paragraph that immediately follows?

@dannymcclain
Copy link
Contributor

I'm seeing both 8px and 12px in Figma for that gap in various modals. Let's pick one and standardize. Either is fine but I slightly prefer 8px.

@shawnborton
Copy link
Contributor

Same, I think that would be my vote too.

@parasharrajat
Copy link
Member

@gijoe0295 Can you please confirm the margin used and make sure it is 8px as requested here #53354 (comment) #53354 (comment)?

@gijoe0295
Copy link
Contributor Author

@shawnborton @dannymcclain I've made the space between title & description consistently 8px between desktop & mobile:

Screenshot 2025-01-14 at 22 51 20

Do these look fine to you?

@shawnborton
Copy link
Contributor

That feels good to me. Just noting that because of the background color of the "Hold" badge, the gap between headline and text will feel a bit larger than what we're used to seeing elsewhere. But I can get down with what you have above.

@parasharrajat
Copy link
Member

@shawnborton Just noting that the mobile still have bigger margin. Only desktop and web has 8p gap. Do you agree with this or we should use same?

@shawnborton
Copy link
Contributor

Yeah, I would think it's the same everywhere. I would imagine the design team will agree too :)

@dannymcclain
Copy link
Contributor

Yeah, I would think it's the same everywhere. I would imagine the design team will agree too :)

Yup!

@@ -41,32 +32,33 @@ function ProcessMoneyRequestHoldMenu({isVisible, onClose, onConfirm, anchorPosit
return unsub;
}, [navigation, onClose]);

const title = useMemo(
() => (
<View style={[styles.flexRow, styles.alignItemsCenter, onboardingIsMediumOrLargerScreenWidth ? styles.mb1 : styles.mb2]}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is supposed to be same on all platforms 8px.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have a 4px gap on desktop in FeatureTrainingModal:

<View style={[onboardingIsMediumOrLargerScreenWidth ? [styles.gap1, styles.mb8] : [styles.mb10], contentInnerContainerStyles]}>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I got it.

@dubielzyk-expensify
Copy link
Contributor

I too agree with the designers

@MarioExpensify
Copy link
Contributor

@gijoe0295 looks like your checklist is missing the Android native screenshots, can you provide those please? @parasharrajat please make sure all screenshots are updated in the reviewer checklist before we merge.

Copy link
Contributor

@MarioExpensify MarioExpensify left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow this was a big one, thanks @gijoe0295 and @parasharrajat. The code LGTM! Let's just get the correct screenshots in place and I'll merge it.

@gijoe0295
Copy link
Contributor Author

Oops sorry that was my bad, I had trouble building Android and forgot to retry later. I'll do it now.

@gijoe0295
Copy link
Contributor Author

@MarioExpensify I updated Android video.

@MarioExpensify MarioExpensify merged commit 1d6d64f into Expensify:main Jan 15, 2025
21 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.

Copy link
Contributor

🚀 Deployed to staging by https://github.com/MarioExpensify in version: 9.0.87-0 🚀

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

Copy link
Contributor

🚀 Deployed to production by https://github.com/Beamanator in version: 9.0.87-3 🚀

platform result
🤖 android 🤖 true ❌
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅
🤖🔄 android HybridApp 🤖🔄 failure ❌
🍎🔄 iOS HybridApp 🍎🔄 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.

7 participants