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

[VIP-Travel] Create a New Travel Page and Terms and Conditions Modal (NewDot) #38469

Merged

Conversation

cdOut
Copy link
Contributor

@cdOut cdOut commented Mar 18, 2024

Details

Implementation of the main New Travel Page and the Terms and Conditions Modal for NewDot.

Fixed Issues

$ #37102
$ #37103

Tests

  1. Make sure you are using an account with the travel beta enabled or in the Permissions.ts file set the canUseAllBetas function to always return true.
  2. Press the + sign to go into the menu and then go into Book travel.
  3. In the newly displayed modal / page press the Book travel button to go further into the flow.
  4. On the Terms & Conditions page press the checkbox to accept and proceed with the flow by pressing the Continue button.
  5. In the network tab check that a correct data package AcceptSpontanaTerms has been sent as a resolution of this flow.
  • Verify that no errors appear in the JS console

Offline tests

QA Steps

  • 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 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 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.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 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.
  • 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
ANDROID-NATIVE.mov
Android: mWeb Chrome
ANDROID-CHROME.mov
iOS: Native
IOS-NATIVE.mp4
iOS: mWeb Safari
IOS-SAFARI.mp4
MacOS: Chrome / Safari
CHROME.mov
MacOS: Desktop
DESKTOP.mov

@twisterdotcom
Copy link
Contributor

twisterdotcom commented Apr 10, 2024

@cdOut and @smelaa - so we had a bit of a rollercoaster discussion on the ToS, but we do still require the modal for accepting Terms, so that's great.

However, our marketing team have a few copy points: cc @jamesdeanexpensify

In Global Create, can we update it to Book travel (instead of Book Travel) to match the casing of the rest of the options?
In the "My trips" section, can we update it to:

  • Book and manage your trips
  • Use Expensify Travel to get the best travel offers and manage your business expenses in one place.
  • Save money on your bookings
  • Get realtime updates and alerts
    [Button] Book travel

One last question in Slack too: https://expensify.slack.com/archives/C05S5EV2JTX/p1712789189082939?thread_ts=1712595510.349369&cid=C05S5EV2JTX

Update: Book travel should go at the very bottom of the Global Create menu.

@WojtekBoman
Copy link
Contributor

On iOS, the bottom button feels awfully close to the home/drag bar. Do we have the proper SafeSpace below the button there? CleanShot 2024-04-29 at 10 50 45@2x

It should behave the same as on other pages in RHP with a button at the bottom of the screen. Does this button have a different style on pages like "Assign a Task" or "Save the World > I Know a Teacher"?

@shawnborton
Copy link
Contributor

Regarding the illustration... interesting, I think I was going off of all of the pages in Account Settings which use a height of 220px:

CleanShot 2024-04-30 at 07 29 23@2x

CleanShot 2024-04-30 at 07 29 32@2x

CleanShot 2024-04-30 at 07 29 42@2x

Personally I would love to standardize on one size and use it everywhere if possible, including these empty states. Thoughts on that @Expensify/design? We'd need to update the empty state components in our Figma brand guidelines.

@shawnborton
Copy link
Contributor

It should behave the same as on other pages in RHP with a button at the bottom of the screen. Does this button have a different style on pages like "Assign a Task" or "Save the World > I Know a Teacher"?

@WojtekBoman check out the Save button on the Display name page - notice how there is a bit more space below the button?
CleanShot 2024-04-30 at 07 33 06@2x

@WojtekBoman
Copy link
Contributor

@shawnborton @dubielzyk-expensify UI Issues have been fixed :) Could you check if it looks ok now?

@shawnborton
Copy link
Contributor

Will fire up a test build for us, but let me know if you have updated screenshots in the original comment as well!

Copy link
Contributor

🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪

Android 🤖 iOS 🍎
https://ad-hoc-expensify-cash.s3.amazonaws.com/android/38469/index.html ❌ FAILED ❌
Android The QR code can't be generated, because the iOS build failed
Desktop 💻 Web 🕸️
https://ad-hoc-expensify-cash.s3.amazonaws.com/desktop/38469/NewExpensify.dmg https://38469.pr-testing.expensify.com
Desktop Web

👀 View the workflow run that generated this build 👀

@WojtekBoman
Copy link
Contributor

Will fire up a test build for us, but let me know if you have updated screenshots in the original comment as well!

I can't update the description of this PR because I'm not the author :(

@shawnborton
Copy link
Contributor

Bummer, but feel free to just make a new comment with the updated screenshots at least!

@shawnborton
Copy link
Contributor

What's the best way to test this using the links above? I added myself to the spotnanaTravel beta but I'm not seeing the Book Travel option show up. Any ideas @twisterdotcom?

@WojtekBoman
Copy link
Contributor

Screenshots/Videos

Android: Native
Android: mWeb Chrome

Screenshot 2024-04-30 at 18 36 27
Screenshot 2024-04-30 at 18 36 05

iOS: Native

Screenshot 2024-04-30 at 18 42 43
Screenshot 2024-04-30 at 18 42 32

iOS: mWeb Safari

Screenshot 2024-04-30 at 18 43 04
Screenshot 2024-04-30 at 18 42 59

MacOS: Chrome / Safari

Screenshot 2024-04-30 at 18 28 41
Screenshot 2024-04-30 at 18 28 35

MacOS: Desktop

Screenshot 2024-04-30 at 18 32 45
Screenshot 2024-04-30 at 18 32 41

I got an error when building Android/Native, so I haven't attached screenshots for this platform

@twisterdotcom
Copy link
Contributor

@shawnborton you gotta wait for the beta cache to flush before your account is added. I do see it for [email protected]:
image

subtitle: 'Use Expensify Travel to get the best travel offers and manage all your business expenses in one place.',
features: {
saveMoney: 'Save money on your bookings',
alerts: 'Get real time updates and alerts',
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be "realtime" instead of "real time". cc @jamesdeanexpensify. (Spanish can remain as it is).

() => (
<Text>
{`${translate('travel.termsAndConditions.agree')}`}
<TextLink href="https://www.spotnana.com/terms/">{`${translate('travel.termsAndConditions.travelTermsAndConditions')}`}</TextLink>
Copy link
Contributor

Choose a reason for hiding this comment

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

<Text style={styles.headerAnonymousFooter}>{`${translate('travel.termsAndConditions.title')}`}</Text>
<Text style={styles.mt4}>
{`${translate('travel.termsAndConditions.subtitle')}`}
<TextLink href="https://www.spotnana.com/terms/">{`${translate('travel.termsAndConditions.termsconditions')}.`}</TextLink>
Copy link
Contributor

Choose a reason for hiding this comment

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

</Text>
<Text style={styles.mt6}>
{`${translate('travel.termsAndConditions.helpDocIntro')}`}
<TextLink href="https://use.expensify.com/esignagreement">{`${translate('travel.termsAndConditions.helpDoc')} `}</TextLink>
Copy link
Contributor

Choose a reason for hiding this comment

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

@bfitzexpensify do we have a help article ready, even if it's empty?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, but I've added a note in https://github.com/Expensify/Expensify/issues/383227 to make a PR to update this once the Help Docs are live on ExpensifyHelp

@twisterdotcom
Copy link
Contributor

Are these links correct?
image

On oldDot the terms go to https://use.expensify.com/travelterms, so we should use that.

Looking at it now - should we link "terms & conditions" twice? Or maybe we only need to link it at the bottom with the checkbox, as we've done on oldDot:
image

I tried web, desktop and Android and those were my only comments.

@shawnborton
Copy link
Contributor

Hmm I still can't seem to get the Book travel option to show up in my global create:
CleanShot 2024-05-01 at 08 13 43@2x

But the screenshots above look good to me.

@twisterdotcom
Copy link
Contributor

Assigning @rushatgabhane to take over from SWM as contributor as SWM are out for a few days (@shubham1206agra you're still the reviewer here).

@rushatgabhane
Copy link
Member

Hello everyone 👋
I've created a new PR because i can't add commits to this one. I've applied the suggestions above.

Please review when you can - #41493

@twisterdotcom twisterdotcom merged commit bb8ad52 into Expensify:main May 3, 2024
14 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants