-
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
[HOLD for payment 2023-11-21] [$500] Wrong position of payment method dropdown menu #31069
Comments
Triggered auto assignment to @conorpendergrast ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalProblemWrong position of payment method dropdown menu Root CauseThe issue occurs because Changes Suggestedwe should follow the same pattern for setting position like we are using in const getAnchorPosition = (domRect) => {
if (props.anchorAlignment.vertical === CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.TOP) {
return {
horizontal: domRect.left + domRect.width,
vertical: domRect.top + domRect.height + CONST.MODAL.POPOVER_MENU_PADDING,
};
}
return {
horizontal: domRect.left + domRect.width,
vertical: domRect.top - CONST.MODAL.POPOVER_MENU_PADDING,
};
}
const setMenuPosition = () => {
if (!caretButton.current) {
return;
}
const buttonPosition = getClickedTargetLocation(caretButton.current);
const position = getAnchorPosition(buttonPosition);
setPopoverAnchorPosition(position);
}
useEffect(() => {
if (!isMenuVisible) {
return;
}
setMenuPosition();
}, [windowWidth, windowHeight, isMenuVisible, setMenuPosition]); |
ProposalPlease re-state the problem that we are trying to solve in this issue.Popover menu of payment method dropdown button is shown at the wrong position What is the root cause of that problem?We measure the anchor position of the popover menu below App/src/components/ButtonWithDropdownMenu.js Lines 91 to 99 in 3f2de5c
This works fine but it gives a wrong position inside the inverted flat list. In inverted Scaled measurement returns: This is the root cause What changes do you think we should make in order to solve the problem?We can simply make a upstream patch
This works as expected What alternative solutions did you explore? (Optional)We need to take this scaled result into consideration
|
This is reproducible in staging, and not in production. Can be a deploy blocker |
@s-alves10 Scanning code in RNW upgrade, I don't see any change in UIManager. |
Why used to work before RNW upgrade? |
I am fine applying patch for now to fix deploy blocker but we should fix the real root cause for sure. - var _getRect2 = getRect(node),
+ var _getRect2 = node.getBoundingClientRect(), |
I debugged the RNW and |
The |
@s-alves10 @situchan probably adding |
@situchan wdyt of changes I suggested in my proposal ? |
@s-alves10 I see that |
Sure |
I've verified that both emoji picker and dropdown button work fine with the proposed patch |
@s-alves10's proposal (main solution) looks good to me. |
Triggered auto assignment to @arosiclair, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@situchan I think we should also create upstream PR, but i feel like it might not be accepted. |
But at least we can let author know. |
@situchan there is already an issue for that necolas/react-native-web#2589 |
@arosiclair will decide whether to
|
@s-alves10 can you share how the popover will look like after applying the patch. |
|
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.98-5 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 2023-11-21. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue: |
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Looks like this didn't get switched to Daily, and it's due payment! |
I also reviewed PR |
@situchan thanks, I had missed that. Noting for my future self: I see you listed as a reviewer for the PR that caused this regression but that's from comments made two days ago, so are not relevant to this issue and don't change payment |
@s-alves10 please accept the offer! |
@getusha Can you do the C+ checklist too, please? Thank you! |
Offer accepted, thanks |
@s-alves10 any updates on the upstream PR & issue? i am sure we shouldn't be ignoring that. |
Paid! Just the C+ checklist now |
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Nice! All done, thank you everyone |
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: Dev only
Reproducible in staging?: DEV
Reproducible in production?: DEV
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: @situchan
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1699446024052489
Action Performed:
Expected Result:
Pay with expensify button appears within the card
Actual Result:
Pay with expensify button appears in the wrong position
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: @conorpendergrastThe text was updated successfully, but these errors were encountered: