-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add pay button to money request header #18692
Conversation
…-18692 🍒 Cherry pick PR #18692 to staging 🍒
@iwiznia @yuwenmemon Is this expected? as per steps the header should now show "Go to the report that was created for this request, check the header does NOT show the pay button:" Recording.2755.mp4 |
@mvtglobally that is expected since the user in the video is the owner/admin of that workspace (they created the workspace). The invited user is the one who shouldn't see the pay button. |
answered in Slack |
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 1.3.15-12 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
This PR caused several invalid prop type errors. Need to be fixed as a follow-up Screen.Recording.2023-05-18.at.5.41.50.AM.mov |
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.3.15-12 🚀
|
Hey @aimane-chnaif, did you report this as a bug? I'll assign you this follow up PR if you'd like. |
@Julesssss Not reported yet. yes, I'd like to fix |
Cool, just post it in the #expensify-bugs Slack channel and link me. I'll create the issue Update: issue |
function payMoneyRequestWithWallet(chatReport, iouReport, recipient) { | ||
const {params, optimisticData, successData, failureData} = getPayMoneyRequestParams(chatReport, iouReport, recipient, CONST.IOU.PAYMENT_TYPE.EXPENSIFY); | ||
|
||
API.write('PayMoneyRequestWithWallet', params, {optimisticData, successData, failureData}); | ||
|
||
Navigation.navigate(ROUTES.getReportRoute(chatReport.reportID)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not have been removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More context please? This function among others were simplified into one payMoneyRequest
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what the design doc said: https://docs.google.com/document/d/17jFcMsAotXvsMhXivoF3u7fyzeyXkKpRGXR88Ud0oWY/edit#bookmark=kix.injnd2mh0afm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm re-adding it as a part of https://github.com/Expensify/Expensify/issues/285824, will have a PR up on there today
const selectItem = (index) => { | ||
const selectedItem = props.menuItems[index]; | ||
props.onItemSelected(selectedItem); | ||
selectedItem.onSelected(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beep boop 🤖 🐧
Dropping a friendly note here that we caused a regression - iOS - Some Popover buttons not) working
We're calling selectedItem.onSelected()
here, which is called when the MenuItem
is pressed.
For the case of 'Upload photo', 'Add attachment' etc menu items, when the button is pressed it will open another modal.
When the current PopoverMenu
modal doesn't hide completely yet, 2 modals opening at the same time will cause screen freezing in iOS, and the second modal will not show.
The fix was to call this function when the menu closes.
🚀 Cherry-picked to staging by https://github.com/AndrewGable in version: 1.3.28-2 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.3.28-5 🚀
|
anchorPosition={props.anchorPosition} | ||
anchorAlignment={props.anchorOrigin} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR caused a regression #19453
We are passing the wrong prop here anchorAlignment={props.anchorOrigin} should be anchorAlignment={props.anchorAlignment} More detail #19453 (comment)
useEffect(() => { | ||
if (!caretButton.current) { | ||
return; | ||
} | ||
caretButton.current.measureInWindow((x, y, w, h) => { | ||
setPopoverAnchorPosition({ | ||
horizontal: x + w, | ||
vertical: y + h, | ||
}); | ||
}); | ||
}, [windowWidth, windowHeight]); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This caused a regression #20262. The popover position is calculated too early at the first render where animation is not done yet (position is not stable yet).
anchorPositionVertical: domRect.top - 150, | ||
anchorPositionHorizontal: domRect.left, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Details
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/270704
PROPOSAL: GH_LINK_ISSUE(COMMENT)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
N/A Merging to get it deployed for EC3. I did a lot of testing while developing.
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android