Commit Graph

2420 Commits

Author SHA1 Message Date
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