-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add toast for recovery keys being out of sync #28946
Conversation
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.
Looks sane
@@ -141,7 +141,7 @@ Please see LICENSE files in the repository root for full details. | |||
} | |||
|
|||
.mx_Toast_description { | |||
max-width: 272px; | |||
max-width: 366px; |
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.
@element-hq/design
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.
Looks good, thank you. A couple of optional comments.
playwright/e2e/crypto/utils.ts
Outdated
await page.evaluate(async () => { | ||
const removeCachedSecrets = new Promise((resolve) => { | ||
const request = window.indexedDB.open("matrix-js-sdk::matrix-sdk-crypto"); | ||
request.onsuccess = async (event: Event & { target: { result: IDBDatabase } }) => { |
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.
Does this need to be async? Caution is required when mixing Indexed DB with async, so if we can remove async
s it would make me less nervous. (I think the wider Promise that is awaited is OK, since no async work is done inside an IndexedDB callback.)
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.
Mmm, not my code (I just moved it) but I agree it doesn't look like it, and the test passes without it.
isCurrentDeviceTrusted, | ||
defaultKeyId, | ||
}); | ||
showSetupEncryptionToast(SetupKind.SET_UP_ENCRYPTION); |
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.
Will users end up in an unsolvable loop if we do this? Any guesses as to what state they are in?
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.
I couldn't say for sure that they won't, some users do report loops at the moment which would imply the process of setting up encryption doesn't completely start from scratch. At least we will have the state of the variables we use here logged in a rageshake now.
Co-authored-by: Andy Balaam <[email protected]>
Co-authored-by: Andy Balaam <[email protected]>
Also rejigs the toast logic to hopefully make it more sensible: hopefully this is along the right lines, nobody seemed to object when I asked, at least.
Checklist
public
/exported
symbols have accurate TSDoc documentation.