Skip to content

[HOLD for payment 2024-05-09] [$250] Map preview moves around when the distance expense is loading #40318

Closed

Description

@m-natarajan

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.4.62-6
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @kevinksullivan
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1713222545829489

Action Performed:

  1. Track expense
  2. Select distance
  3. Create a distance expense by entering start / end points
  4. Once landing in DM, tap around on the map

Expected Result:

The map shouldn't move around in a preview

Actual Result:

The map moves around in the preview, until the expense finishes and then it doesn't anymore

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

RPReplay_Final1713222239.MP4
Mufh1372-1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01bfeab361be7edd4a
  • Upwork Job ID: 1782710546830057472
  • Last Price Increase: 2024-04-23
  • Automatic offers:
    • jjcoffee | Reviewer | 0
    • bernhardoj | Contributor | 0
Issue OwnerCurrent Issue Owner: @anmurali

Activity

  1. added
    Daily
    Bug
    on Apr 16, 2024
  2. melvin-bot commented on Apr 16, 2024

    @melvin-bot

    Triggered auto assignment to @anmurali (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. bernhardoj commented on Apr 17, 2024

    @bernhardoj
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    We can move around the map after creating a new track distance.

    What is the root cause of that problem?

    This started to happen after this PR where we add a map view component to preview the distance map while waiting for the BE to give us the map preview in image form.

    {showMapAsImage && (
    <View style={styles.reportActionItemImages}>
    <ConfirmedRoute transaction={transaction} />
    </View>
    )}

    Because we are using the map view component, the user can interact with the map as they do on the distance request page.

    After the BE sends us the image, we render the image instead of the map view.

    What changes do you think we should make in order to solve the problem?

    We need to disable the map interactivity when showing it as a preview only. We can do that by:

    1. Pass a new prop to ConfirmedRoute > DistanceMapView called interactive.
    2. In MapView.website.tsx, set interactive props of Map to the interactive props we pass.
    <Map interactive={interactive} ...
    
    1. In MapView.tsx, since rnmapbox doesn't support the interactive props, we can disable it by appending the style to include pointerEvents: none to the View wrapper.
      <View style={style}>
      <Mapbox.MapView
    <View style={[style, interactive ? {pointerEvents: 'none'} : {}]}>
    

    Or we can have the same implementation for both platforms by passing a style of pointerEvents: none directly from ConfirmedRoute.

  4. melvin-bot commented on Apr 22, 2024

    @melvin-bot

    @anmurali Huh... This is 4 days overdue. Who can take care of this?

  5. added
    External
    on Apr 23, 2024
  6. changed the title [-]Map preview moves around when the distance expense is loading[/-] [+][$250] Map preview moves around when the distance expense is loading[/+] on Apr 23, 2024
  7. melvin-bot commented on Apr 23, 2024

    @melvin-bot
  8. added
    Help Wanted
    on Apr 23, 2024
  9. melvin-bot commented on Apr 23, 2024

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (External)

  10. 15 remaining items

  11. changed the title [-][$250] Map preview moves around when the distance expense is loading[/-] [+][HOLD for payment 2024-05-09] [$250] Map preview moves around when the distance expense is loading[/+] on May 2, 2024
  12. removed
    Reviewing
    on May 2, 2024
  13. melvin-bot commented on May 2, 2024

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  14. melvin-bot commented on May 2, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.69-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2024-05-09. 🎊

    For reference, here are some details about the assignees on this issue:

  15. melvin-bot commented on May 2, 2024

    @melvin-bot

    BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

    • [@jjcoffee] The PR that introduced the bug has been identified. Link to the PR:
    • [@jjcoffee] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
    • [@jjcoffee] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
    • [@jjcoffee] Determine if we should create a regression test for this bug.
    • [@jjcoffee] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
    • [@anmurali] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  16. anmurali commented on May 6, 2024

    @anmurali

    @jjcoffee - can you add regression steps? Payment not due till the 9th.

  17. added
    Daily
    and removed
    Weekly
    on May 8, 2024
  18. melvin-bot commented on May 13, 2024

    @melvin-bot

    @anmurali, @jjcoffee, @stitesExpensify, @bernhardoj Eep! 4 days overdue now. Issues have feelings too...

  19. jjcoffee commented on May 14, 2024

    @jjcoffee
    Contributor

    Regression Test Proposal

    1. Open an existing expense report
    2. Create a new distance request
    3. Drag around the money request map preview
    4. Verify the map doesn't move
    5. Press the preview to open the transaction thread
    6. Drag around the map preview
    7. Verify the map doesn't move

    Do we agree 👍 or 👎

  20. anmurali commented on May 15, 2024

    @anmurali

    Paid, added regression test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions