Commit Graph

2591 Commits

Author SHA1 Message Date
Germain
9ea04a539b
Add data attribute to know what header is used (#11735)
* Add data attribute to know what header is used

* Simplify room header type

* update snapshot
2023-10-12 13:17:51 +00:00
renovate[bot]
3bd6dd9143
Update vector-im (#11621)
* Update vector-im

* Update snapshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-10-12 11:12:59 +00:00
Manan Sadana
7dc40e6613
Fix: <detail> HTML elements clickable area too wide. (#11666)
* Fix: Details element wide clickable area

* LogoutDialog-test.tsx snapshot updated

* Fixed open state clickable area for dropdowns

* Advanced changed to advanced

---------

Co-authored-by: Manan Sadana <manan.sadana@cnhteam.onmicrosoft.com>
Co-authored-by: Florian Duros <florianduros@element.io>
2023-10-12 08:50:49 +00:00
Kerry
3a025c4b21
OIDC: refresh tokens (#11699)
* test persistCredentials without a pickle key

* test setLoggedIn with pickle key

* lint

* type error

* extract token persisting code into function, persist refresh token

* store has_refresh_token too

* pass refreshToken from oidcAuthGrant into credentials

* rest restore session with pickle key

* retreive stored refresh token and add to credentials

* extract token decryption into function

* remove TODO

* very messy poc

* comments

* prettier

* comment pedantry

* working refresh without persistence

* extract token persistence functions to utils

* add sugar

* implement TokenRefresher class with persistence

* tidying

* persist idTokenClaims

* persist idTokenClaims

* tests

* remove unused cde

* create token refresher during doSetLoggedIn

* tidying

* also tidying

* update Lifecycle test replaceUsingCreds calls

* tidy

* test tokenrefresher creation in login flow

* test token refresher

* Update src/utils/oidc/TokenRefresher.ts

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* use literal value for m.authentication

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* improve comments

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-10-12 00:49:07 +00:00
Kerry
5d169afb8a
OIDC: register (#11727)
* update uses of ValidatedDelegatedAuthConfig to broader OidcClientConfig type

* add OIDC register flow to registration page

* pass prompt param to auth url creation

* update type

* lint

* test registration oidc button

* fix: reference state inside setState

* comment
2023-10-11 21:44:46 +00:00
Germain
ac32d45bcd
Usability fixes for new room header (#11729)
* Usability fixes for new room header

* lintfix

* Apply padding to both heading and topic

* lintfix

* comment clarity

* Remove title attr
2023-10-11 14:43:01 +00:00
Florian Duros
71f2104632
Element-R: Use MatrixClient.CryptoApi.getUserVerificationStatus instead of MatrixClient.checkUserTrust in UserInfo.tsx (#11709)
* Mock `CryptoApi.getUserVerificationStatus` instead of `checkUserTrust`

* Use `CryptoApi.getUserVerificationStatus` instead of `checkUserTrust` in `UserInfo.DeviceItem`

* Use `CryptoApi.getUserVerificationStatus` instead of `checkUserTrust` in `UserInfo.DevicesSection`

* Use `CryptoApi.getUserVerificationStatus` instead of `checkUserTrust` in `UserInfo.BasicUserInfo`

* Pass `isUserVerified` props to `BasicUserInfo` children

* Removed remaining calls to `checkUserTrust` in `UserInfo-test.tsx`

* Review changes

* Update comments

* Display spinner only when crypto is initialized

* Fix duplicate `cryptoEnabled`

* Remove misleading comment in `DevicesSection`
2023-10-11 11:45:02 +00:00
Manan Sadana
54fa9a572e
Fix: Clicking on members pile does nothing. (#11657)
* Fix: Clicking on pile opens members list

* onClick used on Accessible Component

* Updated snapshots for testing

* Snapshots updated after merging

---------

Co-authored-by: Manan Sadana <manan.sadana@cnhteam.onmicrosoft.com>
2023-10-06 06:54:25 +00:00
Andy Balaam
9efa458b68
Unflake JoinRuleSettings test (#11715)
* Don't look for 'Updating space' message in joinrulesettings test

as it may disappear too quickly for us to see.

Fixes https://github.com/vector-im/element-web/issues/25625

* Provide mock function to avoid warning in JoinRuleSettings test
2023-10-05 03:30:57 +00:00
Florian Duros
d40092c9da
Element-R: Use MatrixClient.CryptoApi.getUserVerificationStatus instead of MatrixClient.checkUserTrust in MemberTile.tsx (#11701)
* Use `MatrixClient.CryptoApi.getUserVerificationStatus` instead of `MatrixClient.checkUserTrust` in `MemberTile.tsx`

* Add tests to `MemberTile.tsx`

* Use `mocked` instead of `spyOn`
2023-10-04 13:01:39 +00:00
Kerry
feb7e9899b
OIDC: persist id token claims (#11691)
* persist idTokenClaims

* tests

* remove unused cde
2023-10-04 05:06:04 +01:00
Michael Telatynski
e1cfde0c6e
Migrate more strings to translation keys (#11694) 2023-10-03 19:17:26 +01:00
Will Hunt
677854d318
Fix start_sso / start_cas URLs failing to redirect to a authentication prompt (#11681)
* Show screen before login if using start_sso or start_cas

* Add tests

* Fix lint

* Fix lint

* Add one for CAS

* prettier
2023-10-03 15:19:54 +00:00
Hugh Nimmo-Smith
4fd8ab933a
Use stable get_login_token and remove unstable MSC3882 support (#11001)
* Support for stable MSC3882 get_login_token

* Fix unstable name type

* Remove tests for unstable MSC3882

* Fix up tests
2023-10-03 12:15:41 +00:00
Michael Telatynski
632d8f4bc7
Update custom translations to support nested fields in structured JSON (#11685)
* Update matrix-web-i18n

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix custom translations for structured JSON nested fields

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix import

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix export

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update @matrix-org/react-sdk-module-api

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Delint

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update matrix-web-i18n

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update matrix-web-i18n

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2023-10-02 10:44:25 +00:00
R Midhun Suresh
9a76d6b9a3
Locallazy: Convert even more strings (#11679)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-10-02 11:43:00 +01:00
Michael Telatynski
e0f4b26512
Remove focus-visible polyfill (#11677)
* Remove focus-visible polyfill

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>
2023-09-28 11:52:26 +00:00
Hugh Nimmo-Smith
8442f1cf10
Use .well-known to discover a default rendezvous server for use with Sign in with QR (#11655) 2023-09-28 09:37:44 +00:00
Kerry
ef5a93b702
OIDC: retrieve refreshToken from storage (#11250)
* test persistCredentials without a pickle key

* test setLoggedIn with pickle key

* lint

* type error

* extract token persisting code into function, persist refresh token

* store has_refresh_token too

* pass refreshToken from oidcAuthGrant into credentials

* rest restore session with pickle key

* retreive stored refresh token and add to credentials

* extract token decryption into function

* remove TODO

* comments

* prettier

* comment pedantry

* fix code smell - nullish coalesce instead of ||

* more comments
2023-09-28 04:38:31 +00:00
Michael Telatynski
fa377cbade
Migrate more strings to translation keys (#11672) 2023-09-27 17:15:22 +01:00
Kerry
0d367a7c7e
Fix: sync intentional mentions push rules with legacy rules (#11667)
* fix monitorSyncedPushRules when primary rule is disabled

* sync intentional mentions rules

* remove debug log
2023-09-27 00:03:38 +00:00
Michael Telatynski
4d0d024e86
Migrate more strings to translation keys (#11671) 2023-09-26 18:35:55 +01:00
Michael Telatynski
5252361d1e
Migrate more strings to translation keys (#11669) 2023-09-26 13:04:17 +01:00
Andy Balaam
875fcb1a32
Merge pull request #11634 from matrix-org/germain-gg/facepile-offset
Revert "Fix regression around FacePile with overflow (#11527)"
2023-09-26 09:49:37 +01:00
Michael Telatynski
54c88c57ed
Migrate more strings to translation keys (#11665) 2023-09-25 18:12:41 +01:00
Michael Telatynski
0f59298f30
Consolidate conjugation i18n strings (#11660) 2023-09-25 12:18:15 +01:00
Germain
d99618263a
Merge branch 'develop' into germain-gg/facepile-offset 2023-09-25 11:33:28 +01:00
Michael Telatynski
f4d056fd38
Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
Richard van der Hoff
6fd46f3bc8
CreateSecretStorageDialog: stop using deprecated APIs (#11635)
* Add some tests for `CreateSecretStorageDialog`

* CreateSecretStorageDialog: stop using deprecated APIs
2023-09-22 11:03:05 +00:00
Richard van der Hoff
11f258e62e
SecureBackupPanel: stop using deprecated APIs, and other fixes (#11644)
* SecureBackupPanel: replace `isKeyBackupTrusted`

`MatrixClient.isKeyBackupTrusted` -> `CryptoApi.isKeyBackupTrusted`

* SecureBackupPanel: replace `getKeyBackupEnabled`

`MatrixClient.getKeyBackupEnabled` -> `CryptoApi.getActiveSessionBackupVersion`

* SecureBackupPanel: replace `deleteKeyBackupVersion`

`MatrixClient.deleteKeyBackupVersion` -> `CryptoApi.deleteKeyBackupVersion`

* Do not show session count if we have no info

We shouldn't say "zero sessions to back up" if we don't know.

* SecureBackupPanel: distinguish between server and active backup
2023-09-22 10:57:11 +00:00
Germain
899cc53a3e upgrade snapshots 2023-09-22 09:35:36 +01:00
Dominik Henneke
60bed46014
Add an action to upload media files according to MSC4039 (#11311)
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
2023-09-21 19:03:22 +00:00
Richard van der Hoff
902aea8bc4
LogoutDialog: Remove usage of deprecated keybackup API (#11645)
* tests for LogoutDialog

* LogoutDialog: Remove usage of deprecated keybackup API
2023-09-21 18:34:10 +00:00
Richard van der Hoff
c879882558
Don't start key backups when opening settings (#11640)
* SecureBackupPanel: stop calling `checkKeyBackup`

`checkKeyBackup` will start key backups if they aren't already running. In my
not-so-humble opinion, the mere act of opening a settings panel shouldn't change anything.

* fix SecurityUserSettingsTab test
2023-09-21 12:19:38 +00:00
Germain
fc9caa3269
Linkify room topic (#11631) 2023-09-20 11:51:15 +00:00
Richard van der Hoff
51ec7f04b4
DeviceListener: Remove usage of deprecated keybackup API (#11614)
Primarily this means calling `CryptoApi.getActiveSessionBackupVersion` instead
of `MatrixClisnt.getKeyBackupEnabled`
2023-09-20 11:34:18 +00:00
Michael Telatynski
5cb8cbd893
Migrate more strings to translation keys (#11613) 2023-09-19 17:16:38 +01:00
maheichyk
86e86ba49f
Show knock rooms in the list (#11573)
* Show knock rooms in the list

Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>

* Pass userId to IndexedDBStore

Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>

* Revert "Pass userId to IndexedDBStore"

Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>

* Code review changes

Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>

---------

Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>
Co-authored-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>
2023-09-19 11:24:35 +00:00
Michael Telatynski
c839123b83
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/cr/72
# Conflicts:
#	src/components/views/rooms/RoomHeader.tsx
#	test/components/views/rooms/__snapshots__/RoomHeader-test.tsx.snap
2023-09-19 10:36:29 +01:00
Johannes Marbach
3fbf38f17d
Escape placeholder before injecting it into the style (#11607)
* Escape placeholder before injecting it into the style

In particular this adds escaping for backslashes which was previously missing.

* Update snapshots

* Add tests
2023-09-19 05:58:53 +00:00
Kerry
46072caa3a
OIDC: persist refresh token (#11249)
* test persistCredentials without a pickle key

* test setLoggedIn with pickle key

* lint

* type error

* extract token persisting code into function, persist refresh token

* store has_refresh_token too

* pass refreshToken from oidcAuthGrant into credentials

* rest restore session with pickle key

* comments

* prettier

* Update src/Lifecycle.ts

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* comments

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-09-19 00:06:19 +00:00
Richard van der Hoff
cf2340bcad
Replace event verification logic with new code in js-sdk (#11528)
* Use new crypto-api for cross user verification

* update verification flow with new APIs

* Replace some calls to `checkUserTrust`

A start on https://github.com/vector-im/crypto-internal/issues/147

* Enable cypress tests

* update tests

* Delegate decisions on event shields to the js-sdk

* rerender after editing events

This is required because a transition from "valid event" to "unencrypted event"
no longer triggers a state change, so the component does not render
itself. Previously, this would be a transition from `verified:
E2EState.Normal` to `verified: null`.

* Update tests

* prettier

* Test coverage

---------

Co-authored-by: Florian Duros <florianduros@element.io>
2023-09-18 17:12:18 +00:00
Florian Duros
579b0dd10a
ElementR: Cross user verification (#11364)
The hard work has been done in previous PRs in the js-sdk, so this is now just a case of updating a few call sites to use the new APIs.
2023-09-18 17:34:00 +01:00
RMidhunSuresh
2f69013f6d
Merge branch 'develop' into germain-gg/notifications-labs 2023-09-15 16:28:59 +05:30
Johannes Marbach
3608d52c4a
Default intentional mentions (#11602)
* Default intentional mentions

* wait for autocomplete to settle before submitting edit

* lint

* Update strings

---------

Co-authored-by: Kerry Archibald <kerrya@element.io>
2023-09-14 11:36:15 +00:00
Michael Telatynski
e301fe474b
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/cr/72
# Conflicts:
#	test/components/views/rooms/__snapshots__/RoomHeader-test.tsx.snap
2023-09-14 11:33:22 +01:00
RMidhunSuresh
1ba419fe11
Merge branch 'develop' into germain-gg/notifications-labs 2023-09-14 12:14:08 +05:30
RiotRobot
2d5e486db6 Merge branch 'master' into develop 2023-09-13 12:01:35 +01:00
Michael Telatynski
4deb864322
Update Compound to fix Firefox-specific avatar regression (#11604) 2023-09-13 11:32:47 +01:00
Michael Telatynski
68e8fa7c8c
Tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2023-09-12 08:35:07 +01:00
Michael Telatynski
e54dd60381
Update tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2023-09-11 17:55:32 +01:00
Charly Nguyen
5cf2e1514b
Use knock rooms sync to reflect the knock state (#11596)
Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>
2023-09-11 16:33:40 +00:00
Charly Nguyen
bb91df1d3c
Avoid rendering view-message link in RoomKnocksBar unnecessarily (#11598)
Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>
2023-09-11 13:33:27 +00:00
Charly Nguyen
0059c7c1ee
Allow setting knock room directory visibility (#11529)
* Allow setting knock room directory visibility

Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>

* Apply PR feedback

Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>

---------

Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>
2023-09-08 01:00:48 +00:00
renovate[bot]
06b35cd2a2
Update jest (#11564)
* Update jest

* Fix tests

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-09-07 16:34:52 +00:00
nurjin jafar
ce96853ad7
Notify users about denied access on ask-to-join rooms (#11480)
* Implement denied request mask and logic

Signed-off-by: AHMAD KADRI <52747422+ahmadkadri@users.noreply.github.com>

* refactor / fix deny requests isues

* fix tests create denied message test

Signed-off-by: AHMAD KADRI <52747422+ahmadkadri@users.noreply.github.com>

* add another test for the primary action for denied request

Signed-off-by: AHMAD KADRI <52747422+ahmadkadri@users.noreply.github.com>

* fix linter issues

Signed-off-by: nurjinn jafar <nurjin.jafar@nordeck.net>

* regenerate translation

Signed-off-by: nurjinn jafar <nurjin.jafar@nordeck.net>

* fix translation and minor refactoring
Signed-off-by: nurjinn jafar <nurjin.jafar@nordeck.net>

* segment into 4

* Remove parallel from Cypress command to avoid talking to Cypress Cloud

* Re-add --parallel flag for Percy

* Prevent event propagation when clicking icon buttons (#11515)

* Prevent event propagation when clicking icon buttons

* Inhibit view user on click behaviour for room header face pile

* Update snapshot

* Add a 'm.relates_to' to edits in receipt tests and disable failing tests (#11501)

* Add a 'm.relates_to' to edits in receipt tests

* Disable a test that fails with real edits

* Wait for the room to be read after we mark it as read

* Skip tests that are failing because of inconsistencies between local and CI behaviour

* Allow creating public knock rooms (#11481)

* Allow creating public knock rooms

Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>

* Apply PR feedback

Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>

* Apply PR feedback

Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>

---------

Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>

* Collect `console.debug` logs during cypress tests (#11478)

In order for the logs collected by cypress to actually be useful, we really
need `cons:debug`.

* Migrate more strings to translation keys (#11522)

* Only show Search button in RoomSummaryCard if new room UI enabled (#11524)

* Only show Search button in RoomSummaryCard if new room UI enabled

* Update snapshot

* Update vector-im (#11526)

* Update vector-im

* Update snapshots of Compound Avatars

* Update snapshots of Compound Avatars

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>

* Migrate more strings to translation keys (#11530)

* Fix regression around FacePile with overflow (#11527)

* Work around compound-web AvatarStack not applying overlap to non-Avatars

* Fix FacePile overflow tile not being layed out correctly

* Use RoomStateEvent.Update for knocks (#11516)

Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>

* Cypress tests for event shields (#11525)

* Factor downloadKey out to `utils.ts`

* Add a new `describe` block for event shields

* create a beforeEach block

* Cypress tests for event shields

* Document how to match the CI config for Cypress (#11531)

* Document how to match the CI config for Cypress

* Clarify language about needing Chrome

* Move Cypress info into the Cypress-specific docs

* Migrate more strings to translation keys (#11532)

---------

Signed-off-by: AHMAD KADRI <52747422+ahmadkadri@users.noreply.github.com>
Signed-off-by: nurjinn jafar <nurjin.jafar@nordeck.net>
Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>
Co-authored-by: AHMAD KADRI <52747422+ahmadkadri@users.noreply.github.com>
Co-authored-by: Kerry Archibald <kerrya@element.io>
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
Co-authored-by: Johannes Marbach <johannesm@element.io>
Co-authored-by: Germain <germains@element.io>
Co-authored-by: Charly Nguyen <1422657+charlynguyen@users.noreply.github.com>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-07 08:07:43 +00:00
RMidhunSuresh
9ceac6eae1
Merge branch 'develop' into germain-gg/notifications-labs 2023-09-06 19:13:10 +05:30
Charly Nguyen
fca9f0e91d
Use RoomStateEvent.Update for knocks (#11516)
Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>
2023-09-05 10:26:37 +00:00
renovate[bot]
d34dc0c307
Update vector-im (#11526)
* Update vector-im

* Update snapshots of Compound Avatars

* Update snapshots of Compound Avatars

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-09-05 08:09:36 +00:00
Michael Telatynski
7b62abc14b
Only show Search button in RoomSummaryCard if new room UI enabled (#11524)
* Only show Search button in RoomSummaryCard if new room UI enabled

* Update snapshot
2023-09-04 17:48:55 +00:00
Charly Nguyen
2ff1056cb2
Allow creating public knock rooms (#11481)
* Allow creating public knock rooms

Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>

* Apply PR feedback

Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>

* Apply PR feedback

Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>

---------

Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>
2023-09-04 16:09:44 +00:00
Johannes Marbach
44d4de14c9 Merge branch 'develop' into germain-gg/notifications-labs
# Conflicts:
#	src/i18n/strings/en_EN.json
#	test/components/views/rooms/__snapshots__/RoomHeader-test.tsx.snap
2023-09-04 14:08:50 +02:00
Germain
b75b6f7f74
Prevent event propagation when clicking icon buttons (#11515)
* Prevent event propagation when clicking icon buttons

* Inhibit view user on click behaviour for room header face pile

* Update snapshot
2023-09-04 11:42:27 +00:00
Sumner Evans
a54f2ff878
Render custom images in reactions (#11087)
* Add support for rendering custom emojis in reactions

Signed-off-by: Sumner Evans <sumner@beeper.com>

* Include custom reaction short names in tooltips

Signed-off-by: Sumner Evans <sumner@beeper.com>

* Use custom reaction shortcode for accessibility

This uses the shortcode in the following places:

* The aria-label of the reaction buttons
* The alt text for the reaction image

Signed-off-by: Sumner Evans <sumner@beeper.com>

* Remove explicit instantiation of `customReactionName` variable and add types

Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>

* Put custom reaction images behind a labs flag

Signed-off-by: Sumner Evans <sumner@beeper.com>

* Use UnstableValue for finding the shortcode

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Sumner Evans <sumner@beeper.com>

* Move calculation of whether to render custom reaction images up to ReactionRow

Signed-off-by: Sumner Evans <sumner@beeper.com>

* Make alt text more friendly when custom reaction doesn't have shortcode

Signed-off-by: Sumner Evans <sumner@beeper.com>

* Add test for ReactionsRowButton

Signed-off-by: Sumner Evans <sumner@beeper.com>

* Apply suggestions from code review

Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>

* Don't use Optional

Signed-off-by: Sumner Evans <sumner@beeper.com>

* Fix ReactionsRowButton test

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Sumner Evans <sumner@beeper.com>

---------

Signed-off-by: Sumner Evans <sumner@beeper.com>
Co-authored-by: Tulir Asokan <tulir@maunium.net>
Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-09-01 10:16:24 +00:00
Germain
d551469543
Room header UI updates (#11507)
* Fix performance issues with useRoomMembers

With the current implementation it would create a new function, with leading: true, rendering the whole throttling useless

* Add public room indicator

* Format room members count better

* Add public room test

* Add search to room summary card

* Update settings UI

* Update snapshot

* Remove default title attribute
2023-09-01 09:45:50 +00:00
Richard van der Hoff
30d997e21c
Remove green "verified" bar for e2e events (#11496)
There is a little-known feature where, if you have verified a user (eg, via the
emoji game), then when you mouse-over a message that they sent, it gets a green
highlight.

We also show a brown bar sometimes, and according to the CSS there may be a
yellow bar too?

Very few people seem to know this exists, and even if you do know it exists
nobody seems to understand what exactly the various colours are supposed to be.

So, rather than porting this magic mystery feature to Rust Crypto, let's rip it
out.
2023-09-01 09:41:14 +00:00
Charly Nguyen
6faad7aae3
Fix avatars of knock members for people tab of room settings (#11506)
Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>
2023-09-01 09:40:35 +00:00
Germain
f8ed681ee3 Snapshot updates 2023-09-01 08:33:03 +01:00
Germain
84922fc488 Update tests 2023-08-31 21:57:45 +01:00
Charly Nguyen
45094bda7c
Introduce room knocks bar (#11475)
* Introduce room knocks bar

Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>

* Apply PR feedback

Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>

---------

Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>
2023-08-31 13:43:38 +00:00
Germain
46037d2357
Add E2E status in room header (#11493)
* Add E2E status in room header

* Clearer logic for dmRoomList

Co-authored-by: Andy Balaam <andy.balaam@matrix.org>

* Add test for E2E shield

* Remove dead code

---------

Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
2023-08-31 11:06:14 +00:00
Germain
dc70ea5059
Add face pile to rooms (#11356)
* Add face pile to rooms

* Migrate FacePile to use Compound

* Fix CI

* Use FacePile component in room header

* Add facepile tests

* Make dead code CI happy

* Lint

* Fix tests

* Fix CSS selectors

* Update room face pile snapshot

* Use useMemo instead of useState and useEffect

* Remove unused imports

* Update snapshot

* Update snapshot
2023-08-30 17:55:02 +00:00
Germain
6aa86a858f
Fixes read receipt avatar offset (#11483)
* Fixes read receipt avatar offset

Fixes https://github.com/vector-im/element-web/issues/26059

* Fix avatar collapsing in thread list

Fixes https://github.com/vector-im/element-web/issues/26064

* Make composer pills use new avatar design

Fixes https://github.com/vector-im/element-web/issues/26067

* Update snapshots

* Update UserInfo snapshot

* Update HTMLExport snapshot

* Fixes avatar placeholder font

Fixes https://github.com/vector-im/element-web/issues/26061
2023-08-30 11:47:35 +00:00
Richard van der Hoff
6cc42b7e2e
Improve error handling for DeviceListener (#11484)
... particularly for when it races with a client shutdown.
2023-08-30 09:35:15 +00:00
Charly Nguyen
50160b9969
Allow requesting to join knock rooms via spotlight (#11482)
Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>
2023-08-30 06:54:26 +00:00
Germain
968213a5d7
Fix avatar defects (#11473)
* Fix avatar initial centering in pills for bubbles

* Express user info avatar size in pixes

* fix link pill icon

* Fix snapshot test
2023-08-29 07:57:23 +00:00
Germain
23897dff4f
Fix colour of avatar and colour matching with username (#11470)
* Use consistent colouring of username with avatar

* Upgrade Compound to fix Firefox issue

* Use the approapriate color shade for usernames

* Use the approapriate color shade for usernames

* Upgrade Compound

* Fix tests
2023-08-24 17:12:28 +00:00
Richard van der Hoff
18866e3856
Fix incompatibility of Soft Logout with Element-R (#11468)
* Fix incompatibility of Soft Logout with Element-R

This `countSessionsNeedingBackup` isn't available in Element-R, and I don't
really understand the logic behind changing the message when we have sessions
that are awaiting backup. Let's just rip it out.

* i18n

* update snapshot
2023-08-24 13:27:32 +00:00
Richard van der Hoff
839c0a720c
Lock out the first tab if Element is opened in a second tab. (#11425)
* Implement session lock dialogs

* Bump analytics-events package

* clean up resetJsDomAfterEach

* fix types

* update snapshot

* update i18n strings
2023-08-24 08:28:43 +00:00
Germain
09c5e06d12
Change avatar to use Compound implementation (#11448)
* Move avatar to new compound implementation

* Make space avatars square

* Remove reference to the avatar initial CSS class

* remove references to mx_BaseAvatar_image

* Fixe test suites

* Fix accessbility violations

* Add ConfirmUserActionDialog test

* Fix tests

* Add FacePile test

* Fix items clipping in members list

* Fix user info avatar sizing

* Fix tests
2023-08-24 03:48:35 +00:00
Germain
3acc9059ab
Add Voice and Video call in room header (#11444)
* Add Voice and Video call in room header

* Add thread icon in room header

* Add room notification icon to room header

* Fix linting

* Add tests for buttons in room header

* Add JSDoc

* micro optimisations

* Fix call disabled when hanging up

* Fix disabled state change on members count update

* Exclude functional members from members count optionally

* i18n
2023-08-23 14:13:40 +00:00
Michael Telatynski
d5cacff6c3
Create more action_* common strings (#11438) 2023-08-23 11:57:22 +01:00
Andy Balaam
e79b03a2df
Avoid importing mkEvent from matrix-js-sdk/spec since that is not in the package (#11450) 2023-08-23 09:51:27 +00:00
Michael Telatynski
99e80dd296
Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
Michael Telatynski
aa6e3654b8
Create more common_* common strings (#11439) 2023-08-23 10:25:33 +01:00
Michael Telatynski
df4a2218d7
Align action_* strings with Element X project in Localazy (#11437) 2023-08-22 20:55:15 +01:00
Michael Telatynski
c40141cc4f
Align common_* strings with Element X project in Localazy (#11434) 2023-08-22 18:47:33 +01:00
Michael Telatynski
0d8b58cdd7
Get country names from the browser instead of manual i18n (#11428)
* Get country names from the browser instead of manual i18n

* Make getUserLanguage more resilient to bad inputs

* Improve coverage
2023-08-22 16:15:16 +00:00
Michael Telatynski
ac70f7ac9b
Fix instances of double translation and guard translation calls using typescript (#11443)
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-08-22 16:32:05 +01:00
Richard van der Hoff
d13b6e1b41
Add mechanism to check only one instance of the app is running (#11416)
* Add mechanism to check only one instance of the app is running

This isn't used yet, but will form part of the solution to
https://github.com/vector-im/element-web/issues/25157.

* disable instrumentation for SessionLock

* disable coverage reporting

* exclude SessionLock in sonar.properties

* Revert "disable coverage reporting"

This reverts commit 80c4336f76ec8e47e376b6744ef612a73299d14f.

* only disable session storage

* use pagehide instead of visibilitychange

* Add `checkSessionLockFree`

* Give up waiting for a lock immediately when someone else claims

* Update src/utils/SessionLock.ts
2023-08-22 14:10:47 +00:00
Michael Telatynski
4de315fb6c
Use Intl for names of languages (#11427)
* Use Intl for names of languages

* Tweak Intl language style from "American English" -> "US English"

* Update tests

* Fix tests

* Consolidate languageHandler-test files

* Improve coverage

* Consistent casing for languages in dropdown

* Update LanguageDropdown.tsx

* Delint & update snapshot

* Fix tests

* Improve coverage

`of` will fallback to the given code with fallback=code (default)
2023-08-22 14:07:16 +00:00
Kerry
3684c77cfe
Hide account deactivation for externally managed accounts (#11445)
* util for account url

* test cases

* disable multi session selection on device list

* remove sign out all from context menus when oidc-aware

* comment

* remove unused param

* typo

* dont show account deactivation for externally managed accounts

* Update snapshots - field ID changed

---------

Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
2023-08-22 11:51:16 +00:00
Kerry
23196d49e1
OIDC: Redirect to delegated auth provider when signing out (#11432)
* util for account url

* test cases

* disable multi session selection on device list

* remove sign out all from context menus when oidc-aware

* comment

* remove unused param

* redirect to auth provider when signing out

* open auth provider in new tab, refresh sessions on return

* correct comment

* fix bad copy paste

* try to make sonar happy

* Update for latest revision of MSCs

* Update SessionManagerTab-test.tsx

* Make InteractiveAuthCallback async and await it

---------

Co-authored-by: Hugh Nimmo-Smith <hughns@matrix.org>
Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
2023-08-22 11:15:35 +00:00
Kerry
5c1b62cf99
Disable 3pid fields in settings when m.3pid_changes capability is disabled (#11430)
* check m.3pid_changes capability in user settings

* comments

* assume 3pid_changes is true for older evrsions
2023-08-22 06:07:10 +00:00
Kerry
dfded8d4d3
OIDC: disable multi session signout for OIDC-aware servers in session manager (#11431)
* util for account url

* test cases

* disable multi session selection on device list

* remove sign out all from context menus when oidc-aware

* comment

* remove unused param

* typo
2023-08-22 02:25:34 +00:00
Michael Telatynski
3c52ba0c92
Use Intl to localise dates and times (#11422)
* Use Intl to generate better internationalised date formats

* Get `Yesterday` and `Today` from Intl also

* Correct capitalisation blunder

* Fix formatTime include weekday

* Iterate

* Fix tests

* use jest setSystemTime

* Discard changes to cypress/e2e/settings/general-user-settings-tab.spec.ts

* Discard changes to res/css/_components.pcss

* Discard changes to res/css/views/elements/_LanguageDropdown.pcss

* Discard changes to src/components/views/elements/LanguageDropdown.tsx

* Add docs & tests for getDaysArray & getMonthsArray

* Discard changes to test/components/structures/__snapshots__/MatrixChat-test.tsx.snap

* Consolidate consts

* Improve testing & documentation

* Update snapshot

* Apply suggestions from code review

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Iterate

* Clarify comments

* Update src/DateUtils.ts

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Specify hourCycle

* Discard changes to test/components/views/settings/devices/DeviceDetails-test.tsx

* Update comments

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-08-21 19:38:59 +00:00
Dominik Henneke
5c43054bfe
Implement updated open dialog method of the Module API (#11395)
* Implement updated open dialog method

Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>

* Apply the review comments

Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>

* Add unit tests for the module system dialog

Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>

* Bump @matrix-org/react-sdk-module-api from 1.0.0 to 2.0.0

Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>

* Run prettier

Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>

* Apply review comments

Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>

---------

Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
2023-08-21 12:09:17 +00:00
Michael Telatynski
dd6097c568
Polish & delabs Exploring public spaces feature (#11423)
* Iterate search public spaces UX

* Tweak iconography in spotlight

* Delabs `Exploring public spaces`

* Tweak msc3827 v1.4 support discovery

* i18n

* Delete stale test

* Fix tests

* Iterate

* Iterate PR based on review

* Improve types

* Add shortcut to search for public spaces to create space menu

* Update import

* Add org.matrix.msc3827.stable filtering

* Fix tests

* silence some errors
2023-08-21 09:39:20 +00:00
Michael Telatynski
d81f71f993
Load SAS Emoji translations from @matrix-org/spec (#11429)
* Remove last instance of componentWillMount

* Load SAS Emoji translations from @matrix-org/spec

* Fix import

* Test normalisation on both sides

* update comment for @richvdh

* Delint
2023-08-21 08:15:22 +00:00
Michael Telatynski
ff9d4905d5
Fix export type "Current timeline" to match its behaviour to its name (#11426)
* Fix export type "Current timeline" to match its behaviour to its name

* Iterate tests
2023-08-18 11:58:58 +00:00
Richard van der Hoff
4a5b686aaa
Update MatrixChat-test to restoreAllMocks after each test (#11424)
* Update MatrixChat to  `restoreAllMocks` after each test

This helps keep tests independent.

* more MatrixChat fixes
2023-08-17 19:06:45 +00:00
Denis Kasak
5aefd4652a
Treat lists with a single empty item as plain text, not Markdown. (#6833)
* Treat lists with a single empty item as plain text, not Markdown.

This allows users to send simple messages such as `-`, `+`, `*` and
`2021.` without Element Web mangling them into a nonsensical empty list.
As soon as any non-whitespace content is added to the item, it switches
back to treating it as a list of one item.

Fixes vector-im/element-web#7631.

* Fix type errors.

* Lint.

---------

Co-authored-by: Michael Weimann <michaelw@matrix.org>
Co-authored-by: Johannes Marbach <johannesm@element.io>
2023-08-17 16:37:19 +00:00
Michael Telatynski
aee6247ad8
Switch to nested object pluralisation format for i18n files (#11412) 2023-08-16 20:08:54 +01:00
Richard van der Hoff
523e691136
MatrixChat-test: stop mocking localStorage (#11419)
We have a perfectly good localStorage impl; no need to do a half-arsed mock of
it.
2023-08-16 16:28:46 +00:00
Michael Telatynski
6b14ecfdf9
Re-key all |zero-pluralised translations for Localazy compatibility (#11417)
* Re-key all |zero-pluralised translations for Localazy compatibility

* Add missing interpolation variable

* i18n

* Add test coverage

* Improve coverage
2023-08-16 15:26:21 +00:00
Richard van der Hoff
7a6d81c3b8
Update Jest to more recent release (#11409)
* Update Jest to more recent release

I want to use things like `jest.advanceTimersByTimeAsync`

* more jest updates

* add dep on types/prettier

* fix LegacyRoomHeader-test

* fix MatrixChat-test

* fix RoomView-test

* fix PollHistory-test

* update SidebarUserSettingsTab-test

* fix PipContainer-test

* fix UserOnboardingPage-test

* fix WidgetContextMenu-test.tsx

* Avoid `mockImplementation` for mock `matchMedia` impl

`mockImplementation` is (now) reset by `jest.resetAllMocks` and
`jest.restoreAllMocks`, which we don't really want here.

Fixes `theme-test`

* Move `mediaDevices` mock out of `setupManualMocks`

This doesn't work well in test suites with multiple tests, because the
`mockReturnValue` is reset for subsequent tests.

In any case, having it mocked out automagically is *magical*. Let's make it
opt-in.

* fix FormattingButtons-test.tsx

* fix DeviceListenerTest

* fix RoomTile-test
2023-08-16 10:20:48 +00:00
Richard van der Hoff
3fda0299a5
Move mediaDevices mock out of setupManualMocks (#11413)
* Move `mediaDevices` mock out of `setupManualMocks`

This doesn't work well in test suites with multiple tests, because the
`mockReturnValue` is reset for subsequent tests.

In any case, having it mocked out automagically is *magical*. Let's make it
opt-in.

* clarify ts-ignore
2023-08-16 08:29:34 +00:00
Charly Nguyen
d569ba0cfe
Allow managing room knocks (#11404)
* Allow managing room knocks

Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>

* Apply PR feedback

Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>

* Apply Sonar feedback

Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>

---------

Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>
2023-08-16 08:16:19 +00:00
Michael Telatynski
ad73b0c16e
Switch to importing most things from the main matrix-js-sdk export (#11406)
* Switch to importing most things from the main matrix-js-sdk export

* fix imports

* Iterate

* Fix tests
2023-08-15 15:00:17 +00:00
Michael Telatynski
0842559fb2
Simplify registration with email validation (#11398) 2023-08-15 16:14:53 +01:00
Michael Telatynski
27d79458da
Remove dead & duplicated code (#11405)
* Remove dead code

* Make dead code happier

* DRY pickle additional data calculation

* Iterate
2023-08-15 08:43:15 +00:00
Richard van der Hoff
672ad98ec7
Clean up the MatrixChat initSession code (#11403)
`async` functions are a thing, and they make this much more comprehensible.
2023-08-14 12:52:08 +00:00
Neeraj Vageele
6f455217d1
correct home server URL (#11391)
* correct home server URL

* update snapshot

---------

Co-authored-by: Neeraj <neerajv@thirdrocktechkno.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-08-14 09:08:34 +00:00
Michael Telatynski
d2c6577024
Switch to importing more things from the main js-sdk export (#11394) 2023-08-14 08:58:55 +00:00
Travis Ralston
180fcaa70f
Support Matrix 1.1 (drop legacy r0 versions) (#9819)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-08-14 09:25:13 +01:00
Milton Moura
d240f06810
Include non-matching DMs in Spotlight recent conversations when the DM's userId is part of the search API results (#11374)
* This addresses two issues:

     1. Include non-matching DMs in Spotlight suggestions if the userId of the DM is included in the user directory search results
     2. The user directory search results order is kept when there is no relevant activity between users, instead of sorting by MXID

* Applying feedback from PR:
1. Updated comments
2. Renamed users to userDirectorySearchResults
3. Makes sure linter is happy
2023-08-10 17:27:24 +00:00
Michael Telatynski
ef385e6028
Switch to importing more things from the main js-sdk export (#11377) 2023-08-10 08:01:14 +00:00
Michael Telatynski
a1328d8ef7
Switch to importing more things from the main js-sdk export (#11376) 2023-08-09 15:10:54 +00:00
Michael Telatynski
e6c127915f
Fix useRoomMembers missing updates causing incorrect membership counts (#11392)
* Fix useRoomMembers missing updates

* Also fix useRoomMemberCount

* Add tests
2023-08-09 12:27:37 +00:00
Michael Telatynski
57a0d99dc8
Improve randomString mock for better snapshots (#11375) 2023-08-09 09:39:48 +01:00
Michael Telatynski
c3574c2050
Switch to importing client from main js-sdk export (#11370) 2023-08-09 07:18:41 +00:00
Kerry
e0d498e338
Enable jsx-a11y/click-events-have-key-events eslint rule (#10362)
* enable "jsx-a11y/alt-text" lint rule

* enable "jsx-a11y/label-has-associated-control"

* make Spoilers keyboard accessible

* make invite reason keyboard accessible

* make invite suggestions keyboard accessible

* make avatar upload in space basic settings keyboard accessible

* ignore jsx-a11y/click-events-have-key-events issues in tests

* Update test expectation

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-08-09 06:27:31 +00:00
Michael Telatynski
2b17fc3221
Show error when searching public rooms fails (#11378)
* Show error when searching public rooms fails

* Fix types

* Improve test coverage

* Improve coverage
2023-08-08 14:08:17 +00:00
Germain
84d196776e
Change formatCount impl to use Intl.NumberFormat (#11379)
* Change formatCount impl to use Intl.NumberFormat

* Update formatCount JSDoc description
2023-08-08 11:45:20 +00:00
Michael Telatynski
033c600fa2
Switch to importing @types/{event,partials} from main js-sdk export (#11369) 2023-08-08 10:12:12 +00:00
Michael Telatynski
368b6b9355
Switch to importing models/{event-timeline{,set},user,device,event-status} from main js-sdk export (#11368) 2023-08-08 07:16:04 +00:00
Rashmit Pankhania
b08bdf7e0d
Fix "Export chat" not respecting configured time format in plain text mode (#10696)
* #23838 Fix "Export chat" time format in plain text mode

* #23838 Fix import of matrix-js-sdk

* Remove hardcoded locale

Co-authored-by: Michael Weimann <mail@michael-weimann.eu>

* Fix test for readability

Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net>

* Fix test

Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net>

* Fix test

Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net>

* Fix test

Signed-off-by: Rashmit Pankhania <rashmitpankhania@gmail.com>
Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net>

* Use dateUtils formatFullDate function

Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net>

---------

Signed-off-by: Rashmit Pankhania <raspankh@publicisgroupe.net>
Signed-off-by: Rashmit Pankhania <rashmitpankhania@gmail.com>
Co-authored-by: Rashmit Pankhania <raspankh@publicisgroupe.net>
Co-authored-by: Michael Weimann <mail@michael-weimann.eu>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-08-07 13:58:45 +00:00
Michael Telatynski
24703eea8f
Switch to importing models/event from main js-sdk export (#11363) 2023-08-07 08:24:58 +00:00
Charly Nguyen
5152aad059
Allow knocking rooms (#11353)
Signed-off-by: Charly Nguyen <charly.nguyen@nordeck.net>
2023-08-07 06:27:09 +00:00
Michael Telatynski
e6af09e424
Switch to importing models/room-state & models/room-member from main js-sdk export (#11362)
* Switch to importing TypedEventEmitter from main js-sdk export

* Switch to importing js-sdk/matrix in cypress

* Remove duplicated imports

* Fix lint:js-fix to run prettier last otherwise ESLint --fix may cause a mess

* Add lint rule

* Switch to importing models/Room from main js-sdk export

* Switch to importing models/room-state & models/room-member from main js-sdk export

* Fix cypress-axe import

* Fix more imports

* Fix cypress-axe import

* Fix bad merge
2023-08-04 11:22:08 +00:00
Michael Telatynski
e67ca33c4a
Switch to importing models/Room from main js-sdk export (#11361)
* Switch to importing TypedEventEmitter from main js-sdk export

* Switch to importing js-sdk/matrix in cypress

* Remove duplicated imports

* Fix lint:js-fix to run prettier last otherwise ESLint --fix may cause a mess

* Add lint rule

* Switch to importing models/Room from main js-sdk export

* Fix cypress-axe import

* Fix more imports

* Fix cypress-axe import

* Fix duplicated lint rule
2023-08-04 07:36:16 +00:00
Peter Scheu
5ee8e61bf5
Search for users on paste (#11304)
Signed-off-by: Peter Scheu <peter.scheu@aceart.de>
2023-08-04 07:19:56 +00:00
Travis Ralston
771d7e95e7
Support adding space-restricted joins on rooms not members of those spaces (#9017)
* Support adding space-restricted joins on rooms not members of those spaces

* add react dependencies

* Add snapshot test

* Fix snapshot stability

* Update snapshot

* Increase coverage

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-08-03 15:56:53 +00:00
Michael Telatynski
47877ba2da
Switch to importing matrix-js-sdk from its main export (#11360)
* Switch to importing TypedEventEmitter from main js-sdk export

* Switch to importing js-sdk/matrix in cypress

* Remove duplicated imports

* Fix lint:js-fix to run prettier last otherwise ESLint --fix may cause a mess

* Add lint rule

* Fix cypress-axe import

* Fix cypress-axe import
2023-08-03 12:56:30 +00:00
Michael Telatynski
755f8d7ab0
Fix AppTile context menu not always showing up when it has options (#11358)
* Fix AppTile context menu not always showing up when it has options

* Comment

* Update snapshots
2023-08-03 09:23:20 +00:00
Germain
d94808a197
Make room model mandatory on the RoomHeader (#11355)
* Remove oobData from RoomHeader

It is never used as the RoomHeader is not shown unless a Room model exists

* Make room model mandatory on the RoomHeader
2023-08-02 15:29:19 +00:00
Germain
d49581344e
Integrate @vector-im/compound-web (#11354)
* Create useRoomName hook

Mark RoomName component as deprecated

* Pass out-of-band data to relevant RoomHeader component

* Mark LegacyRoomHeader as deprecated

* Fix incorrect search&replace in _RoomHeader.pcss

* lintfix

* Mark room as optional in room topic hook

* Fix i18n

* Discard use of useCallback

* Change export of useRoomName

* fix ts issue

* lints

* Add room topic to room header

* lintfix

* lintfix & clamp to one line

* Revert optimisations to DecoratedRoomAvatar

* Add test for opening the room summary

* Make transition honour prefer-reduced-motion

* Integrate @vector-im/compound-web

* Use compound type styles

* Use latest version of @vector-im/compound-web

* Change component name

* Fallback when room is undefined

* fix snapshot
2023-08-02 13:03:04 +00:00
Germain
33299af5c9
Add room topic and animation (#11352)
* Create useRoomName hook

Mark RoomName component as deprecated

* Pass out-of-band data to relevant RoomHeader component

* Mark LegacyRoomHeader as deprecated

* Fix incorrect search&replace in _RoomHeader.pcss

* lintfix

* Mark room as optional in room topic hook

* Fix i18n

* Discard use of useCallback

* Change export of useRoomName

* fix ts issue

* lints

* Add room topic to room header

* lintfix

* lintfix & clamp to one line

* Revert optimisations to DecoratedRoomAvatar

* Add test for opening the room summary

* Make transition honour prefer-reduced-motion

* Fallback when room is undefined

* fix snapshot
2023-08-02 10:54:06 +00:00
Michael Telatynski
8166306e0f
Fix clicking on home all rooms space notification not working (#11337)
* Fix clicking on home all rooms space notification not working

* Add test
2023-08-02 09:55:49 +00:00
Michael Telatynski
2f2067e434
Fix home/all rooms context menu in space panel (#11350)
* Fix home/all rooms context menu in space panel

* Fix tests
2023-08-01 15:26:14 +00:00
Germain
5d9f5ccf0b
Create useRoomName hook (#11346)
* Create useRoomName hook

Mark RoomName component as deprecated

* Pass out-of-band data to relevant RoomHeader component

* Mark LegacyRoomHeader as deprecated

* Fix incorrect search&replace in _RoomHeader.pcss

* lintfix

* Fix i18n

* Discard use of useCallback

* Change export of useRoomName

* fix ts issue

* lints
2023-08-01 13:47:09 +00:00
Michael Telatynski
340e301844
Make keyboard handling in and out of autocomplete completions consistent (#11344)
* Make keyboard handling in and out of autocomplete completions consistent

* Add test
2023-08-01 09:06:37 +00:00
Germain
6ae7c033d5
Add feature flag 'feature_new_room_decoration_ui' and segrate legacy UI component (#11345)
* Move RoomHeader to LegacyRoomHeader

* Create new RoomHeader component
2023-08-01 07:32:53 +00:00
Richard van der Hoff
ddb8e0aa3a
Update SecureBackupPanel to use getCrypto() (#11322)
`MatrixClient.crypto` is going away, so let's switch over to `getCrypto()`.

There doesn't seem to be anything else relying on the `crypto` stub in
`mockClientMethodsCrypto()`, so let's get rid of that.
2023-07-28 09:24:28 +00:00
Kerry
5636a9f7ca
Unit test logout action in MatrixChat (#11303)
* test logout action in MatrixChat

* add restore all mocks
2023-07-28 02:25:18 +00:00
Richard van der Hoff
f6fc5cad5c
Remove display of key backup signatures from backup settings (#11333)
* Remove display of Key backup signatures

This is *fiddly* to support in Element-R, and we don't really think it's
offering any value.

* update snapshot

* clean up i18n
2023-07-27 19:52:02 +00:00
renovate[bot]
5405c22db1
Update all non-major dependencies (#11329)
* Update all non-major dependencies

* Add isLocation to ComposerEvent analytics events

* Remove cypress-each as it is incompatible with modern typescript

* Roll back eslint-plugin-deprecate

* Remove stale comment

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-07-27 11:34:44 +00:00
Michael Telatynski
d405160080
Use PassphraseFields in ExportE2eKeysDialog to enforce minimum passphrase complexity (#11222)
* Use PassphraseFields in ExportE2eKeysDialog to enforce minimum passphrase complexity

* Tweak copy

* Iterate

* Add tests

* Improve variable naming

* Improve coverage
2023-07-27 09:21:20 +00:00
Michael Telatynski
3ab0757604
Fix edge case with sent indicator being drawn when it shouldn't be (#11320)
* Fix edge case with sent indicator being drawn when it shouldn't be

* Comment
2023-07-27 07:41:36 +00:00
Germain
22f83e7917
Use correct translation function for WYSIWYG buttons (#11315)
* Use correct translation function for WYSIWYG buttons

* Add tests
2023-07-26 11:30:54 +00:00