-
Notifications
You must be signed in to change notification settings - Fork 800
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
Faux LiveChat Target existing window if available #18960
Conversation
Caution: This PR has changes that must be merged to WordPress.com |
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 If you are an automattician, once your PR is ready for review add the "[Status] Needs Team review" label and ask someone from your team review the code. jetpack plugin:
|
projects/plugins/jetpack/modules/masterbar/inline-help/class-inline-help.php
Show resolved
Hide resolved
projects/plugins/jetpack/modules/masterbar/inline-help/inline-help.js
Outdated
Show resolved
Hide resolved
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.
Nice improvement, although I don't think this fully addresses the concern raised in paYJgx-1nM-p2#comment-1735 which was:
- While on WP Admin, user clicks on
?
button. - In the new tab, users clicks on a WP Admin link.
- User gets a new tab, but we should redirect them to the previous tab.
I see this is still happening (and honestly I don't see any way of avoiding it):
Also left some comments regarding the implementation.
projects/plugins/jetpack/modules/masterbar/inline-help/inline-help.js
Outdated
Show resolved
Hide resolved
I agree - i don't see how we solve that particular issue. I think I must have linked up the wrong thread though. I'm simply trying to avoid opening multiple tabs if the user goes back to Calypso and clicks |
cc @mrfoxtalbot This PR should ensure that clicks on |
projects/plugins/jetpack/modules/masterbar/inline-help/inline-help.js
Outdated
Show resolved
Hide resolved
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.
projects/plugins/jetpack/modules/masterbar/inline-help/inline-help.js
Outdated
Show resolved
Hide resolved
Thank you @getdave! I opened a separate issue in HC to make sure that the FAB (conversation icon/link) is visible there. 1661-gh-happychat That being said, I am not sure now if this would make more harm than good. If a user is aware of the fact that they have two tabs they should not click on the FAUX FAB icon at all, but if they do they might get confused by seeing their tab reload. How would this work if they had unsaved changes on the target tab? Would they be asked to save before reloading? Thanks again! |
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.
Aside from the non-blocking comment I left this works well for me and feels like a much nicer experience 😁
This is a very valid concern, and something I didn't though about. I'm leaning towards leaving things as they are now, since it's the safest option. Yes, a user might end up with dozens of tabs open if they click on the
It'd depend on the page the user is seeing on that tab. Some pages displays an unsaved changes warning, but others don't. |
@mrfoxtalbot I'll leave this with you. If you feel it's an enhancement then we can land it otherwise feel free to close out. |
…help.js Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com>
I feel that I was coming from a very specific place (the risk of a user losing an ongoing chat) and missed the bigger picture of users who access chat via the Faux Fab in the first place, which is almost certainly going to be the most common scenario. We might want to revisit this later on, once we have launched the Unified Navigation but I would leave it for now, in the spirit of Thank you all! |
@mrfoxtalbot As in you'd prefer to
You lost me here 😆 |
Sure, I am going to close this PR, we can revisit it later. By Primum non nocere (First No Harm) I meant that it was not 100% clear if this was going to do more harm than good, so it was probably best to not make the change it for now. Thanks again! |
See paYJgx-1nM-p2#comment-1735
This allows the faux inline help to open in an existing window if it's available rather than a new tab each time. This is like how the
Preview
feature works in WordPress.org in that if you have an existing preview window open and you clickPreview
it will try to open in the existing window.Changes proposed in this Pull Request:
Jetpack product discussion
paYJgx-1nM-p2#comment-1735
Does this pull request change what data or activity we track or use?
No
Testing instructions:
?
icon (bottom right).?
icon again.DevTools
->Network
-> search fort.gif
and check request params.Or to test on Simple simply check out the diff D57816-code and repeat steps above on your sandboxed Simple site.
Proposed changelog entry for your changes: