-
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
[$1000] App doesn't open a new tab when clicking on a URL of staging on production #22523
Comments
Triggered auto assignment to @adelekennedy ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.App doesn't open a new tab when clicking on a URL of staging on production What is the root cause of that problem?In App/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js Lines 29 to 33 in b9f1d47
We're opening the link internally if the url has the same origin with staging link (https://staging.new.expensify.com) or production link (https://new.expensify.com) App/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js Lines 51 to 54 in b9f1d47
What changes do you think we should make in order to solve the problem?We should create a new function to check internal origin On website platforms
On others platforms, we don't have window.location.origin and I think we shouldn't open link internally on native/desktop platform if the hostname is localhost. That why I want to preserve the current main logic here
and change this line
to
Unfortunately, the current Change URL_WEBSITE_REGEX to MARKDOWN_URL_REGEX, ResultScreen.Recording.2023-07-20.at.11.58.38.mov |
Reproduced and up to date on the Slack thread |
Job added to Upwork: https://www.upwork.com/jobs/~01e923e4ff221ffae9 |
Current assignee @adelekennedy is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @0xmiroslav ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.If a staging link (staging.new.expensify.com) is sent on production app via a chat message ,the app treats it like an internal link and tries to open it internally via react-navigation instead of opening it in a new tab as an external link. What is the root cause of that problem?App/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js Lines 29 to 33 in b105aa3
The App/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js Lines 49 to 54 in b105aa3
Since, the conditions are true here as the given link is a staging link, so it is opened internally via react-navigation. What changes do you think we should make in order to solve the problem?App/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js Lines 23 to 33 in b8aeec0
Making changes to the mentioned Regex just to accomodate localhost is not feasible because of the way it has been structured and used. where
3.Then using
I would also like to use https://www.npmjs.com/package/react-native-url-polyfill package to make the new URL(url) object work across all platforms since RN URL polyfill has known issues ,see https://github.com/charpeni/react-native-url-polyfill#why-do-we-need-this. The methods What alternative solutions did you explore? (Optional)ResultFor Result after this implementation, please see #22523 (comment) |
📣 @Talha345! 📣
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
ProposalPlease re-state the problem that we are trying to solve in this issue.App doesn't open a new tab when clicking on a URL of staging on production What is the root cause of that problem?The root cause is here when we are checking for the same origin we are also checking for staging url and if url matches staging url we are assuming it is the same origin
What changes do you think we should make in order to solve the problem?We should remove We don't need to worry about opening internal urls in staging because when app is in staging environment Line 1 in 8bc6f52
What alternative solutions did you explore? (Optional) |
@0xmiroslav pending proposal review |
@adelekennedy @0xmiroslav any update on this? |
@Talha345 we're pending @0xmiroslav review on the proposals above! |
@adelekennedy Yes i know but since @0xmiroslav has been MIA, I was wondering if there was a procedure in place to assign some other C+ member instead. |
I've reached out in Slack - this isn't a pressing bug at the moment so I'd rather give them time to review this week before assigning another member of the C+ team |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
http://localhost:8080/settings/profile/display-name I think we should confirm the expected behavior per each env.
Here, internal means deep link, external means new tab, 🔴 is to fix @adelekennedy do you agree with this table? |
Hi @francoisl , those links should work as expected as we are not changing any code that affects which URLs are to be rendered as links or not. The code we are changing is only being used to create a URL object from a string and then compare those URL objects origins.I also tested it with the proposed changes and everything seems to be working fine. |
Ah ok makes sense, thanks for clarifying. Let's go with your proposal then. |
📣 @Talha345 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Thanks @francoisl! PR will be up tomorrow. |
@francoisl We have 2 options for the import of the polyfill, either import it in the root |
@situchan PR is ready for review |
Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:
On to the next one 🚀 |
Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:
On to the next one 🚀 |
Hi @francoisl ! This PR was merged 12 days ago, any update on the payment? |
It seems automation didn't work here. PR deployed to production on Aug 24 so payment is due tomorrow |
Yeah not sure what happened with the automation here, but it's due for payment now. @adelekennedy can you assist with that please? |
yikes - thanks for the heads up! Payouts due:Issue Reporter: $250 @dukenv0307 Eligible for 50% #urgency bonus? N Upwork job is here. |
@adelekennedy Payment received! Thanks. Can you also leave a positive feedback comment on my profile for the Upwork job? |
@adelekennedy @francoisl I reported regression from this bug PR please check this one #24483 (comment) |
@ayazhussain79 it was fixed already! |
yeah, @ayazhussain79 is eligible for reporting bonus. Thanks to their report, we were able to fix quickly before PR hit staging. |
Ah thank you! @ayazhussain79 will you apply here? If that link doesn't work I may have set it to invite only |
@adelekennedy Applied on Upwork, Thank you |
Offer accepted, Thank you |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
App should open a new tab to redirect to the page in staging
Actual Result:
App doesn't open a new tab and the link is production link
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.38-2
Reproducible in staging?: y
Reproducible in production?: y
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
Notes/Photos/Videos: Any additional supporting documentation
Screencast.from.06-07-2023.00_53_10.webm
Expensify/Expensify Issue URL:
Issue reported by: @dukenv0307
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1688619360838289?thread_ts=1688135098.594039&cid=C049HHMV9SM
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: