Commit Graph

46660 Commits (af268b4a03fdaa9e873014380e282ac9195e73a5)

Author SHA1 Message Date
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
RiotRobot d4f681375d v3.79.0-rc.1 2023-08-22 15:30:05 +01:00
RiotRobot dcdfb22b37 Prepare changelog for v3.79.0-rc.1 2023-08-22 15:30:03 +01:00
RiotRobot d2b287cb29 Upgrade matrix-js-sdk to 28.0.0-rc.1 2023-08-22 15:26:53 +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
Michael Telatynski d4571aef68
Consume @matrix-org/emojibase-bindings (#11433) 2023-08-21 20:06:40 +01:00
maheichyk 4e4016dffc
Bump module api from 2.0.0 to 2.1.0 (#11442)
Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>
Co-authored-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>
2023-08-21 17:09:37 +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 3a647229ad
Update matrix-web-i18n (#11436) 2023-08-21 11:36: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
Andy Balaam 3d2d08b132
Support Podman style of accessing the host network in Cypress tests (#11421)
* Supply '--network slirp4netns:allow_host_loopback=true' argument when launching via Podman

This means that the host.containers.internal address will work as a way
to access the host machine's network from within the container in
Podman. This is eqivalent to '--add-host
host.docker.internal:host-gateway' in Docker.

* Log the locations of generated files for Cypress tests

* Use 'host.containers.internal' to access the host network when using Podman

* Support Podman in email Cypress tests too

* Restrict code that decides between Docker and Podman to run in Cypress plugins

Because it can't run in the browser - it needs to run a command line
command to find out.

* Move logic for HOST_DOCKER_INTERNAL into cfgDirFromTemplate
2023-08-18 14:40:17 +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
Dominik Henneke 33ec7147d6
Pin the action buttons to the bottom of the scrollable dialogs (#11407)
* Let scrollable dialogs shrink to the size of the content

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

* Pin the action buttons to the bottom of the scrollable dialogs

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

---------

Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
2023-08-17 07:12:44 +00:00
renovate[bot] 4a91a29d8c
Update dependency eslint-config-prettier to v9 (#11389)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-17 04:28:29 +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
Element Translate Bot a5107518b5
Translations update from Weblate (#11418)
Co-authored-by: Jeff Huang <s8321414@gmail.com>
Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Co-authored-by: Jozef Gaal <preklady@mayday.sk>
Co-authored-by: Priit Jõerüüt <riot@joeruut.com>
Co-authored-by: Weblate <translate@riot.im>
Co-authored-by: Vri <element@vrifox.cc>
Co-authored-by: Glandos <bugs-github@antipoul.fr>
Co-authored-by: random <dictionary@tutamail.com>
Co-authored-by: waclaw66 <waclaw66@seznam.cz>
Co-authored-by: Linerly <linerly@protonmail.com>
Co-authored-by: Someone <hahahahacker2009@gmail.com>
Co-authored-by: LinAGKar <linus.kardell@gmail.com>
Co-authored-by: Nicholas Winterhalter <gewinum@gmail.com>
Co-authored-by: phardyle <bradney_ccea@aleeas.com>
Co-authored-by: Bubanio85 <brwa.baban@bearingpoint.com>
2023-08-16 15:54:10 +01:00
Michael Telatynski 3828c9f66a
Fix Room Settings > Notifications file upload input being shown superfluously (#11415) 2023-08-16 10:55: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
Germain f8e1c54768
Remove dead CSS (#11414) 2023-08-16 09:23:20 +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
Richard van der Hoff 4f138ed041
Cypress tests for soft logout (#11402) 2023-08-16 07:40:09 +00:00
Germain 373a34c3d1
Create flexbox layout helper (#11411) 2023-08-15 17:43:39 +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 beafe686a9
Wire up more high level read receipt tests (#11408)
* Improve existing tests

* Wire up more tests

* Wire up more tests

* Wire up more tests

* Wire up more tests
2023-08-15 14:08:53 +00:00
ElementRobot 65b518dfe1 Reset matrix-js-sdk back to develop branch 2023-08-15 13:24:41 +01:00
ElementRobot 789cfec9ed Resetting package fields for development 2023-08-15 13:24:31 +01:00
ElementRobot bba980cd8a Merge branch 'master' into develop 2023-08-15 13:24:27 +01:00
ElementRobot be24a15a62 v3.78.0 2023-08-15 13:24:19 +01:00
ElementRobot 275c4b1154 Prepare changelog for v3.78.0 2023-08-15 13:24:17 +01:00
ElementRobot 50d1122823 Upgrade matrix-js-sdk to 27.2.0 2023-08-15 13:22:28 +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
Richard van der Hoff f65c6726c9
Add a cypress test for SSO login (#11401)
* Allow `startHomeserver` to take an options object

... so that we can add more options

* Add a Cypress test for SSO login
2023-08-14 11:08:12 +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
Michael Telatynski aa6f27dde2
Update static_analysis.yaml 2023-08-14 09:43:47 +01: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