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

[$250 - WAITING FOR PAYMENT] IOS - Submit expense - Next button not fully visible after returning online #41810

Closed
1 of 6 tasks
lanitochka17 opened this issue May 7, 2024 · 106 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review

Comments

@lanitochka17
Copy link

lanitochka17 commented May 7, 2024

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.71-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Open the app and log in
  2. Disable internet connection
  3. Tap FAB > Submit expense
  4. Select any tab, e.g. Distance (the same for manual and scan request)
  5. Return online

Expected Result:

The Next button is fully visible

Actual Result:

Only the top of the Next button is visible. It is reproducible with Manual and Scan tabs

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

Bug6474132_1715107077940.IMG_6781.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f1a3e2d4eb573fb6
  • Upwork Job ID: 1788618114597507072
  • Last Price Increase: 2024-08-08
  • Automatic offers:
    • QichenZhu | Contributor | 103491055
Issue OwnerCurrent Issue Owner: @eVoloshchak
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 7, 2024
Copy link

melvin-bot bot commented May 7, 2024

Triggered auto assignment to @sonialiap (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.

@lanitochka17
Copy link
Author

@sonialiap FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@lanitochka17
Copy link
Author

We think that this bug might be related to #wave-collect - Release 1

@neonbhai
Copy link
Contributor

neonbhai commented May 7, 2024

Proposal

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

Next button not fully visible after returning online

What is the root cause of that problem?

StepScreenWrapper by default adds safeAreaPaddingBottom that overlaps the bottom button in request pages

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

We will pass includeSafeAreaPaddingBottom={false} to StepScreenWrapper in affected pages in IOU request steps.

@sonialiap sonialiap added the External Added to denote the issue can be worked on by a contributor label May 9, 2024
Copy link

melvin-bot bot commented May 9, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01f1a3e2d4eb573fb6

@melvin-bot melvin-bot bot changed the title IOS - Submit expense - Next button not fully visible after returning online [$250] IOS - Submit expense - Next button not fully visible after returning online May 9, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 9, 2024
Copy link

melvin-bot bot commented May 9, 2024

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

@samilabud
Copy link
Contributor

samilabud commented May 12, 2024

Proposal

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

Native small screens - Submit expense - Next button not fully visible after returning online

What is the root cause of that problem?

Currently when we are using "small screens" (or native screens) the MapView try to use the space available to render itself, this space is calculated by the ScreenWrapper component based in the initialHeight (in this case) and the children components.

The issue is for native screens when we render the map the first time (when online) we take the all available space, but then when we go offline we show/render an offline indicator, this makes the available height reduced (so we see the map pending indicator a bit short than the map), then when we go online the map try to recover its original height (but now we have less height space due the offline indicators) and move down the next button.

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

We should set the height of each container with percents to fix this issue in IOURequestStepDistance and also in MoneyRequestAmountForm, to keep next button aligned.

The changes should be in

<View style={styles.flex1}>

<View style={Platform.OS === 'web' ? styles.flex1 : [styles.dBlock, styles.w100, {height: '85%'}]}>

And in

<View style={[styles.w100, styles.pt2]}>

<View style={(styles.dBlock, styles.w100, styles.pt2, Platform.OS !== 'web' ? {height: '15%'} : {})}>

Also in

<View
onMouseDown={(event) => onMouseDown(event, [NUM_PAD_CONTAINER_VIEW_ID, NUM_PAD_VIEW_ID])}
style={[styles.w100, styles.justifyContentEnd, styles.pageWrapper, styles.pt0]}
id={NUM_PAD_CONTAINER_VIEW_ID}
>

<View
                onMouseDown={(event) => onMouseDown(event, [NUM_PAD_CONTAINER_VIEW_ID, NUM_PAD_VIEW_ID])}
                style={[styles.w100, styles.justifyContentEnd, styles.pageWrapper, styles.pt0, Platform.OS !== 'web' ? [styles.dBlock, styles.w100, {height: '40%'}] : {}]}
                id={NUM_PAD_CONTAINER_VIEW_ID}
            >

And finally in

<View style={styles.w100}>
:

<View style={[styles.w100, Platform.OS !== 'web' ? {height: '40%'} : {}]}>

This way we going to force to react native to recalculate the height of the component even when offline indicator are not displayed (when they doesn't exists in the rendered components).

Tests:

Before changes:

Map.view.overlap.next.button.-.test.before.changes.mp4

After changes

next.button.moved.test.mp4

@melvin-bot melvin-bot bot added the Overdue label May 12, 2024
Copy link

melvin-bot bot commented May 14, 2024

@eVoloshchak, @sonialiap Huh... This is 4 days overdue. Who can take care of this?

@sonialiap
Copy link
Contributor

@eVoloshchak what do you think of the above proposal?

Copy link

melvin-bot bot commented May 16, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented May 16, 2024

@eVoloshchak, @sonialiap 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@eVoloshchak
Copy link
Contributor

@neonbhai, I've applied your proposal to IOURequestStepDistance, but it doesn't resolve the issue, could you re-test this please?

@samilabud, thank you for the thorough explanation!

We should determinate in IOURequestStepDistance if we are using small screens and if so calculate the height of the map based in percent of the screen height resting the height of the offline indicator to guarantee the space height when the map hide/show (re-renders)

Can we make the map view fill all the available space?
The problem with calculating its height manually is it's prone to breakage in the future. If we change the font size, number of lines, height of offline indicator, or add another button below the map view - the calculation will become wrong

@melvin-bot melvin-bot bot removed the Overdue label May 17, 2024
@samilabud
Copy link
Contributor

The problem with calculating its height manually

Good point, I will try to do a formula to calculate the height based to the current calculation that we do in ScreenWrapper, this way I think this going to persist good in the future.

@samilabud
Copy link
Contributor

Can we make the map view fill all the available space?

At the end the only way I found was using flexbox, I have updated my proposal, please check it out 🙏🏼:

Updated

Copy link

melvin-bot bot commented May 20, 2024

@eVoloshchak, @sonialiap Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label May 20, 2024
@eVoloshchak
Copy link
Contributor

eVoloshchak commented May 21, 2024

@jscoder2151, I've applied your solution, but it seems there is an issue with the Next button placement

Screenshot

Simulator Screenshot - iPhone 15 Pro - 2024-05-21 at 18 39 13

@melvin-bot melvin-bot bot removed the Overdue label May 21, 2024
@eVoloshchak
Copy link
Contributor

@samilabud, same issue with your updated proposal, I do think this might be due to recent changes to Forms component on main
Could you double-check your proposals with the latest sources from main please?

Screenshots

Simulator Screenshot - iPhone 15 Pro - 2024-05-21 at 18 50 23
Simulator Screenshot - iPhone 15 Pro - 2024-05-21 at 18 50 12

Copy link

melvin-bot bot commented May 21, 2024

@eVoloshchak @sonialiap this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@samilabud
Copy link
Contributor

Could you double-check your proposals with the latest sources from main please?

Thank you for checking out, definitely there was a change I have updated my proposal and there are new tests videos.

Also I created this draft if helps: #42442

@sonialiap
Copy link
Contributor

@VictoriaExpensify I'm OOO Aug 19-30, adding leave buddy.
Status: I think we're getting close to payment

Copy link

melvin-bot bot commented Aug 23, 2024

@eVoloshchak, @Julesssss, @sonialiap, @VictoriaExpensify, @QichenZhu Whoops! This issue is 2 days overdue. Let's get this updated quick!

@QichenZhu
Copy link
Contributor

react-native-pager-view 6.3.4 has an issue callstack/react-native-pager-view#836 (comment) on Android and there is an open PR #47948.

Please let me know if we should roll back the upgrade and use patch-package instead, or if there's something else I can do to help.

Copy link

melvin-bot bot commented Aug 26, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Aug 26, 2024
@sonialiap
Copy link
Contributor

@Julesssss thoughts on this having a regression?

@Julesssss
Copy link
Contributor

Hey @sonialiap, I don't think we need a test for this specific case

@sonialiap
Copy link
Contributor

@Julesssss sorry, I was unclear. This issue is linked to a deploy blocker so I was looking to clarify if this issue had a regression

@Julesssss
Copy link
Contributor

@sonialiap I don't think so. So @QichenZhu's proposal was correct, but due to other bugs in the upstream library (and a combination of the large RN version bump) we had to revert the change. I think the next step should be to decide on one of the following options:

@QichenZhu does the first option sound good to you? If so we can double the bounty due to the time/effort spent on this issue.

@QichenZhu
Copy link
Contributor

@Julesssss Yes, I'm happy to go with the first option. Thank you very much!

@sonialiap
Copy link
Contributor

Thanks, Jules :)

@VictoriaExpensify VictoriaExpensify removed their assignment Sep 11, 2024
@QichenZhu
Copy link
Contributor

#48169 already bumped the library version, so no PR is needed here.

@sonialiap
Copy link
Contributor

@Julesssss Qichen mentioned that the library was bumped. What should be the next step? Do we need to re-attempt the fix for this issue, or do we need to test to see if the issue was resolved with the upstream update?

@Julesssss
Copy link
Contributor

Do we need to re-attempt the fix for this issue, or do we need to test to see if the issue was resolved with the upstream update?

Lets test to see if the issue has been resolved.

It looks fixed to me on Android, I'll test my iOS device in a few hours once it's charged.

@Julesssss
Copy link
Contributor

IMG_D9016DD29219-1

iOS looks good too

@Julesssss Julesssss reopened this Sep 23, 2024
@Julesssss
Copy link
Contributor

Julesssss commented Sep 23, 2024

I forgot about payment, I think we can ignore the 7 day hold

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Sep 27, 2024
Copy link

melvin-bot bot commented Sep 27, 2024

This issue has not been updated in over 15 days. @eVoloshchak, @Julesssss, @sonialiap, @QichenZhu eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@Julesssss Julesssss changed the title [$250] IOS - Submit expense - Next button not fully visible after returning online [$250 - WAITING FOR PAYMENT] IOS - Submit expense - Next button not fully visible after returning online Sep 30, 2024
@Julesssss Julesssss added Daily KSv2 and removed Monthly KSv2 labels Sep 30, 2024
@Julesssss
Copy link
Contributor

@sonialiap I think we are good to pay out

@sonialiap
Copy link
Contributor

Thanks @Julesssss!

@sonialiap
Copy link
Contributor

Payment summary:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review
Projects
Status: Done
Development

No branches or pull requests