-
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
[CP Staging] Fix send button popover position #29361
[CP Staging] Fix send button popover position #29361
Conversation
@eVoloshchak Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
src/components/SettlementButton.js
Outdated
kycWallAnchorAlignment: { | ||
horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.LEFT, // button is at left, so horizontal anchor is at LEFT | ||
vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.TOP, // we assume that popover menu opens below the button, anchor is at TOP | ||
}, | ||
paymentMethodDropdownAnchorAlignment: { | ||
horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.RIGHT, // caret for dropdown is at right, so horizontal anchor is at RIGHT |
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.
@aimane-chnaif we need to have different props for both because for dropdown button (payment method options), caret is aligned at right so horizontal anchor should be right.
For button, we need the horizontal anchor alignment to be LEFT as the button is aligned towards left.
anchorAlignment={{ | ||
horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.LEFT, | ||
vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.TOP, | ||
}} |
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.
don't need to pass props unnecessarily as the default props are enough here
kycWallAnchorAlignment={{ | ||
horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.LEFT, | ||
vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.BOTTOM, | ||
}} | ||
paymentMethodDropdownAnchorAlignment={{ | ||
horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.RIGHT, | ||
vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.BOTTOM, | ||
}} |
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 button is at bottom of page so vertical anchor alignment is BOTTOM (popover above button). the horizontal anchor alignment for second one is RIGHT because caret icon is at right
kycWallAnchorAlignment={{ | ||
horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.LEFT, | ||
vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.BOTTOM, | ||
}} | ||
paymentMethodDropdownAnchorAlignment={{ | ||
horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.RIGHT, | ||
vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.BOTTOM, | ||
}} |
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.
same reason as above
kycWallAnchorAlignment, | ||
paymentMethodDropdownAnchorAlignment, |
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.
@aimane-chnaif if you have any better prop name suggestions, please let me know
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.
Fine with those namings
Please fix lint and complete author checklist |
@aimane-chnaif lint error fixed, videos uploaded for all platforms except native apps. It is taking some time to build, will upload shortly. |
Also pull main |
Can you tell me when should I pull main again into my PR branch even without conflicts? Because I just pulled it before starting this PR (2-3 hours ago) so I want to know the rationale behind it so that I can do it in future PRs as well to avoid regressions. |
The more often pulling main, the less chance of regressions. Lint error on main was fixed some min ago - #29359 |
ok will do shortly, thanks for the explanation. |
@aimane-chnaif main was merged and all videos uploaded |
@aimane-chnaif I have merged main again and tested all popovers. Can you review? |
in an hr |
@Nikhil-Vats please pull main |
@Nikhil-Vats bump, there's conflict |
@aimane-chnaif done. |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - ChromeMobile Web - Safarimsafari.movDesktopdesktop.moviOSios.movAndroid |
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.
LGTM 🎉
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.
reapproving to get engineer review
@Nikhil-Vats conflicts |
Fixing conflicts so we can get this merged |
Just retested, still looks good |
@luacmartins looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Tests passed. Not an emergency. |
Fix send button popover position (cherry picked from commit 3656ae1)
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 1.3.88-6 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/chiragsalian in version: 1.3.88-11 🚀
|
Details
Fixed Issues
$ #29332
$ #30130
PROPOSAL: #29332 (comment)
Tests
Use 2 of your accounts for testing. Login with account 1, request money in the chat by going to chat with account 2 > click on + button > Request money > Enter details and click on request money button. Afterwards login with account 2 and follow the steps below -
In the chat, click the pay button in Report Preview. The popover should open above the button. Also, click on the caret icon, the popover should open above the button too.
See screenshot to see what it should look like.
Screen.Recording.2023-10-12.at.12.17.19.AM.mov
Now, click on the report preview and in the header try clicking on the caret (dropdown icon) and the main button and make sure both popovers open below the button.
See video to see what it should look like.
Screen.Recording.2023-10-04.at.1.30.43.AM.mov
Now, go to settings > wallet. Click on transfer balance and verify that the popover opens below the transfer balance button.
See video to see what it should look like.
Screen.Recording.2023-10-04.at.1.32.07.AM.mov
Go to a 1:1 chat. Click on "+" button in composer > Send money. Enter an amount and select USD as currency. Click on next. On the final screen, at the botton, there should be a button and a caret icon, popovers for both should open above the button.
See video to see what it should look like.
Screen.Recording.2023-10-12.at.12.19.39.AM.mov
Offline tests
Same as above.
QA Steps
Same as above.
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
Android: Native
29332_android.mp4
Android: mWeb Chrome
29332_mweb_chrome.mp4
29332_mweb_chrome2.mov
iOS: Native
29332_ios.mp4
iOS: mWeb Safari
29332_mweb_safari.mp4
MacOS: Chrome / Safari
29332_web.mp4
MacOS: Desktop
29332_desktop.mp4