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

Fix - Distance request thumbnail is different in reports preview when created offline #39243

Conversation

FitseTLT
Copy link
Contributor

@FitseTLT FitseTLT commented Mar 29, 2024

Details

Fixed Issues

$ #37638
PROPOSAL: #37638 (comment)

Tests

  1. Go to staging.new.expensify.com
  2. Go offline
  3. Go to workspace chat
  4. Create a distance request
  5. On the report preview check that pending map is displayed corresponding to the distance request created in (4) (instead of receipt thumbnail)
  6. Get back online and check that pending map is displayed (instead of receipt thumbnail) until the map image from server is returned
  7. And once the map image is ready it should display the map image.
  8. Now go online and create a distance request again
  9. On the report preview check a map is displayed corresponding to the distance request u created (instead of a receipt thumbnail)
  • Verify that no errors appear in the JS console

Offline tests

same

QA Steps

same

  • 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 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(themeColors.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
2024-04-11.17-04-19.mp4
Android: mWeb Chrome
and.web.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios.web.mp4
MacOS: Chrome / Safari
w.mp4
MacOS: Desktop
desk.mp4

@FitseTLT FitseTLT requested a review from a team as a code owner March 29, 2024 14:58
@melvin-bot melvin-bot bot removed the request for review from a team March 29, 2024 14:58
Copy link

melvin-bot bot commented Mar 29, 2024

@mollfpr 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 melvin-bot bot requested a review from mollfpr March 29, 2024 14:58
@mollfpr
Copy link
Contributor

mollfpr commented Apr 2, 2024

@Expensify/design May I confirm if the image map pending size looks okay on each stack? Or should we down size it based on how many the preview? Thanks!

1 Stack 2 Stack 3 Stack
Simulator Screenshot - iPhone 15 Pro 17 2 - 2024-04-03 at 02 47 34 Simulator Screenshot - iPhone 15 Pro 17 2 - 2024-04-03 at 02 47 54 Simulator Screenshot - iPhone 15 Pro 17 2 - 2024-04-03 at 02 48 08

@dannymcclain
Copy link
Contributor

We should definitely size this down... and now that I'm seeing that, I hate to stir the pot, but I'm wondering if we should update this route pending graphic to be something more in line with our other "placeholder" graphics. Something like this maybe?

image

@Expensify/design definitely want your thoughts. This is a new map icon that's not currently in the icon system.

@shawnborton
Copy link
Contributor

I can totally get down with that. I wonder if we should add a location marker shape to that icon to make it a bit more obvious what it is? As in, in its current form, the map icon is a bit abstract. So maybe a map + marker combo would be more clear?

@dubielzyk-expensify
Copy link
Contributor

Definitely agree with you, @dannymcclain , but also +1 to @shawnborton 's comment to make it more obvious.

@dannymcclain
Copy link
Contributor

@shawnborton @dubielzyk-expensify Alrighty I'm hearin' ya! Here are some options. Any winners?

image

@shawnborton
Copy link
Contributor

Oof these are all so good that the decision is quite difficult! I love 3, but it feels like it's slanted perspective kinda bunks the system a bit. So that leaves me with 2 and 4... and I think I slightly favor 2? What are you feelin' Danny?

@dannymcclain
Copy link
Contributor

Oof these are all so good that the decision is quite difficult! I love 3, but it feels like it's slanted perspective kinda bunks the system a bit. So that leaves me with 2 and 4... and I think I slightly favor 2? What are you feelin' Danny?

Solid feedback, I also really like 3 but totally agree that it doesn't quite fit in. I like 2 and 4 as well, but my slight preference goes to 4 because I like the way the location pin breaks the silhouette of the map—I think that makes it ever so slightly more readable. Let's see what Jon has to say!

(Sidenote: I think the "dot" in the location pin in option 2 needs to get a teeny bit bigger)

@dubielzyk-expensify
Copy link
Contributor

Tossup, between 2 and 4, but I think I prefer 4 cause in 2 the top of the pin lines up with the map in a way that makes it seems part of the shape of the map rather than dropped onto the map:

CleanShot 2024-04-04 at 12 38 48@2x

Talk about being nitpicky 😂 I think both are great options! ❤️

@mollfpr
Copy link
Contributor

mollfpr commented Apr 4, 2024

@dannymcclain Just want to confirm, is the icon updated only on the money preview or also on the money request page? It will be easier if we just replace the SVG Expensicons.EmptyStateRoutePending with the new one.

Money request page Confirm request page
Screenshot 2024-04-04 at 16 15 30 Screenshot 2024-04-04 at 16 15 37

@dannymcclain
Copy link
Contributor

4 takes it! Here is the icon file: Map with Location Pin.svg.zip

Here is the mock:
image

Just want to confirm, is the icon updated only on the money preview or also on the money request page? It will be easier if we just replace the SVG Expensicons.EmptyStateRoutePending with the new one.

I think we should just replace it everywhere.

@mollfpr
Copy link
Contributor

mollfpr commented Apr 5, 2024

Thank you @dannymcclain!

@FitseTLT Could you update the icon with the new one? Thanks!

@FitseTLT
Copy link
Contributor Author

FitseTLT commented Apr 5, 2024

Ok will do it on Monday 👍

@FitseTLT
Copy link
Contributor Author

FitseTLT commented Apr 8, 2024

@dannymcclain I think we need some fill color don't we?
Screenshot 2024-04-08 at 7 52 34 in the evening

@dannymcclain
Copy link
Contributor

I think we need some fill color don't we?

Definitely. I uploaded the SVG of the icon in #000 because that's how we store all our icon svgs. I think the fill should be borders / product-400 like in the other situation though.

@FitseTLT FitseTLT requested a review from a team as a code owner April 8, 2024 18:02
@FitseTLT
Copy link
Contributor Author

FitseTLT commented Apr 8, 2024

And lastly guys, what do u think about the sizes for different no of previews
Screenshot 2024-04-08 at 9 39 40 at night
Screenshot 2024-04-08 at 9 39 54 at night
Screenshot 2024-04-08 at 9 39 07 at night

@shawnborton
Copy link
Contributor

@dannymcclain what size icon are we using for the other offline states? Just wanna make sure this one matches up - at first glance it feels slightly big but maybe that's just my eyes playin' tricks on me.

Also, I wonder if we should get those into the design system file btw, since we do reference them quite often.

@FitseTLT
Copy link
Contributor Author

FitseTLT commented Apr 8, 2024

BTW the larger size is the already existing one we were using with the old icon, the only one I came up with is the smaller size. The smaller is same as what we use in confirmation page
Screenshot 2024-04-08 at 9 45 29 at night

@FitseTLT
Copy link
Contributor Author

Applied last change requested and also updated steps accordingly. @mollfpr U can proceed.

@mollfpr
Copy link
Contributor

mollfpr commented May 30, 2024

@FitseTLT Could you resolve the conflict? I'll do retest afterward.

@FitseTLT
Copy link
Contributor Author

@FitseTLT Could you resolve the conflict? I'll do retest afterward.

Done!

@neil-marcellini
Copy link
Contributor

@FitseTLT more conflicts unfortunately

@FitseTLT
Copy link
Contributor Author

@FitseTLT more conflicts unfortunately

Resolved again

Copy link
Contributor

@mollfpr mollfpr left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Screenshots/Videos

Android: Native
39243.Android.mp4
Android: mWeb Chrome
39243.mWeb-Chrome.mp4
iOS: Native
39243.iOS.mov
iOS: mWeb Safari
39243.mWeb-Safari.mov
MacOS: Chrome / Safari
39243.Web.mp4
MacOS: Desktop
39243.Desktop.mp4

@melvin-bot melvin-bot bot requested a review from neil-marcellini June 3, 2024 03:57
src/components/ConfirmedRoute.tsx Outdated Show resolved Hide resolved
src/components/ConfirmedRoute.tsx Outdated Show resolved Hide resolved
src/components/MapView/MapViewTypes.ts Show resolved Hide resolved
@FitseTLT FitseTLT requested a review from neil-marcellini June 3, 2024 19:37
Copy link
Contributor

@neil-marcellini neil-marcellini left a comment

Choose a reason for hiding this comment

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

Ok I'm happy with it now, the conversation still unresolved can be not a blocker

@neil-marcellini
Copy link
Contributor

@dannymcclain or @shawnborton would you please take a final design look?

@shawnborton
Copy link
Contributor

Design-wise I think this feels pretty good!

@dannymcclain
Copy link
Contributor

Design-wise I think this feels pretty good!

Same!

@neil-marcellini neil-marcellini dismissed dannymcclain’s stale review June 4, 2024 17:19

Danny said it looks good

@neil-marcellini neil-marcellini merged commit d7e1ecf into Expensify:main Jun 6, 2024
21 checks passed
@neil-marcellini
Copy link
Contributor

Sorry for the delay haha. I was waiting for checks to pass before merging and then forgot to click the button.

@OSBotify
Copy link
Contributor

OSBotify commented Jun 6, 2024

✋ 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 production by https://github.com/luacmartins in version: 1.4.81-11 🚀

platform result
🤖 android 🤖 failure ❌
🖥 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.

9 participants