[VIP-Travel] Create a New Travel Page and Terms and Conditions Modal (NewDot)#41493
[VIP-Travel] Create a New Travel Page and Terms and Conditions Modal (NewDot)#41493twisterdotcom merged 54 commits intoExpensify:mainfrom
Conversation
…vel-page-lhn Travel/travel page LHN
|
@shawnborton updated the icon size to 48 x 48
|
|
Nice, I think that looks better. What is the gap between the icon and text out of curiosity? |
|
@shawnborton it's margin 12. It should be 16, right?
|
|
Hmm can you check that the parent wrapper isn't using 40px width? I can spin up a new test build but seems like we have the same problem as before, even with the new icon size change. |
|
@dannymcclain downloaded the latest assets from figma to fix that. Nice catch!
|
|
@shawnborton looking at code, i don't think there is a parent wrapper problem. Screen.Recording.2024-05-02.at.22.30.05.mov |
|
Okay cool, maybe the illustration was just borked. Glad it's sorted! |
|
@Expensify/design according to our guidelines, the cards were meant to have |
|
I think we should, yup! This way we basically only have our simple illustrations at 48x48 in the app, anywhere they may appear. Thoughts? |
|
@twisterdotcom https://use.expensify.com/travelterms is giving 404. Can you check if the link is correct? |
|
@shubham1206agra yes that is expected. The terms page will be live in a few days |
|
@rushatgabhane Thanks. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeScreen.Recording.2024-05-03.at.11.03.48.AM.moviOS: NativeScreen.Recording.2024-05-03.at.11.16.28.AM.moviOS: mWeb SafariScreen.Recording.2024-05-03.at.10.54.44.AM.movMacOS: Chrome / SafariScreen.Recording.2024-05-03.at.10.38.08.AM.movMacOS: DesktopScreen.Recording.2024-05-03.at.11.09.26.AM.mov |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
@twisterdotcom Any specific reason why you merge this without following the process? It's missing the internal engineer to finish review it and merge it 🥲 |
| setError(false); | ||
| }, [hasAcceptedTravelTerms]); | ||
|
|
||
| const AgreeToTheLabel = useCallback( |
There was a problem hiding this comment.
Could we have used useMemo insetad of useCallback here? I am not fully sure why we need to use useCallback in this case
|
Ah sorry, I didn't realise this needed another review. Misunderstood a conversation I had with @puneetlath earlier this week, my bad. |
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.4.71-6 🚀
|
| // Styling lottie animations for the ManageTrips component requires different margin values depending on the platform. | ||
| export default function getTripIllustrationStyle(): ViewStyle { |
There was a problem hiding this comment.
@WojtekBoman Hi. I wonder why we need to add a separate style in web and native here? I see that with other illustrations, we do not need to do like this.
There was a problem hiding this comment.
This illustration is styled differently dependent on the platform, I think it might be related to the structure of this specific .lottie file, so I handled it this way. I believe it's worth checking these .lottie files for any errors. However, if you decide to do a platform-specific repair, avoid checking Platform.OS, try to deal with that as described here. This is how it looks without additional styling:
There was a problem hiding this comment.
In that particular case though, that's just an .svg and not a little file because it's a static image and not an illustration. Any reason why that isn't implemented as just a normal svg image?
There was a problem hiding this comment.
I've implemented it this way, because the component that we use to display this image it's the same which is used on pages like: About, Troubleshoot etc. and it accepts only assets in .lottie format so this solution didn't require modifying this component. But you're right, I think that we should refactor this component to allow displaying it in the future with static assets. Could you create an issue for that?
There was a problem hiding this comment.
Yeah, I really don't see a good reason why we would force a static svg to be shown as some kind of lottie file - that seems odd to me. I'll create a new issue and tag you.
There was a problem hiding this comment.
Also, does the image on the right here exist in production? Notice how the padding/spacing is off? We should fix that too.
| { | ||
| icon: Expensicons.Suitcase, | ||
| text: translate('travel.bookTravel'), | ||
| onSelected: () => interceptAnonymousUser(() => Navigation.navigate(ROUTES.TRAVEL_MY_TRIPS)), |
There was a problem hiding this comment.
Coming from #58564. We only want to navigate to the modal if travel isn't already enabled.






Details
Copied from #38469 because i can't edit that PR
Fixed Issues
$ #37102
$ #37103
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop