* Create new labs flag
* Render empty room list view
* Reload on flag change
* Rename RoomList.tsx to LegacyRoomList.tsx
and rename NewRoomListView.tsx to RoomListView.tsx
* Update labs.md
* Don't reload roomview on offline connectivity check
Doesn't look like this was a regression as far as I can see, but
you did have to switch rooms while offline for it to start happening.
There's no use reloading the room until we're online again.
Fixes https://github.com/element-hq/element-web/issues/29072
* Add regression test
* Move it down the file to avoid changing the snapshots
* feat(crypto): rename "security key" into "recovery key" in lang file
* test(crypto): rename "security key" into "recovery key" in test files
* test(e2e crypto): rename "security key" into "recovery key" in test files
* doc(crypto): rename "security key" into "recovery key"
* fix(encryption settings): check encryption state when user cancels the reset identity flow
* test(encryption settings): add test to check encryption state when user cancels the reset identity flow
* Wire up the "Forgot recovery key" button for the "Key storage out of sync" toast
* Unused import & fix test
* Test 'forgot' variant
* Fix dependencies
* Add more toast tests
* Unused import
* Test initialState in Encryption Tab
* Let's see if github has any more luck running this test than me
* Working playwright test with screenshot
* year
* Convert playwright test to use the bot client
* Disambiguate
Co-authored-by: Florian Duros <florianduros@element.io>
* Add doc & do other part of rename
* Split out into custom hook
* Fix tests
---------
Co-authored-by: Florian Duros <florianduros@element.io>
* Apply lint rule @typescript-eslint/no-empty-object-type
To avoid the footgun that is https://www.totaltypescript.com/the-empty-object-type-in-typescript
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* fix(encryption tab): hide the advanced section when the secrets are not cached locally
The secret verification is now made at the level of `EncryptionUserSettingsTab` instead at the `RecoveryPanel` level. In the `EncryptionUserSettingsTab`, we decide to only display `RecoveryPanelOutOfSync` in case of uncached secrets.
`RecoveryPanelOutOfSync` is simplified version of `RecoveryPanel` handling only the `secrets_not_cached` case.
* refactor(encryption tab): simplify the `RecoveryPanel` without having to handle the missing secrets
* test(encryption tab): move test about cached secrets in `EncryptionUserSettingsTab-test.tsx`
* test(encryption tab): move e2e test which are testing all the encryption tab in `encryption-tab.spec.ts
* refactor(encryption tab): move `RecoveryPanelOutOfSync` in its own file
- fix typos
- call onFinish after accessSecretStorage
- onFinish doesn't need to be asynchronous
* doc(encryption tab): improve documentation when the secrets are not cached locally
* test(encryption tab): improve test documentation and naming
* doc(encryption tab): improve `RecoveryPanelOutOfSync` documentation
* Schedule dehydration on reload
* fix test and use the right function to check dehydration is enabled
* use dehydration helper function when scheduling dehydration on restart
* fix test by passing in client object
* feat(crypto): Support verification violation composer banner
* refactor UserIdentityWarning by using now a ViewModel
fixup: logger import
fixup: test lint type problems
fix test having an unexpected verification violation
fixup sonarcubes warnings
* review: comments on types and inline some const
* review: Quick refactor, better handling of action on button click
* review: Small updates, remove commented code
* refactor(MatrixChat): remove `MatrixClient.setGlobalErrorOnUnknownDevices` call
MatrixClient.setGlobalErrorOnUnknownDevices is not implemented in the rust-crypto and will be removed when the legacy crypto will be ripped out.
* test(e2e): remove `MatrixClient.setGlobalErrorOnUnknownDevices` call
MatrixClient.setGlobalErrorOnUnknownDevices is not implemented in the rust-crypto and will be removed when the legacy crypto will be ripped out.
* Fix tiny typo in existing code
* Create a hook that uses the right panel store
So that we track changes to the right panel phases
* Create a context that wraps the previous hook we created
We do this so that we can get by using a single event listener i.e we
only need to call `useCurrentPhase` in the provider as opposed to
calling it in each header icon.
* Create a hook that tells you if a panel is open or not
* Create component that wraps Icon
and adds a class name when the corresponding panel is open
* Style room header icons for when they are toggled
* Style face pile for toggle state
* Fix broken CI
* Give directory a better name
* Update year in license
* Use a stronger type
* Allow flex component to take child containers props
So that we can set attributes on the container
* Use Up/Down arrow keys to navigate through the list
* Update snapshot
* feat(devtools): add crypto information in devtools
* ci: add crypto devtools file to crypto code owners
* test(dev tools): update test to add new crypto button
* test(dev tools): add tests for crypto component
* Fix identity server settings visibility
The IS settings got confused with the posthog settings and were only
shown if analytics were enabled.
* Update snapshot
* Make the encryption card more configurable:
- Change the icon
- Can set the destructive props
* Update compound
* Add advanced section
* Add the `Never send encrypted messages to unverified devices` settings
* - Add commercial license
- Remove generic type
* Rename EncryptionDetails css classes
* Use same uiAuthCallback
* Use h3 for title
* Add tests to `AdvancedPanel`
* Add tests to `EncryptionUserSettingsTab`
* Add tests to `ResetIdentityPanel`
* Get only the recovery section in recovery tests
* Add e2e test
* Fix outstanding UX issues with replies/mentions/keyword notifs
* Use createRoot instead of deprecated ReactDOM.render
I foresee this change being made across the codebase shortly
and want to proactively prevent my PR from falling behind
* Clean up react root on unmount
* Remove addition of left-edge highlight on message mentions
It is clear that it would be best for me to address
this piece in a separate PR.
* Update call to ReactRootManager.render
---------
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Switch OIDC primarily to new `/auth_metadata` API
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Simplify the world
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Switch to secure random strings
Because the js-sdk methods are changing and there's no reason for these
not to use the secure versions. The dedicated upper/lower functions were
*only* used in this one case, so this should do the exact same thing with
the one exported function.
Requires https://github.com/matrix-org/matrix-js-sdk/pull/4621 (merge both together)
* Change remaining instances of randomString
which I somehow entirely missed the first time.
* Fix import order
* Add a separator between joined and invited members
* Fix user label in tile having wrong color
* Changes to member tiles
- ThreePidInviteTile now contains an user label showing "(Invited)" and
an email icon.
- RoomMemberTile now includes an icon similar to above.
- Refactors a bunch of code to make this change sensible.
* Remove redundant css code
* Fix tests
* Update src/components/viewmodels/memberlist/MemberListViewModel.tsx
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Update year in license
* Fix lint error
---------
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Refine `SettingsSection` & `SettingsTab`
* Add encryption tab
* Add recovery section
* Add device verification
* Rename `Panel` into `State`
* Update & add tests to user settings common
* Add tests to `RecoveryPanel`
* Add tests to `ChangeRecoveryKey`
* Update CreateSecretStorageDialog-test snapshot
* Add tests to `EncryptionUserSettingsTab`
* Update existing screenshots of e2e tests
* Add new encryption tab ownership to `@element-hq/element-crypto-web-reviewers`
* Add e2e tests
* Fix monospace font and add figma link to hardcoded value
* Add unit to Icon
* Improve e2e doc
* Assert that the crypto module is defined
* Add classname doc
* Fix typo
* Use `good` state instead of default
* Rename `ChangeRecoveryKey.isSetupFlow` into `ChangeRecoveryKey.userHasKeyBackup`
* Move `deleteCachedSecrets` fixture in `recovery.spec.ts`
* Use one callback instead of two in `RecoveryPanel`
* Fix docs and naming of `utils.createBot`
* Fix typo in `RecoveryPanel`
* Add more doc to the state of the `EncryptionUserSettingsTab`
* Rename `verification_required` into `set_up_encryption`
* Update test
* ADd new license
* Update comments and doc
* Assert that `recoveryKey.encodedPrivateKey` is always defined
* Add comments to explain how the secrets could be uncached
* Use `matrixClient.secretStorage.getDefaultKeyId` instead of `matrixClient.getCrypto().checkKeyBackupAndEnable` to know if we need to set up a recovery key
* Update existing screenshot to add encryption tab.
* Update tests
* Use new labels when changing the recovery key
* Fix docs
* Don't reset key backup when creating a recovery key
* Fix doc
* Remove FTUE onboarding as it is incompatible with SSO/OIDC
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove stale screenshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* React to MatrixEvent sender/target sentinels being updated for rendering state events
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* React to sentinel changes in EventListSummary
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add new e2e icon for the member tile
* Add new presence icon for member tile
* Implement new member tile
* Implement memberlist view model
* Implement new memberlist header view
* Support the new memberlist in Diasambiguated profile
1. Use MemberInfo instead of RoomMember
2. CSS changes to reflect the new design
* Implement new memberlist view
* Add and use a new overflow component
We used the EntityTile component as a pretend overflow tile in some
places. This new lighter component is added so that we can remove the
complex EntityTile component.
* Remove old code
* Add/remove css files from _components.pcss
* Increase minimum width as per design
* Actually use the new memberlist view
* Fix broken jest tests
* Add jest tests
* Playwright: Make it possible to disable presence
* Add playwright tests
* Fix lint error
* Undo translation changes that must be done via localazy
* Update license header
* Use waitFor instead of setTimeout
* Remove comment
* Switch over from template to container hs
* Revert unintended change
* Move config to top level
* Add commercial licence and update config files
* Update license in headers
* Revert "Update license in headers"
This reverts commit 7ed7949485.
* Update only spdx id
* Remove LicenseRef- from package.json
LicenseRef- no longer allowed in npm v3 package.json
This fixes the warning in the logs and failing build check.
* Hide 3pid account settings if account is managed externally
As they would be disabled and just confusing otherwise
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Show manage device button instead of sign out button for other devices in OIDC mode
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tidy up
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Harden Settings using mapped types
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix issues found during hardening
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove oidc native flow stale key
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Move room header info button to right-most position
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update screenshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshot
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update screenshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Factor out crypto setup process into a store
To make components pure and avoid react 18 dev mode problems due
to components making requests when mounted.
* fix test
* test for the store
* Add comment
* Enable key backup by default
When we set up cross signing, so the key backup key will be stored locally along with the cross signing keys until the user sets up recovery (4s). This will mean that a user can restore their backup if they log in on a new device as long as they verify with the one they registered on.
Replaces https://github.com/element-hq/element-web/pull/28267
* Fix test
* Prompt user to set up 4S on logout
* Fix test
* Add playwright test for key backup by default
* Fix imports
* This isn't unexpected anymore
* Update doc
* Fix docs and function name on renderSetupBackupDialog()
* Use checkKeyBackupAndEnable
* Docs for setup encryption toast
* Also test the toast appears
* Update mock for the method we use now
* Okay fine I guess we need both
* Swap here too
* Fix comment & doc comments
* Update test snapshot
as the date formatting appears to have gained a comma, and somehow
got through the merge tests on the dependency bump.
* Actually this was the problem
* Stash initial work to bring TSC from over 6 mins to under 1 minute
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Stabilise types
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix incorrect props to AccessibleButton
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Swap AccessibleButton element types to match the props they provide
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Changed my mind, remove spurious previously ignored props
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>