Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Improve usability of the decryption banner #11012

Closed

Conversation

florianduros
Copy link
Contributor

@florianduros florianduros commented May 30, 2023

Checklist

  • Tests written for new code (and old code if feasible)
  • Linter and other CI checks pass
  • Sign-off given on the changes (see CONTRIBUTING.md)

Closes element-hq/element-meta#1358

  • Replace Decrypting messages… description by a new one
  • Reduce banner font
  • Removed all the error messages where the user was stuck in a dead end. If the user can't decrypt the message, do not display permanently a banner about it.
  • Display an error message only when the device is unverified and an verified device or a key backup exist.
  • Display a generic message when the developerMode is enabled, the device is verified, another device is verified and there is a unrequested session. It allows to send manually key request in developerMode.

Here's what your changelog entry will look like:

✨ Features

@florianduros florianduros added the T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements label May 30, 2023
@florianduros florianduros marked this pull request as ready for review May 30, 2023 16:22
@florianduros florianduros requested a review from a team as a code owner May 30, 2023 16:22
@florianduros florianduros changed the title Improve user experience of the decryption banner Improve usability of the decryption banner May 30, 2023
className = "mx_DecryptionFailureBar";
// In developerMode, we want to be able to resend manually key requests
} else if (developerMode && !needsVerification && hasOtherVerifiedDevices && anyUnrequestedSessions) {
className = "mx_DecryptionFailureBar mx_DecryptionFailureBar--withEnd";
headline = <React.Fragment>{_t("Some messages could not be decrypted")}</React.Fragment>;
message = (
<React.Fragment>
Copy link
Member

Choose a reason for hiding this comment

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

per our DM: this message is incorrect now

Comment on lines 144 to +145
let button = <React.Fragment />;
let keyRequestButton = <React.Fragment />;
Copy link
Member

Choose a reason for hiding this comment

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

I think we only need one of button and keyRequestButton now

Comment on lines +174 to +175
// In developerMode, we want to be able to resend manually key requests
} else if (developerMode && !needsVerification && hasOtherVerifiedDevices && anyUnrequestedSessions) {
Copy link
Member

Choose a reason for hiding this comment

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

The comment should really be inside the relevant if clause:

Suggested change
// In developerMode, we want to be able to resend manually key requests
} else if (developerMode && !needsVerification && hasOtherVerifiedDevices && anyUnrequestedSessions) {
} else if (developerMode && !needsVerification && hasOtherVerifiedDevices && anyUnrequestedSessions) {
// In developerMode, show a button to resend key requests if there are other devices we could request keys from.

});

it("Displays a general error message if there are no other verified devices", async () => {
it("The banner is hidden if there are no other verified devices", async () => {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
it("The banner is hidden if there are no other verified devices", async () => {
it("The banner is hidden if there is a key backup but no other verified devices", async () => {

Copy link
Member

Choose a reason for hiding this comment

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

it seems like the code doesn't actually care about key backup or other verified devices?

@florianduros
Copy link
Contributor Author

Irrelevant since element-hq/element-meta#1358 (comment)

Closing it in favor of #11027.

@florianduros florianduros deleted the florianduros/feat/improve-decryption-bar branch September 5, 2023 15:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve usability of the "Open another device" banner
2 participants