-
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
fix(PopoverMenu): fix opening external links #45762
fix(PopoverMenu): fix opening external links #45762
Conversation
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
@shubham1206agra 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] |
@zfurtak I am not sure what this PR is accomplishing since the given test was working fine before this PR too. |
@shubham1206agra as I was testing, it wasn't possible to open an external link from |
friendly bump @shubham1206agra 😊 |
Could you take a look @shubham1206agra? :) |
I will do this today. |
How is it going @shubham1206agra? |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-07-31.at.8.12.42.AM.movAndroid: mWeb ChromeScreen.Recording.2024-07-30.at.4.28.16.PM.moviOS: NativeScreen.Recording.2024-07-30.at.4.40.08.PM.moviOS: mWeb SafariScreen.Recording.2024-07-30.at.4.22.16.PM.movMacOS: Chrome / SafariScreen.Recording.2024-07-30.at.4.16.09.PM.movMacOS: DesktopScreen.Recording.2024-07-30.at.4.32.13.PM.mov |
Woops. Just saw Perf is failing. @zfurtak Can you please look into this? |
@shubham1206agra With @BrtqKr we tried different approaches to solve it (get rid of these additional 2 re-renders). We've tried to apply memoization and |
@shubham1206agra Android native video is missing in your checklist
Sounds like we can't avoid this. Should we update the test to expect a slower time? |
@arosiclair yes exactly, it would be perfect! |
@arosiclair Right now my android native build is not compiling. |
Not sure how to update it. Asked about that here.
Can you try fixing it? Start a thread in |
@arosiclair Uploaded the Android Native recording. |
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 👍. Per this thread we just have to merge this with the performance test failing to set a new baseline for it.
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/arosiclair in version: 9.0.16-0 🚀
|
onItemSelected(selectedItem, index); | ||
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.
The changes in this file caused a regression: #46746
I'm trying to understand this component, why do we have two callbacks when we click a menu item? onItemSelected
/ 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.
You can ignore that question, I see that they are just two "types" of callback, and in the broken flow onItemSelected(selectedItem, index)
takes care of closing the context menu (menu opened with the 3 dots), meanwhile selectedItem.onSelected?.();
is supposed to open the next confirmation modal.
I think the difference in the implementation is that now selectedItem.onSelected?.();
gets called earlier. Before it was called in the onModalHide
callback.
I see that there may be more places where you missed wrapping in this
Update: seems like in this case it is not necessary since it works well 🤷 . When is it necessary to use |
@aldo-expensify |
I believe this also caused the regression here |
🚀 Deployed to production by https://github.com/marcaaron in version: 9.0.16-8 🚀
|
Details
Fixed Issues
$#45417
PROPOSAL:
Tests
This bug is related to feature that is not yet in the app.
To check the external links functionality it's needed to change code in 1 button.
This code has to be added in
PolicyAccountingPage
(line 188)Check deatils on this branch.
Additionally it's needed to add file
.env
in the main directory with one line:Testing scenario:
Settings
->Workspaces
More features
and chooseAccounting
Xero
Sync up
Other features connected to
PopoverMenu
that are worthy to check are:Upload photo
View photo
Delete workspace
+
next to inputAdd attachments
Taxes
norTags
is not visible go toMore features
Tags
orTaxes
1 selected
Delete tag
and confirm in the next modalOffline tests
QA Steps
The external links functionality can't be tested yet. We need to wait until it's placed in the app.
Rest of the tests same like above.
It would be great to test all features that are connected to
PopoverMenu
orButtonWithDropDownMenu
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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
External link
Screen.Recording.2024-07-22.at.12.26.18.mov
Other functionalities connected to
PopoverMenu
Screen.Recording.2024-07-22.at.12.29.24.mov
Screen.Recording.2024-07-22.at.12.30.00.mov
Screen.Recording.2024-07-22.at.12.29.41.mov
Android: mWeb Chrome
External link
link.mov
Other functionalities connected to
PopoverMenu
Screen.Recording.2024-07-22.at.12.46.20.mov
Screen.Recording.2024-07-22.at.12.46.34.mov
Screen.Recording.2024-07-22.at.12.47.42.mov
iOS: Native
External link
Screen.Recording.2024-07-22.at.11.46.32.mov
Other functionalities connected to
PopoverMenu
Screen.Recording.2024-07-22.at.11.46.07.mov
Screen.Recording.2024-07-22.at.11.47.05.mov
Screen.Recording.2024-07-22.at.11.47.16.mov
1111.mov
iOS: mWeb Safari
External link
linki.mov
Other functionalities connected to
PopoverMenu
1.mov
2.mov
Screen.Recording.2024-07-22.at.11.21.34.mov
MacOS: Chrome / Safari
External link
web-90.mov
Other functionalities connected to
PopoverMenu
web-1-1.mov
web-2-2.mov
web-4-4.mov
web-5-5.mov
MacOS: Desktop
External link
link-desktop.mov
Other functionalities connected to
PopoverMenu
Screen.Recording.2024-07-22.at.12.04.50.mov
desktop.mov
desktop-avatar.mov
Screen.Recording.2024-07-22.at.12.05.00.mov