Skip to content

#5666 Add compose button on Thunderbird#5759

Merged
sosnovsky merged 94 commits intomasterfrom
issue-5666-add-compose-button-on-thunderbird
Jul 23, 2024
Merged

#5666 Add compose button on Thunderbird#5759
sosnovsky merged 94 commits intomasterfrom
issue-5666-add-compose-button-on-thunderbird

Conversation

@martgil
Copy link
Collaborator

@martgil martgil commented Jun 6, 2024

This PR adds a functional compose button on top of Thunderbird mail client.

close #5666


Tests (delete all except exactly one):

  • Difficult to test - (changes are not readily completed for tests in Thunderbird Mail environment)

To be filled by reviewers

I have reviewed that this PR... (tick whichever items you personally focused on during this review):

  • addresses the issue it closes (if any)
  • code is readable and understandable
  • is accompanied with tests, or tests are not needed
  • is free of vulnerabilities
  • is documented clearly and usefully, or doesn't need documentation

@martgil
Copy link
Collaborator Author

martgil commented Jun 7, 2024

Hi @sosnovsky - I hope you are well.

I would like to hear your suggestion with my progress and approach on how I enable secure compose on Thunderbird mail. What i did is that, I re-use the pop-up we have and injected them on messageDisplay and composeDisplay as a popup, that when clicked, will redirect then to the web extension page where they can directly compose their secure email.

I come up with this idea because, an extension can only inject a single option_ui so by having a way to compose email (encrypted, signed or both) its so flexible to so in MailExtension view. This is pretty much it for this PR.

To test it out:

  1. Install and it up the Thunderbird extension build on a Thunderbird email client.
  2. Open any message and click on "FlowCrypt" injected option ui -> choose secure compose -> choose which inbox you want to use.
  3. Upon clicking the account, you'll be greeter with secure compose - which would let you send secure email (encrypted, signed or combination of both).

I look forward to your feedback.

Thanks!

Copy link
Collaborator

@sosnovsky sosnovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should have different actions for different buttons:

  • FlowCrypt button in toolbar should open Encrypted inbox (also let's replace it's label text with just FlowCrypt, so it will use less space in the toolbar):
Screenshot 2024-06-07 at 21 20 59
  • FlowCrypt button in compose window should open Secure compose
Screenshot 2024-06-07 at 21 23 14

@martgil
Copy link
Collaborator Author

martgil commented Jun 11, 2024

Hi @sosnovsky - Just a quick question for "FlowCrypt button in compose window should open Secure compose". Do you mean by this is that, upon clicking the FlowCrypt button on the compose display, it should directly go to the first account's inbox without the ability to choose for which inbox the user to use? Or would mean only the text.

For example, if the placement of the FlowCrypt button was on the toolbar - it should say "Encrypted inbox", then when accessed from the compose display should say "Secure compose" but without showing the setting button?

@sosnovsky
Copy link
Collaborator

Hi @sosnovsky - Just a quick question for "FlowCrypt button in compose window should open Secure compose". Do you mean by this is that, upon clicking the FlowCrypt button on the compose display, it should directly go to the first account's inbox without the ability to choose for which inbox the user to use? Or would mean only the text.

Here we can use the same behavior as the current one - show list of accounts and then open encrypted compose for chosen account. As it's probably quite complicated to get current account from Thunderbird UI. Also for simplification we can automatically open encrypted compose if it's only one account is configured.

For example, if the placement of the FlowCrypt button was on the toolbar - it should say "Encrypted inbox", then when accessed from the compose display should say "Secure compose" but without showing the setting button?

I like this idea - it'll make more clear what will be opened after button click.

@martgil
Copy link
Collaborator Author

martgil commented Jun 11, 2024

Also for simplification we can automatically open encrypted compose if it's only one account is configured.

I agree on everything else - sounds like a plan. I'm on it now.

@martgil
Copy link
Collaborator Author

martgil commented Jun 12, 2024

This PR is almost done.

For example, if the placement of the FlowCrypt button was on the toolbar - it should say "Encrypted inbox", then when accessed from the compose display should say "Secure compose" but without showing the setting button?

I like this idea - it'll make more clear what will be opened after button click.

Just need to show "Secure compose" instead of "Encrypted Inbox" when accessing in an composeAction Button in thunder bird and hide the settings page.

@martgil martgil marked this pull request as ready for review June 13, 2024 10:16
@martgil martgil requested a review from sosnovsky June 13, 2024 10:16
@martgil
Copy link
Collaborator Author

martgil commented Jun 13, 2024

Hi @sosnovsky - I believe this one is ready for a review. Thanks!

To test this PR manually, there would be two cases: 1.) using secure compose with single Gmail account 2.) using secure compose with two user accounts from which one account will be selected out of the accounts.

Copy link
Collaborator

@sosnovsky sosnovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well, I've just noticed that when opening encrypted inbox from toolbar button it still opens compose window:

Screenshot 2024-06-13 at 15 54 42

Also I think it'll be convenient to have secure reply button when viewing message details, seems like Thunderbird allows to add buttons there:
Screenshot 2024-06-13 at 15 56 17

@martgil martgil requested a review from sosnovsky July 19, 2024 12:23
@martgil martgil marked this pull request as ready for review July 19, 2024 12:23
@martgil
Copy link
Collaborator Author

martgil commented Jul 19, 2024

Hi @sosnovsky - I have fixed the last two issues raised earlier. Please check as you might've noticed some other issues. Thanks

@sosnovsky
Copy link
Collaborator

Hi @martgil, currently testing your latest changes - previous issues seems to be fixed, but I noticed another one:

  • open encrypted message in thunderbird
  • click forward (it happens only for forwarding, not replying) to open thunderbird compose window
  • in thunderbird compose window click secure compose to open FlowCrypt compose window
  • FlowCrypt encrypted inbox shows error FlowCrypt encountered an error with unknown cause. TypeError: this.popoverItems[option] is undefined:
Screenshot 2024-07-22 at 13 49 56

clicking retry doesn't help

@martgil martgil marked this pull request as draft July 22, 2024 11:05
@martgil
Copy link
Collaborator Author

martgil commented Jul 22, 2024

Hi @martgil, currently testing your latest changes - previous issues seems to be fixed, but I noticed another one:

Thanks Roma - I'll check this one and get it fixed.

@sosnovsky
Copy link
Collaborator

Hi @martgil, currently testing your latest changes - previous issues seems to be fixed, but I noticed another one:

Thanks Roma - I'll check this one and get it fixed.

It can also be reproduced with these steps:

  • click new message button in thunderbird to open compose window
  • click secure compose button in compose window
  • FlowCrypt extension opens with the same TypeError: this.popoverItems[option] is undefined error

@martgil
Copy link
Collaborator Author

martgil commented Jul 23, 2024

It can also be reproduced with these steps:

  • click new message button in thunderbird to open compose window
  • click secure compose button in compose window
  • FlowCrypt extension opens with the same TypeError: this.popoverItems[option] is undefined error

Hi @sosnovsky Greetings! I have fixed this one together with other issues I can spot. Can you please take another look please? Thanks.

@martgil martgil requested a review from sosnovsky July 23, 2024 10:28
@martgil martgil marked this pull request as ready for review July 23, 2024 10:28
Copy link
Collaborator

@sosnovsky sosnovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done, all found issues seem to be fixed, thanks!

@sosnovsky sosnovsky merged commit ace8d84 into master Jul 23, 2024
@sosnovsky sosnovsky deleted the issue-5666-add-compose-button-on-thunderbird branch July 23, 2024 11:11
@martgil
Copy link
Collaborator Author

martgil commented Jul 23, 2024

Thanks @sosnovsky - it's time now to learn my way into message decryption within the Thunderbird mail client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[thunderbird] Add compose button into Thunderbird UI

2 participants