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

[$2000] iPad - UI Inconsistency of the popover menus - reported by @Santhosh-Sellavel #7375

Closed
mvtglobally opened this issue Jan 25, 2022 · 127 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Reviewing Has a PR in review

Comments

@mvtglobally
Copy link

mvtglobally commented Jan 25, 2022

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. Open app on a iPad
  2. Navigate to "+"
  3. The Popover menu shows on the left side of the screen

Expected Result:

On wide iPad devices, the popover menu is shown at the bottom left of the screen

Actual Result:

On wide iPad devices, the popover menu should show inline with the current modal on the right side of the screen, just as web and Desktop does:

Screenshot_1668176045

Additional areas where issue is occurring

  • Compose Attachment options
  • Call Options
  • Message Context Options
  • Workspace ( Three dots) More Menu Options
  • Add Payment Options
  • Add/Edit Photo Options for Workspace & User Profile.
  • Transfer Balance Options

Workaround:

unknown

Platform:

Where is this issue occurring?

  • iOS

Version Number: 1.1.32-0
Reproducible in staging?: Y
Reproducible in production?: Y
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Screen Shot 2022-01-24 at 10 42 24 PM

Simulator.Screen.Recording.-.iPad.Pro.11-inch.3rd.generation.-.2022-01-04.at.22.26.20.mp4

Expensify/Expensify Issue URL:
Issue reported by: @Santhosh-Sellavel
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1641315894001600

View all open jobs on GitHub

@MelvinBot
Copy link

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

@Gonals Gonals added Weekly KSv2 Improvement Item broken or needs improvement. Daily KSv2 External Added to denote the issue can be worked on by a contributor and removed Daily KSv2 Improvement Item broken or needs improvement. labels Jan 25, 2022
@MelvinBot
Copy link

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

@MelvinBot MelvinBot removed the Weekly KSv2 label Jan 25, 2022
@Gonals
Copy link
Contributor

Gonals commented Jan 25, 2022

Setting labels and sending to the pool!

@srdjanrist
Copy link

srdjanrist commented Jan 25, 2022

Proposal

Add prop fromSidebarMediumScreen={!this.props.isSmallScreenWidth} to all Popover components, wherever the issue was noticed.
E.g. ReportActionCompose (line 564)

This way, on iPad (which has width around 834px) it will behave as on browser, since it falls in category of medium screens.

@MelvinBot MelvinBot removed the Daily KSv2 label Feb 14, 2022
@MelvinBot
Copy link

This issue has not been updated in over 14 days. eroding to Weekly issue.

2 similar comments
@MelvinBot
Copy link

This issue has not been updated in over 14 days. eroding to Weekly issue.

@MelvinBot
Copy link

This issue has not been updated in over 14 days. eroding to Weekly issue.

@MelvinBot MelvinBot added the Weekly KSv2 label Feb 14, 2022
@MelvinBot
Copy link

This issue has not been updated in over 14 days. eroding to Weekly issue.

6 similar comments
@MelvinBot
Copy link

This issue has not been updated in over 14 days. eroding to Weekly issue.

@MelvinBot
Copy link

This issue has not been updated in over 14 days. eroding to Weekly issue.

@MelvinBot
Copy link

This issue has not been updated in over 14 days. eroding to Weekly issue.

@MelvinBot
Copy link

This issue has not been updated in over 14 days. eroding to Weekly issue.

@MelvinBot
Copy link

This issue has not been updated in over 14 days. eroding to Weekly issue.

@MelvinBot
Copy link

This issue has not been updated in over 14 days. eroding to Weekly issue.

@SofiedeVreese
Copy link
Contributor

Oh shit this one slipped through the cracks bc I was unassigned. @Gonals did you want this pushed externally?

If so I'll assign myself.

@Julesssss
Copy link
Contributor

@parasharrajat hmm, yes that is a great point. So I believe we would expect the following:

Screenshot 2022-11-14 at 15 45 18

@melvin-bot melvin-bot bot removed the Overdue label Nov 14, 2022
@parasharrajat
Copy link
Member

Yeah for all menus. For example, add attachment menu as well.

@Santhosh-Sellavel
Copy link
Collaborator

Yes, that would be the ideal solution!

@aitoraznar
Copy link

Hi. How do you usually proceed with this?. You develop it internally? Create a new ticket? This issue is still valid?

@parasharrajat
Copy link
Member

The issue is still valid and open for proposals. @Julesssss Can you please update the Expected result section?

@aitoraznar
Copy link

Proposal

Some changes need to be made in some components: Popover.native to set as Popover in medium devices (Ipad/tablets), And calculate the popover position in AttachmentPicker, ReportActionCompose and AddPaymentMethodMenu.

Some areas such as Call Options and Add/Edit Photo Options for User Profile don't need any code changes. Will check other areas if my proposal is accepted.

Video of my working branch
https://user-images.githubusercontent.com/2470879/201991522-b0550ad0-7b0a-4a47-a650-7eb4d18d78b6.mp4

@parasharrajat
Copy link
Member

parasharrajat commented Nov 15, 2022

@aitoraznar I need more details for considering your proposals. Though, I have a question for you.

How will you tackle the dynamic positioning?
To test this:

  1. Go to Settings> payments on staging (staging.new.expensify.com).
  2. Add a bank account. (make sure you are in the plaid sandbox, otherwise, set use Staging server from the preferences page)
  3. Then open the app on Tablet|iPAD.
  4. login with the same account.
  5. Go to payments page.
  6. Click on any added payment method.

@aitoraznar
Copy link

Hi. The positioning is relative to the button, so working well on landscape.

How I can add a dummy Bank account? I'm pretty new to the project, tons of documentation...

Screenshot 2022-11-15 at 19 23 31

Many thanks

@parasharrajat
Copy link
Member

parasharrajat commented Nov 15, 2022

If you follow the step above you should be good with it. Notice I mentioned adding the account from the web app as Native currently uses PROD API. Plaid flow is pretty easy just keep continue to next steps.

let me know if you are stuck at some step.

@aitoraznar
Copy link

aitoraznar commented Nov 15, 2022

Hi @parasharrajat. Any idea why the "getClickedTargetLocation" method would not work properly on Native events? It is not getting the position of the clicked element.

Any related issue apart from https://github.com/Expensify/App/issues?q=getClickedTargetLocation ?

Screenshot 2022-11-15 at 22 01 06

Finally added a Paypal account to test the Payment methods.

thanks

@parasharrajat
Copy link
Member

It is not implemented on native https://github.com/Expensify/App/blob/main/src/libs/getClickedTargetLocation/index.native.js

@aitoraznar
Copy link

Hi @parasharrajat.

** Proposal update**

I implemented the "getClickedTargetLocation" using the "measureInWindow" method used in other parts of the app.

Screenshot 2022-11-16 at 11 10 39

Video of the implementation
https://user-images.githubusercontent.com/2470879/202152733-6a75b90a-370c-4e4e-a3af-610bdb83f2d3.mp4

Look at the render blink when pressing "change profile photo", only happens on landscape. Any clue about this?

Many thanks

@parasharrajat
Copy link
Member

No idea, I am expecting a solution via proposals.

  1. How will you reduce the delay that is taken for the menu to open?
  2. There is a small flicker when we open attachment menu on composer, how will you solve it?

@aitoraznar
Copy link

Hi @parasharrajat.

About your questions:

  1. How will you reduce the delay that is taken for the menu to open?

I don't see what are you referring to. Can you say to me in which exact second of the video is happening?

  1. There is a small flicker when we open attachment menu on composer, how will you solve it?

Fixed. It was the position being used from an old state when opening different popovers on that page. To reproduce it we had to press the "Add Payment" button and then "Existent Payment" button.

Updated video
https://user-images.githubusercontent.com/2470879/202235862-3834ee90-3eae-4fb9-9645-6d2b7dbbc201.mp4

Many thanks

@parasharrajat
Copy link
Member

parasharrajat commented Nov 16, 2022

Can you say to me in which exact second of the video is happening?

0.27 on the first video. It takes a bit of time to open as the measure takes time to resolve and it is async.

Can you please lay down the changes you would do?

@aitoraznar
Copy link

aitoraznar commented Nov 16, 2022

Hi. The button works fine with the latest changes.

Proposal

  • Change the modal type from "BOTTOM_DOCKER" to "POPOVER" for medium/large native devices
  • Implement "getClickedTargetLocation" method for native devices
  • Position the "Message Context Options" popup
  • Position the "Add attachment" popup
  • Position the "Add Payment Options" popup
  • Position the "Avatar photo " popup for Workspace & User Profile
  • Position the "Transfer Balance Options" popup
  • No changes in "Call Options" popup
  • No changes in "Workspace ( Three dots) More Menu Options" popup

Many thanks

@parasharrajat
Copy link
Member

parasharrajat commented Nov 16, 2022

It would help us if you can explain the changes you would do to the app for this issue. You have still not explained how will you solve the challenges that I mentioned above.

Links:

I would recommend checking out some previous jobs, which already got a contributor assigned to see how they posted the proposals. There is also this part in our contributor guidelines which you might find useful.

Please, also share the exact changes in code you had to make to fix this issue. You can see from all the other issues and contributors that we won't just take the code and run away, no need to worry about that :)

Thank you!

@aitoraznar
Copy link

Hi. Same steps as the last message but with code.

Proposal

  1. Change the modal type from "BOTTOM_DOCKER" to "POPOVER" for medium/large native devices

Screenshot 2022-11-16 at 22 29 15

  1. Implement "getClickedTargetLocation" method for native devices

Screenshot 2022-11-16 at 22 29 54

Screenshot 2022-11-16 at 22 29 45

  1. Position the "Message Context Options" popup
    github com_Expensify_App_compare_main aitoraznar_feature_ipad_popover_7375_expand=1 (1)

  2. Position the "Add attachment" popup

Screenshot 2022-11-16 at 22 29 37

  1. Position the "Add Payment Options" popup
    github com_Expensify_App_compare_main aitoraznar_feature_ipad_popover_7375_expand=1

  2. Position the "Avatar photo " popup for Workspace & User Profile

Screenshot 2022-11-16 at 22 29 29

  1. Position the "Transfer Balance Options" popup
    github com_Expensify_App_compare_main aitoraznar_feature_ipad_popover_7375_expand=2

Many thanks

@parasharrajat
Copy link
Member

parasharrajat commented Nov 17, 2022

The code is looking good. As I worked on this task earlier, there were a few challenges.

We are using measureInWindow in Implement "getClickedTargetLocation" method for native devices. It delays the menu opening after you click the button. You can also see this in your videos. How will you solve this?

this is where I got stuck earlier.

@aitoraznar
Copy link

aitoraznar commented Nov 17, 2022

Hi @parasharrajat. I don't came up with an alternative to measureInWindow.
I suggest to calculate the Popup positions on the background once the page is loaded. This would not affect the page time load and the position will be already calculated before he user try to press the buttons.

@parasharrajat
Copy link
Member

I suggest to calculate the Popup positions on the background once the page is loaded.

Ok. What about the menus of dynamic anchors? Let's say the anchor move position. This can be observed on the payment method list. I onLayout does not work well. It does not fire all the time in Animatable Views.

@JmillsExpensify
Copy link

@Julesssss To help clear out the extensive backlog of /App bugs, we're putting the spotlight on all bugs older than 4 weeks old. To help unblock the roadmap and get our bug pipeline back in equilibrium, can you:

  • Decide whether any proposals currently meet our guidelines and can be approved as-is
  • For any that can't, please take this issue internal and treat it as one of your highest priorities
  • If you have any questions, don't hesitate to start a discussion in #bug-zero

Thanks everyone!

@aitoraznar
Copy link

Hi @parasharrajat, I was investigating about your suggestion.
Some buttons are created inside components with the only responsibility to render them. We need to propagate somehow the list of buttons to the parent containing the Popover, creating a Context of more callbacks.
We would have to made a lot of changes to be able to pre-calculate positions on dynamic buttons.
I think It will mess the code and the code will be less maintainable if we do that.

Using measureInWindow we have that little trade off of the Popover lasting a little longer to show. Do you think the current speed is enough to have a responsive UX?

Video with the current speed:
https://user-images.githubusercontent.com/2470879/202750481-90473de6-31aa-468b-966d-77fa16747f5e.mp4

@JmillsExpensify
Copy link

Based on our discussion in the community, I'm going to close this issue. Given that tablets are not an officially supported platform, this issue is more accurately a new feature request than a bug. Closing.

@JmillsExpensify JmillsExpensify closed this as not planned Won't fix, can't repro, duplicate, stale Nov 18, 2022
@JmillsExpensify JmillsExpensify unpinned this issue Nov 18, 2022
@aitoraznar
Copy link

Hi @parasharrajat. Can you update to me the status of the issue?. You said to me this issue was still valid and It wasn't to be developed internally.

Many thanks.

@parasharrajat
Copy link
Member

It was valid when I mentioned but internal priorities can change.

Recently, we are focusing on a major milestone of the project. Due to there being many issues with iPad and Tablets which aren't focusing, we decided to postpone all issues related to Tablets and iPad.

We may reopen this in future but currently no one is working on this.

@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Apr 25, 2023
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 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests