-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Call Options menu doesn't dynamically scale/position when the window size is changed #2517
Comments
Posted to Upwork today. |
Triggered auto assignment to @tgolen ( |
The solution to this issue to update option box
and VIDEO
Thanks |
@aliabbasmalik8 Can you please update your proposal to conform to our cross-platform strategy (which can be found in the README of the repo). Also, are there any performance concerns with your solution, and should it maybe use throttling or debouncing? |
@tgolen Here is another solution We need to just update
according to this solution, we have no need for this function as well as no need VIDEO:
NOTE: Can update this solution #2517 (comment) according to your requirements but I think the new solution is more accurate. |
@Luke9389 Would you mind chiming in on the above proposal to see what you think since you originally wrote some of this? |
Just a few thoughts, I think the solution to this issue should be applied to POPOVER. So that it works for all menus like this.
|
Yes we can add default values in |
When I wrote this we were aware of this issue and decided to leave it. @roryabraham and I had discussed refactoring our popover menus and knew that this would be addressed then. @aliabbasmalik8's most recent proposal resembles my initial approach to this problem. We sided against that because it absolutely positions the menu on the screen rather than "attaching" the menu to the button. I think we should close this issue and address this on an Internal PR to refactor all of our Popover Menus. I know this is something @roryabraham had expressed interest in doing. |
@roryabraham what are your thoughts on this? How involved would it be to refactor the popovers? What would the refactor be doing? |
Sorry, meant to reply to this yesterday. The idea behind the refactoring @Luke9389 is referring to would be to create a generic menu component which would be reused between the In regards to this issue, I think it can still be external. The task at hand is to remeasure the position of the Popovers' anchor point when the window dimensions change, and to then pass the updated I think that the best solution here is to refactor |
That means that I don't think the solution to this can be applied in the |
Looking into it some more, we could probably still do the generic menu component refactoring like @Luke9389 and I talked about – basically take |
Yeah.
|
It's possible, yes, but that seems quite convoluted to me.
There is also the concern that we don't want to create a bunch of duplicate
Of course, I agree debouncing would be good. I suggested 200ms because my rule-of-thumb (taken from some random StackExchange thread) is that it takes 250ms for the human eye to register visual changes/movement, so 200ms is as infrequent a debounce as possible to still have changes appear instant. |
I really like the idea of storing this data in Onyx and let components subscribe to it whenever they need it. I like the debouncing idea as well. The way I think that could work is like this:
Yeah? |
I think it would be overkill. Any specific reason for sure keeping it in persistent storage? Instead, create a top-level provider for Dimensions and consuming it in |
@parasharrajat For now, Another alternate solution would be to use some other mechanism for global event emission, such as Node.js' |
Looking for an update as 1 week as elapsed, which means the job is now priced at $500.00 (instead of the original $250.00). 💰 @aliabbasmalik8 and @parasharrajat, do either of you intend to take this job using the latest |
@michaelhaxhiu I think someone is already working on this one so I didn't pick it. I can look at it today. |
@parasharrajat I'm certain this job is not yet assigned. 😺
|
@michaelhaxhiu |
@aliabbasmalik8 no problem and thanks for being responsive. In case you are interested in working another job, please take a look at our Upwork job list. @parasharrajat I'm going to assign you and hire you in Upwork, can you please send an offer on the post here? |
@michaelhaxhiu All set. |
Hired ✅. Feel free to start on a PR in the next few days @parasharrajat |
Hello, Sorry I missed this conversation, but I just want to chime in here because I'm a little lost on a few points:
Separately, there is another contributor working on debouncing Looking at the PR I think all we really needed to do here was:
Can we please try that simple solution first and see if there are any negative effects? |
@marcaaron Agree.
Waiting for others' input... |
FWIW there was some previous conversation about refactoring |
I agree with @marcaaron this is purely UI related and does not need to be persisted each time dimension change I don't know the exact intention for Onyx but typically you would store app state that you cannot derive from somewhere else Being a react-native app - JS time is precious - no matter how fast Onyx becomes it's seems unnecessary to move this handling there:
|
I think this was the best idea so far. And it's exactly how Material-UI have interfaced it - providing a ref to a element makes sure the popup always points to that element: https://material-ui.com/components/popover/#anchor-playground and accounts for resizes as well as the item getting moved to a completely different location due to layout changes I'm optimistic there would be a react-native library for this exact purpose so that it doesn't have to be coded in E.cash |
Everyone has different opinions but at last, the best would be the one that the team understands and like to maintain it. |
There was a lot of discussion around why we did not use this library (or another), so we are unlikely to revisit it at this point. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Upwork job link - https://www.upwork.com/jobs/~01ba0dff1eec1e5790
Expected Result:
When you resize the Expensify Cash window, the Call Options menu should dynamically scale within the window.
Actual Result:
When you resize the Expensify Cash application, the Call Options menu does not properly scale with the window. Sometimes it gets cut off, the position is off, and the spacing is wrong.
Action Performed:
Workaround:
Platform:
Where is this issue occurring?
Version Number: tested most recently on 1.0.22-1 (1.0.22-1)
Notes/Photos/Videos: See GIF recording below:
Expensify/Expensify Issue URL: https://github.com/Expensify/Expensify/issues/159934
View all open jobs on Upwork
The text was updated successfully, but these errors were encountered: