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

Landscape UI - Unable to close FAB menu and notch is blocking some content from the preferences page - Reported by: @kakajann #5926

Closed
isagoico opened this issue Oct 18, 2021 · 44 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering External Added to denote the issue can be worked on by a contributor Improvement Item broken or needs improvement. Weekly KSv2

Comments

@isagoico
Copy link

isagoico commented Oct 18, 2021

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. Navigate to LHN
  2. Open FAB menu
  3. Change orientation to landscape
  4. Change back orientation to portrait
  5. Navigate to settings
  6. Open preferences
  7. Change orientation to landscape.

Expected Result:

UI should not break after changing orientation to landscape.

Actual Result:

User is unable to exit the FAB menu in preferences some UI elements are blocked by notch.
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platform:

Where is this issue occurring?

  • iOS
  • Android

Version Number: 1.1.8-0

Reproducible in staging?: Yes
Reproducible in production?: Yes

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation
image
image

Upwork job link: https://www.upwork.com/jobs/~017190bb5038fac386

Issue reported by: @kakajann
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1634299085343500

View all open jobs on GitHub

@MelvinBot
Copy link

Triggered auto assignment to @pecanoro (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@pecanoro pecanoro removed their assignment Oct 18, 2021
@pecanoro pecanoro added Improvement Item broken or needs improvement. External Added to denote the issue can be worked on by a contributor labels Oct 18, 2021
@MelvinBot
Copy link

Triggered auto assignment to @michaelhaxhiu (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@kakajann
Copy link
Contributor

Proposal

  1. Create a new component to handle SafeArea for iPhoneX

src/components/SafeArea/index.js

const SafeArea = ({children}) => children;

export default SafeArea;

src/components/SafeArea/index.ios.js

const SafeArea = ({children}) => (
    <SafeAreaView style={[styles.iPhoneXSafeArea]} edges={['left', 'right']}>
        {children}
    </SafeAreaView>
);

export default SafeArea;
  1. Use it in App.js
<SafeArea>
    <Expensify />
</SafeArea>

This will solve the issue about blocked UI elements.

More Details

Apple suggests to use padding both sides in landscape mode on iPhoneX and this leads background color mismatch. Like this:
Screen Shot 2021-10-19 at 8 21 53 AM
and I had to set safeArea backgroundColor black. Like this:
Screen Shot 2021-10-19 at 8 24 33 AM
I don't think we can detect the orientation is left or right

@shawnborton
Copy link
Contributor

I think it looks better with the black BG.

@MelvinBot
Copy link

@michaelhaxhiu Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@MelvinBot
Copy link

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

@michaelhaxhiu
Copy link
Contributor

michaelhaxhiu commented Oct 26, 2021

Sorry on the delay guys - I got assigned this GH while I was OOO (somehow?).

I can confirm this GH is unique and reproducible. Upwork job is posted: https://www.upwork.com/jobs/~017190bb5038fac386

@MelvinBot MelvinBot removed the Overdue label Oct 26, 2021
@MelvinBot MelvinBot added Weekly KSv2 Help Wanted Apply this label when an issue is open to proposals by contributors and removed Daily KSv2 labels Oct 26, 2021
@MelvinBot
Copy link

Triggered auto assignment to @Julesssss (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@Julesssss
Copy link
Contributor

@parasharrajat I saw you added a thumbs down to the proposal above, was there a specific reason for this?

@parasharrajat
Copy link
Member

Wrapping the whole app in safe area is not a best approach.

Main LHN takes full screen ...etc. It will have side-effects.

@sidferreira
Copy link
Contributor

@parasharrajat @Julesssss is this settled? I wanted to propose a slightly different approach

@michaelhaxhiu
Copy link
Contributor

@sidferreira we are still reviewing proposals, feel free to post yours here.

@sidferreira
Copy link
Contributor

Proposal

For most solution I agree with @kakajann but instead of using it app wise, I suggest to use it screen-based, for a better UI experience. This will allow the app to have a better result depending on what side it was rotated.

For example, the issue mentioned happens only if you rotate the device to the right, not if you rotate left.
As well the problem of adding the whole app to the SafeArea causes the FAB shadow to not be complete.

So whatever changes, should make sure that the FAB shadow will render til the border of the device.

Follows some examples of the issue in different screens/orientations:

Screen Shot 2021-10-26 at 11 15 55 AM

Screen Shot 2021-10-26 at 11 15 01 AM

Screen Shot 2021-10-26 at 11 14 53 AM

I basically think that this is kinda bigger problem than just the FAB menu

@kakajann
Copy link
Contributor

I don't think wrapping the app with custom SafeArea will be bad approach. Because it works with:

  • Only on iOs devices
  • Only on iPhone X and newer models
  • Only on Landscape orientation

@sidferreira
Copy link
Contributor

@kakajann I didn't want to mention it as a "bad" approach, sorry if sounded like that. The difference is about final results. Part of the expected UI behaviours on iOS is to have the content "bleeding" behind the notch, a behaviour that I personally enjoy, that's why I suggested a different approach.

@kakajann
Copy link
Contributor

@sidferreira I was talking about @parasharrajat 's comment ) sorry I forgot to mention

@MelvinBot MelvinBot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 9, 2021
@mallenexpensify
Copy link
Contributor

@kakajann can you apply to the issue and comment here once you have?
https://www.upwork.com/jobs/~017190bb5038fac386

@kakajann
Copy link
Contributor

kakajann commented Nov 9, 2021

Just applied. I'll raise a PR in a few days

@mallenexpensify
Copy link
Contributor

Hired @kakajann in Upwork.
Reminder to self... @kakajann also reported the issue so the $250 reporting bonus is applicable

@kakajann kakajann mentioned this issue Nov 13, 2021
5 tasks
@Julesssss Julesssss changed the title Landscape UI - Unable to close FAB menu and notch is blocking some content from the preferences page - Reported by: @kakajann [Pay on Tuesday 23rd Nov] Landscape UI - Unable to close FAB menu and notch is blocking some content from the preferences page - Reported by: @kakajann Nov 16, 2021
@Julesssss
Copy link
Contributor

Merged, awaiting payment

@michaelhaxhiu
Copy link
Contributor

Bug reporting bonus = $250
Job payout = $250
Company Offsite Hold = $250

Total = $750.

Just paid it, we should be all good here.

@botify botify added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 29, 2021
@botify
Copy link

botify commented Nov 29, 2021

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.16-10 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 2021-12-06. 🎊

@botify botify changed the title [Pay on Tuesday 23rd Nov] Landscape UI - Unable to close FAB menu and notch is blocking some content from the preferences page - Reported by: @kakajann [HOLD for payment 2021-12-06] [Pay on Tuesday 23rd Nov] Landscape UI - Unable to close FAB menu and notch is blocking some content from the preferences page - Reported by: @kakajann Nov 29, 2021
@parasharrajat
Copy link
Member

parasharrajat commented Dec 1, 2021

There is a regression from this issues' PR. #6530. cc: @kakajann
Looks like the payment was made early. @michaelhaxhiu

@Julesssss
Copy link
Contributor

The early payment is my fault, I mistakenly started the 7-day countdown when the issue was merged, instead of waiting for it to be deployed.

I agree this should still be treated as a regression that should be fixed 👍

@Julesssss Julesssss reopened this Dec 1, 2021
@kakajann
Copy link
Contributor

kakajann commented Dec 1, 2021

I'll submit fixing PR asap

@parasharrajat
Copy link
Member

Thanks, @kakajann . Please request a review from me when you do and tag the other issue as well.

@botify botify added Weekly KSv2 and removed Weekly KSv2 labels Dec 8, 2021
@botify botify changed the title [HOLD for payment 2021-12-06] [Pay on Tuesday 23rd Nov] Landscape UI - Unable to close FAB menu and notch is blocking some content from the preferences page - Reported by: @kakajann [HOLD for payment 2021-12-15] [HOLD for payment 2021-12-06] [Pay on Tuesday 23rd Nov] Landscape UI - Unable to close FAB menu and notch is blocking some content from the preferences page - Reported by: @kakajann Dec 8, 2021
@botify
Copy link

botify commented Dec 8, 2021

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.18-3 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 2021-12-15. 🎊

@michaelhaxhiu
Copy link
Contributor

Is this good to close now?

@mallenexpensify mallenexpensify changed the title [HOLD for payment 2021-12-15] [HOLD for payment 2021-12-06] [Pay on Tuesday 23rd Nov] Landscape UI - Unable to close FAB menu and notch is blocking some content from the preferences page - Reported by: @kakajann Landscape UI - Unable to close FAB menu and notch is blocking some content from the preferences page - Reported by: @kakajann Dec 16, 2021
@mallenexpensify
Copy link
Contributor

Looks like it, reopen if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering External Added to denote the issue can be worked on by a contributor Improvement Item broken or needs improvement. Weekly KSv2
Projects
None yet
Development

No branches or pull requests