-
Notifications
You must be signed in to change notification settings - Fork 51
#5905 Add Secure Reply-All to Gmail context menu #5909
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
#5905 Add Secure Reply-All to Gmail context menu #5909
Conversation
…re-reply-all-to-gmail-context-menu
Hi @sosnovsky, we do have some problem with the recent change. While it works, it may not works best occasionally. Screen.Recording.2025-01-24.at.4.33.22.PM.movThat's what I recently noticed when constantly checking it here. The reason why this is very tricky DOM manipulation is that, the actionMenu aka the Gmail context menu is not hidden or present in the document.body not unless a single click on the actionMenuBtn is made which would then programmatically added the Gmail's reply,forward buttons, etc. That makes me solve it by immediately binding the click event and modify the actionMenu right after the click - this solves the bug in delayed injection of secure actions. However, now that we move it on gmail replace, the time it works may vary now since they're maybe some latency plus the fact that if i click on the actionMenuBtn, it is not what the $(document).click('... is actual targetting but its parent Is there any alternative left for us? What if the the function for adding secure action buttons on context menu works "reliably" in |
I have been consistently testing this, and it seems like a bug is working against me. It's no joke. When I test the same scenario with the JavaScript console or web developer console enabled, the UI bug does not occur. However, as soon as I close the web developer console and refresh the page, the issue reappears. It can be tested by opening an encrypted email that was sent to two recipients (to enable reply all too), and then opening the Gmail's context menu. (for both scenario where dev tools is enabled/disabled) |
…re-reply-all-to-gmail-context-menu-live-test
I think it happens because on document load |
Hi @martgil, do you think we can finalize this PR before the end of the week to publish new extension release? |
Yes @sosnovsky - I believe thats completely possible. I'll try your suggestion but if that doesn't work. Could you please let me know your thoughts on my latest change for the time being? It tried to address the constant addition of |
…re-reply-all-to-gmail-context-menu-live-test
Thanks for sharing your insight. I'll try it right away. |
I think it would still affect performance as binding/unbinding happens each second in this case. |
Thanks @sosnovsky - I have good news. My recent change with the help of your guidance, has worked flawlessly. I'm working on fixing the failing test. |
extension/js/content_scripts/webmail/gmail/gmail-element-replacer.ts
Outdated
Show resolved
Hide resolved
extension/js/content_scripts/webmail/gmail/gmail-element-replacer.ts
Outdated
Show resolved
Hide resolved
Hi @martgil, what issues left to be fixed in this task? |
Hello @sosnovsky - I'm trying to do my best in fixing this one. If we're using $(document)... I'd get an unreliable results... like i've shared in the above screen recording - sometimes it showed up sometime its not showing at all. so I'm just working now on its reliability since its very tricky. |
I would like to see our opportunity to use the previous approach @sosnovsky since that's we're getting reliable results compared to using $(document).on('click', selector) since HTML structure is obscure in Gmail with that approach. Is there anyhting I could test just to see how much performance loss were worrying about? if its not that much, maybe we could allow it? |
Ok, please try to use previous approach, and I'll investigate |
extension/js/content_scripts/webmail/gmail/gmail-element-replacer.ts
Outdated
Show resolved
Hide resolved
…re-reply-all-to-gmail-context-menu-live-test
2d15976
to
80aa8b6
Compare
@martgil live tests probably fail because of current 45 minutes execution limit -
Let's increase it to 60 minutes for now, but later will try to merge some live tests, so they'll be executed faster. |
I'm just checking any issues on the tests. Meanwhile, @sosnovsky please try the latest change and it should be the most acceptable solution that we can find. |
@sosnovsky are you preparing the new FlowCrypt browser extension release? This is already a good PR but the tests are not yet passing (at least one is failing too often) but I'm hoping to get this added. My added tests are working fine. |
Yes, new browser extension release should be ready tomorrow, on Wednesday, as it includes fixes for 2 issues reported by our customer. |
Thanks for your answer, Roma - please feel free to test this one. Meanwhile, its just the unrelated tests that are failing, but the test dedicated for this change is passing without any issues. |
Yes @sosnovsky - I'll finish this one today and do things as you suggested. |
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.
👍
Hi @sosnovsky - the live tests are now passing :) Could we merge this one? |
Thank you, Roma! |
Thanks for finding a well-working solution 👍 |
This PR adds the FlowCrypt's "Secure Reply All" option to Gmail's context menu.
close #5905
Tests (delete all except exactly one):
To be filled by reviewers
I have reviewed that this PR... (tick whichever items you personally focused on during this review):