Skip to content

[HOLD for payment 2023-09-13] [HOLD for payment 2023-09-12] [$500] BUG: [distance] request next button is hidden on small height screens #26541

Closed

Description

@neil-marcellini

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


Action Performed:

  1. Run App on latest main branch (for now)
  2. Sign in with an account on the distance requests beta (or enable all betas)
  3. Click green plus, request money, distance
  4. Enter start and finish addresses
  5. Open dev tools and set the responsive device dimensions to 400x400

Expected Result:

Let's hide the map and show the request button, unless anyone else had better ideas.

Actual Result:

The request button is hidden and you can't scroll down to it

Workaround:

Use a reasonably sized device / orientation. The only real scenario here is mobile web in landscape view.

Platforms:

Which of our officially supported platforms is this issue occurring on?
Idk let's check

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: unreleased
Reproducible in staging?: Not yet
Reproducible in production?: Not yet
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
Notes/Photos/Videos: Originally reported by Hayata in a PR review here
Expensify/Expensify Issue URL:
Issue reported by: @hayata-suenaga
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693611241072219

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0131f651439d571fb4
  • Upwork Job ID: 1697755507566587904
  • Last Price Increase: 2023-09-01

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 1, 2023
  2. melvin-bot commented on Sep 1, 2023

    @melvin-bot

    Triggered auto assignment to @CortneyOfstad (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  3. melvin-bot commented on Sep 1, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Sep 1, 2023
  5. changed the title [-]BUG: [distance] request next button is hidden on small height screens[/-] [+][$500] BUG: [distance] request next button is hidden on small height screens[/+] on Sep 1, 2023
  6. melvin-bot commented on Sep 1, 2023

    @melvin-bot
  7. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 1, 2023
  8. melvin-bot commented on Sep 1, 2023

    @melvin-bot

    Current assignee @CortneyOfstad is eligible for the External assigner, not assigning anyone new.

  9. melvin-bot commented on Sep 1, 2023

    @melvin-bot

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

  10. neonbhai commented on Sep 2, 2023

    @neonbhai
    Contributor

    Proposal

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

    [distance] request next button is hidden on small height screens

    What is the root cause of that problem?

    New Feature

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

    Solution 1:

    • We can get isExtraSmallScreenHeight using useWindowDimensions and only render MapView if the the screen is not extra small
      <View style={styles.mapViewContainer}>
      {!isOffline && Boolean(mapboxAccessToken.token) ? (
      <MapView
    const {isExtraSmallScreenHeight} = useWindowDimensions();

    and then render the mapView container conditionally:

    {!isExtraSmallScreenHeight && <View style={styles.mapViewContainer}>

    Solution 2:

    • we can add styles.displayNone to the mapViewContainer CSS itself if the view is small here:

      App/src/styles/styles.js

      Lines 3869 to 3875 in 8fbe6aa

      mapViewContainer: {
      ...flex.flex1,
      ...spacing.p4,
      ...spacing.flex1,
      minHeight: 300,
      maxHeight: 500,
      },

    What alternative solutions did you explore? (Optional)

    xx

  11. RPSanchez commented on Sep 2, 2023

    @RPSanchez

    Proposal

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

    [distance] request next button is hidden on small height screens

    What is the root cause of that problem?

    The code initially renders both the map and the request button without considering the available screen height.

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

    1. Dimensions should be imported via React Native for screen dimensions.
    import { Dimensions } from 'react-native';
    1. Screen height should then be calculated.
    const windowHeight = Dimensions.get('window').height;
    1. Conditionally render the map and request button depending on the size of the screen. If it's smaller than 400px - for example - hide the map and adjust the size of the button to fit the screen.
      <View style={[styles.flexRow, styles.justifyContentCenter, styles.pt1]}>
    2. The button size itself can further be edited via innerStyles.

    What alternative solutions did you explore? (Optional)

    Rendering exclusively the map at a certain size, with user interaction then making the request button available.

  12. 67 remaining items

  13. mananjadhav commented on Sep 27, 2023

    @mananjadhav
    Collaborator

    Yes @CortneyOfstad it includes the bonus.

  14. CortneyOfstad commented on Sep 27, 2023

    @CortneyOfstad
    Contributor

    Thanks!

    @mananjadhav @ntdiary and @allroundexperts — I've sent job offers to each of you in Upwork. Please accept them as soon as you can so I can get those paid out. Thanks for your patience with this, and always – if you have any questions, just let me know!

  15. allroundexperts commented on Sep 27, 2023

    @allroundexperts
    Contributor

    Hi @CortneyOfstad!

    I get paid through the app.

  16. CortneyOfstad commented on Sep 27, 2023

    @CortneyOfstad
    Contributor

    No worries! I've withdrawn the offer in Upwork! Feel free to make the request in the app, and let me know if any additional info is needed on my part to get that paid!

  17. CortneyOfstad commented on Sep 29, 2023

    @CortneyOfstad
    Contributor

    @ntdiary Contract has been paid, so you should be all set!

    @mananjadhav It shows that the proposal in Upwork is still waiting for you to accept — please let me know as soon as you complete this. Thank you!

  18. mananjadhav commented on Oct 2, 2023

    @mananjadhav
    Collaborator

    @CortneyOfstad I will raise the request on NewDot. No upwork needed. Also can you confirm or acknowledge the posted payout summary? I'll need it for approval on the NewDot.

  19. CortneyOfstad commented on Oct 3, 2023

    @CortneyOfstad
    Contributor

    @mananjadhav Sounds good!

    The payment breakdown is shared below:

    @allroundexperts - 750$ — TO BE PAID IN NEWDOT
    @ntdiary - 500$ (they reviewed the PR) — ALREADY PAID IN UPWORK
    @mananjadhav - 250$ — TO BE PAID IN NEWDOT

  20. CortneyOfstad commented on Oct 3, 2023

    @CortneyOfstad
    Contributor

    @mananjadhav @allroundexperts once you are both paid in NewDot, please let me know here so I can then close this out. Thanks!

  21. mananjadhav commented on Oct 3, 2023

    @mananjadhav
    Collaborator

    I think we can close once @allroundexperts has raised. I've raised my request.

  22. allroundexperts commented on Oct 3, 2023

    @allroundexperts
    Contributor

    I have raised mine as well. Thank you @mananjadhav and @CortneyOfstad!

  23. JmillsExpensify commented on Oct 5, 2023

    @JmillsExpensify
    Contributor

    $750 payment approved for @allroundexperts based on BZ summary.

  24. JmillsExpensify commented on Oct 5, 2023

    @JmillsExpensify
    Contributor

    $250 payment approved for @mananjadhav based on BZ summary.

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions