Open m-natarajan opened 2 weeks ago
Triggered auto assignment to @RachCHopkins (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.
cc @rushatgabhane on this one
Launch the app
Which app? Hybrid app?
Tap settings > Account switcher arrows
I don't know what this means.
Can we get some more detailed instructions for testing/reproducing, please?
Ok, looks like it's:
Launch the New Expensify app. Go to Settings > tap username at the top to switch accounts
I can confirm I can't scroll in the list. I'm not sure what "safe area" means, but if I try to select my own account, the app crashes.
Waiting to see what @rushatgabhane has to add here! However this is supposed to work, it's definitely not working like it should.
safe area means the area where default phone interface stuff should be (like in the screenshot, it's overlapping with the wifi symbols, etc.)\
I think we can go ahead and assign @rushatgabhane here for a solution! I can also take this on from the engineering side
@dangrous, @rushatgabhane, @RachCHopkins Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
We might want to make this external to clear @rushatgabhane's plate since a contributor should be able to propose
Job added to Upwork: https://www.upwork.com/jobs/~021831817133463086139
Current assignee @rushatgabhane is eligible for the External assigner, not assigning anyone new.
@dangrous do we need to remove @rushatgabhane?
You can use SafeAreaView property if you are working with react native
π£ @ItxAltaf! π£ Hey, it seems we donβt have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Contributor details Your Expensify account email: itxaltaf789@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~01ff545e274abdf999?mp_source=share
β Contributor details stored successfully. Thank you for contributing to Expensify!
You can add a SafeArea
widget as the scaffold body. So that AppBar and such things won't affect with the padding, it is also safe for content.
π£ @kishan-dhankecha! π£ Hey, it seems we donβt have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Contributor details Your Expensify account email: dhankechakishan@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/kishandhankecha
β Contributor details stored successfully. Thank you for contributing to Expensify!
Edited by proposal-police: This proposal was edited at 2024-09-09 08:10:33 UTC.
There is no safe area when using the account switcher and the list is not scrollable
We don't apply SafeAreaConsumer
for account switcher popover and we don't wrap this component with a ScrollView
then it's not scrollable
We can use the SelectionList
to fix both the safe area and the scroll bug.
createBaseMenuItem
that will return the item with the type ListItem
for SelectionList
. For the badge, we can return rightElement
in this function that is Badge
component with text
is additionalProps.badgeText
headerMessage
and headerMessageStyle
to SelectionList
maxHeight
style into innerContainerStyle
prop of the Popover
and pass containerStyle
prop as styles.flex0
into SelectionList
to prevent the SelectionList
take the max height of the modal.We can see the implementation details here
We can use PopoverMenu
for this case
We should update createBaseMenuItem
to return the data with the type PopoverMenuItem
When use PopoverMenu
, we should pass anchorPosition
with horizontal: 12
and vertical: 80
to match with the old position on web. Also, need to pass anchorAlignment
with vertical
as top
. For this text we can pass headerText
prop
ScrollView
and then the popover menu can be scrolledWe also need to add an extra prop to like containerStyles
for PopoverMenu
then in AccountSwitcher
we can pass the maxHeight
style as windowHeight / 2
for this view then we can dismiss the popover by clicking outside and doesn't face the safe area issue
https://github.com/user-attachments/assets/c6da2470-8715-4c18-9aff-7ccfcb067c7a
yeah let's grab another C+ so @rushatgabhane can focus on existing issues. I'll remove and then try reapplying the External label.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (External
)
@nkdengineer Thanks for the proposal. Your RCA is correct. Regarding the solution, can we use SelectionList
instead? It should cover both SafeAreaConsumer
and ScrollView
.
@s77rt I just tested, on native, it only displays the header. on Web the scroll issue isn't fixed.
@nkdengineer Can you elaborate? How come only the header is visible? You should be able to make it work. If not, can you explain the problem?
I tested with a View
that wrap the SelectionList
, if I fix the height of View
component it works on both web and native. If not the bugs I mentioned above happens.
@Expensify/design How is the account switcher list supposed to look when the list contains too many accounts?
Currently it's broken, no safearea consideration, the list is not scrollable and the popover cannot be dismissed
After fixing the safearea and the scroll issues, it will look like this but it's still not dismissible
Can we have a design view for this case? And is the push to page an option here? (like we done with the workspace switcher)
@s77rt i think there would be a max height (50% of the screen) so you can still tap outside to close the modal
I think push to page is a bit heavy for this solution - I think a majority of the use cases won't have so many copilots that it fills the screen.
I agree with the comment about making the modal have a smaller max-height though. Perhaps we cap it at something like 75% or something so there is still amply area to tap to close outside of it?
Sounds good
@nkdengineer Can you update your proposal based on the above? (and with SelectionList
)
If we're using SelectionList then keyboard should navigation should work too, right?
It'll also fix https://github.com/Expensify/App/issues/48245 then
@s77rt Update my proposal
@rushatgabhane It will not fix the arrow navigation issue because the SelectionList
arrow activation logic is based on screen focus. PopoverMenu
on the other hand works because the activation logic is based on the visibility of the modal.
PopoverMenu
may be the more appropriate option here but I think it lacks scroll support. (It also lacks the safe area support but that shouldn't be a concern anymore)
cc @nkdengineer Can you update your proposal to support keyboard navigation as well
Let me check again.
@s77rt I updated proposal with alternative solution for PopoverMenu
.
@nkdengineer Thanks for the update. The proposal overall looks good to me.
π π π C+ reviewed Link to proposal
Current assignee @dangrous is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
works for me!
π£ @nkdengineer π An offer has been automatically sent to your Upwork account for the Contributor role π Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
@s77rt The PR is ready https://github.com/Expensify/App/pull/49051.
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: 9.0.26-1 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: @AndrewGable Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1724946621382309
Action Performed:
1.Launch the app and login
Expected Result:
No display issues and modal view is scrollable
Actual Result
There is no safe area when using the account switcher
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @Issue Owner
Current Issue Owner: @s77rt