Commit Graph

1201 Commits

Author SHA1 Message Date
Germain
7ca1b385d9 Force enable threads labs flag 2023-01-09 12:38:19 +00:00
Michael Weimann
f34c1609c3
Disable bubbles for broadcasts (#9860) 2023-01-05 12:33:28 +01:00
Michael Weimann
488a08a25e
Allow reactions for broadcasts (#9856) 2023-01-05 08:40:09 +01:00
alunturner
432ce3ca31
Improve switching between rich and plain editing modes (#9776)
* allows switching between modes that retains formatting
* updates rich text composer dependency to 0.13.0 (@matrix-org/matrix-wysiwyg)
* improves handling of enter keypresses when ctrlEnterTosend setting is true in plain text editor
* changes the message event content when using the new editor
* adds tests for the changes to the plain text editor
2023-01-04 12:57:09 +00:00
grimhilt
6ad70b0565
Fix export with attachments on formats txt and json (#9851)
* set file extension to .zip when needed

* Apply prettier formatting

Co-authored-by: grimhilt <grimhilt@users.noreply.github.com>
2023-01-03 07:53:33 +01:00
Michael Weimann
064a5ad422
Show regular avatar for broadcasts (#9835) 2022-12-29 10:03:24 +00:00
Germain
e9224f6fce
Add mark as read option in room setting (#9798) 2022-12-22 13:18:38 +00:00
Michael Weimann
b81582d045
Improve live voice broadcast detection by testing if the started event has been redacted (#9780) 2022-12-22 10:37:07 +00:00
renovate[bot]
af3715821b
Update dependency maplibre-gl to v2 (#9699)
* Update dependency maplibre-gl to v2

* update types and mocks for maplibre 2.0

* prettier + strict fix

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kerry Archibald <kerrya@element.io>
2022-12-18 23:17:15 +00:00
Michael Telatynski
f1e8e7f140
Enable @typescript-eslint/explicit-member-accessibility on /src (#9785)
* Enable `@typescript-eslint/explicit-member-accessibility` on /src

* Prettier
2022-12-16 12:29:59 +00:00
Michael Weimann
51554399fb
Implement broadcast message preview (#9762) 2022-12-16 11:01:16 +00:00
Kerry
aeb9f4373f
Device manager - use deleteAccountData to prune device manager client information events (#9734) 2022-12-14 04:59:23 +00:00
Germain
2d2755d145
🧵 Enable threads by default (#9736)
* Delabs threads

* remove threads reload when labs is toggled

* Fix ts strict

* fix rebase mistake

* remove .only

* fix pr comments

* re-introduce backwards compat

* Fix export test

* Fix SearchREsultTile test

* strict ts
2022-12-13 15:09:15 +00:00
Faye Duxovni
43f175892a
Fix Prettier errors that slipped past CI (#9741) 2022-12-12 15:43:29 -07:00
Michael Weimann
27c5b793e9
Merge branch 'develop' into weeman1337/prettier 2022-12-12 16:09:11 +01:00
Michael Weimann
57e1822add
Add voice broadcast ended message (#9728) 2022-12-12 16:03:56 +01:00
Michael Weimann
526645c791
Apply prettier formatting 2022-12-12 12:24:14 +01:00
Kerry
82ad8d5aa2
Snooze the bulk unverified sessions reminder on dismiss (#9706)
* test bulk unverified sessions toast behaviour

* unverified sessions toast text tweak

* only show bulk unverified sessions toast when current device is verified

* add Setting for BulkUnverifiedSessionsReminder

* add build config for BulkUnverifiedSessionsReminder

* add more assertions for show/hide toast, fix strict errors

* fix strict error

* add util methods for snoozing in local storage

* rename nag to reminder

* set and read snooze for toast

* test snooze

* remove debug

* strict fix

* remove unused code
2022-12-06 06:18:03 +00:00
renovate[bot]
8996bf0a7f
Update dependency filesize to v10 (#9695)
* Update dependency filesize to v10

* Update dependency filesize to v10

* Fix imports

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-12-01 23:55:24 +00:00
ElementRobot
5cbb748843
Upgrade dependencies (#9249)
* [create-pull-request] automated change

* Delint

* Hold @types/react* back

* Pin axe-core until we fix a11y issues

Co-authored-by: t3chguy <t3chguy@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-11-30 15:18:10 +00:00
Michael Telatynski
d258402186
Typescript updates (#9658)
* Typescript updates

* Update @types/node

* Fix more types
2022-11-30 11:32:56 +00:00
Michael Telatynski
d341c56b1f
Fix issues around up arrow event edit shortcut (#9645) 2022-11-29 14:55:48 +00:00
Germain
40cbee60db
Consolidate public room search experience (#9605) 2022-11-22 15:05:09 +00:00
Michael Telatynski
8c0d202df4
Enable tsc alwaysStrict, strictBindCallApply, noImplicitThis (#9600)
* Enable tsc alwaysStrict

* Enable tsc strictBindCallApply

* Enable tsc noImplicitThis

* Add d.ts

* Improve types

* Add ?

* Increase coverage

* Improve coverage
2022-11-21 11:24:59 +00:00
Germain
c10339ad68
Make clear notifications work with threads (#9575) 2022-11-15 10:27:13 +00:00
Michael Telatynski
e66027cd0c
Deduplicate string compare utility (#9579) 2022-11-15 10:20:36 +00:00
Michael Weimann
fca6ff271c
Extract requestMediaPermissions (#9568) 2022-11-11 10:38:51 +01:00
Robin
06f69abad9
Don't switch to the home page needlessly after leaving a room (#9477)
Currently, if you leave a room that you're not currently viewing, you'll get sent back to the home page for no reason. This creates needless friction when trying to leave multiple rooms belonging to a space from the room list.

In addition to that fix, this improves the behavior when leaving a subspace, by making it take you to the parent space rather than all the way back home.
2022-11-10 07:34:43 -05:00
Michael Telatynski
962e8e0b23
Differentiate download and decryption errors when showing images (#9562) 2022-11-10 09:27:20 +00:00
Michael Telatynski
c79f45e5e6
Add eslint rule unicorn/no-instanceof-array (#9527) 2022-11-02 14:54:28 +00:00
Janne Mareike Koschinski
d92fdc1f5b
Loading threads with server-side assistance (#9356)
* Fix bug with message context menu
* fix bug where ThreadSummary failed if no last reply is available
* Fix relations direction API
* Use same API for threads as for any other timeline
* Determine if event belongs to thread on jumping to event
* properly listen to thread deletion
* Add thread redaction tests
* Add fetchInitialEvent tests
* Paginate using default TimelinePanel behaviour
* Remove unused threads deleted code

Co-authored-by: Germain <germain@souquet.com>
Co-authored-by: Germain <germains@element.io>
2022-10-28 13:48:15 +02:00
Florian Duros
c7dbb5947f
Keep content when switching between rich text and plain text mode 2022-10-25 18:33:25 +02:00
Michael Telatynski
fde9a527a7
Improve typing (#9474) 2022-10-21 11:44:33 +01:00
Hugh Nimmo-Smith
3c3df11d32
Support for login + E2EE set up with QR (#9403)
* Support for login + E2EE set up with QR

* Whitespace

* Padding

* Refactor of fetch

* Whitespace

* CSS whitespace

* Add link to MSC3906

* Handle incorrect typing in MatrixClientPeg.get()

* Use unstable class name

* fix: use unstable class name

* Use default fetch client instead

* Update to revised function name

* Refactor device manager panel and make it work with new sessions manager

* Lint fix

* Add missing interstitials and update wording

* Linting

* i18n

* Lint

* Use sensible sdk config name for fallback server

* Improve error handling for QR code generation

* Refactor feature availability logic

* Hide device manager panel if no options available

* Put sign in with QR behind lab setting

* Reduce scope of PR to just showing code on existing device

* i18n updates

* Handle null features

* Testing for LoginWithQRSection

* Refactor to handle UIA

* Imports

* Reduce diff complexity

* Remove unnecessary change

* Remove unused styles

* Support UIA

* Tidy up

* i18n

* Remove additional unused parts of flow

* Add extra instruction when showing QR code

* Add getVersions to server mocks

* Use proper colours for theme support

* Test cases

* Lint

* Remove obsolete snapshot

* Don't override error if already set

* Remove unused var

* Update src/components/views/settings/devices/LoginWithQRSection.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update src/components/views/auth/LoginWithQR.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update src/components/views/auth/LoginWithQR.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update src/components/views/auth/LoginWithQR.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update src/components/views/auth/LoginWithQR.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update src/components/views/auth/LoginWithQR.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update res/css/views/auth/_LoginWithQR.pcss

Co-authored-by: Kerry <kerrya@element.io>

* Use spacing variables

* Remove debug

* Style + docs

* preventDefault

* Names of tests

* Fixes for js-sdk refactor

* Update snapshots to match test names

* Refactor labs config to make deployment simpler

* i18n

* Unused imports

* Typo

* Stateless component

* Whitespace

* Use context not MatrixClientPeg

* Add missing context

* Type updates to match js-sdk

* Wrap click handlers in useCallback

* Update src/components/views/settings/DevicesPanel.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Wait for DOM update instead of timeout

* Add missing snapshot update from last commit

* Remove void keyword in favour of then() clauses

* test main paths in LoginWithQR

Co-authored-by: Travis Ralston <travisr@matrix.org>
Co-authored-by: Kerry <kerrya@element.io>
2022-10-19 13:31:20 +01:00
kegsay
e946674df3
Store refactor: use non-global stores in components (#9293)
* Add Stores and StoresContext and use it in MatrixChat and RoomView

Added a new kind of class:
- Add God object `Stores` which will hold refs to all known stores and the `MatrixClient`. This object is NOT a singleton.
- Add `StoresContext` to hold onto a ref of `Stores` for use inside components.

`StoresContext` is created via:
- Create `Stores` in `MatrixChat`, assigning the `MatrixClient` when we have one set. Currently sets the RVS to `RoomViewStore.instance`.
- Wrap `MatrixChat`s `render()` function in a `StoresContext.Provider` so it can be used anywhere.

`StoresContext` is currently only used in `RoomView` via the following changes:
- Remove the HOC, which redundantly set `mxClient` as a prop. We don't need this as `RoomView` was using the client from `this.context`.
- Change the type of context accepted from `MatrixClientContext` to `StoresContext`.
- Modify alllll the places where `this.context` is used to interact with the client and suffix `.client`.
- Modify places where we use `RoomViewStore.instance` and replace them with `this.context.roomViewStore`.

This makes `RoomView` use a non-global instance of RVS.

* Linting

* SDKContext and make client an optional constructor arg

* Move SDKContext to /src/contexts

* Inject all RVS deps

* Linting

* Remove reset calls; deep copy the INITIAL_STATE to avoid test pollution

* DI singletons used in RoomView; DI them in RoomView-test too

* Initial RoomViewStore.instance after all files are imported to avoid cyclical deps

* Lazily init stores to allow for circular dependencies

Rather than stores accepting a list of other stores in their constructors,
which doesn't work when A needs B and B needs A, make new-style stores simply
accept Stores. When a store needs another store, they access it via `Stores`
which then lazily constructs that store if it needs it. This breaks the
circular dependency at constructor time, without needing to introduce
wiring diagrams or any complex DI framework.

* Delete RoomViewStore.instance

Replaced with Stores.instance.roomViewStore

* Linting

* Move OverridableStores to test/TestStores

* Rejig how eager stores get made; don't automatically do it else tests break

* Linting

* Linting and review comments

* Fix new code to use Stores.instance

* s/Stores/SdkContextClass/g

* Update docs

* Remove unused imports

* Update src/stores/RoomViewStore.tsx

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>

* Remove empty c'tor to make sonar happy

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-10-19 13:07:03 +01:00
Travis Ralston
10a429c68d
Include a file-safe room name and ISO date in chat exports (#9440)
* conversation export named after room

* sanitization added for exported file name

* sanitization added for exported file name

* sanitization added for exported file name

* sanitization added for exported file name=>lint error fixed

* sanitization added for exported file name=>lint error fixed

* sanitization added for exported file name=>redundancy removed

* sanitization added for exported file name=>redundancy removed

* reverted to previous commit

* sanitization added for exported file name=>redundancy removed

* exported chat date iso formatted

* conversation export named after room

* conversation export named after room

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>

* code refacto filename date format

* Add docs to fn

* Bring in a util library for sanitizing

* Extract file naming function and make consistent for all 3 types

Also use the library we dragged in

* Write tests & associated fixes

* Apply linters locally

* Include new date util in index

Co-authored-by: Sinharitik589 <sinharitik18112835@gmail.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: yaya-usman <yayaazeez222@gmail.com>
Co-authored-by: Sinharitik589 <67551927+Sinharitik589@users.noreply.github.com>
2022-10-17 19:54:10 -06:00
Germain
714ba6db94
Do not create account data event for guests (#9407)
* Do not create account data event for guests

* fix test
2022-10-13 13:15:34 +01:00
Michael Telatynski
8b54be6f48
Move from browser-request to fetch (#9345) 2022-10-12 18:59:07 +01:00
Kerry
9e055ee99d
use correct default for notification silencing (#9388) 2022-10-11 17:11:11 +01:00
Kerry
4a98e26c4a
Device manager - UA parsing tweaks (#9382)
* parseUA - use full client version

* dont check for custom element model and os when device type is unknown

* ignore OS version in browser based sessions
2022-10-11 09:29:19 +02:00
Kerry
66a9636ec5
Device manager - remove client information events when disabling setting (#9384)
* remove client information events when disabling setting

* tweak naming

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-10-10 19:00:46 +00:00
Kerry
c795ada78c
Device manager - eagerly create m.local_notification_settings events (#9353)
* eagerly save m.local_notification_settings events

* unskip test

* create local notification settings after first non-cached sync
2022-10-10 15:18:38 +01:00
Oliver Sand
9a3ae2398e
Pass language to Jitsi Widget (#9346)
Signed-off-by: Oliver Sand <oliver.sand@nordeck.net>

Signed-off-by: Oliver Sand <oliver.sand@nordeck.net>
2022-10-06 13:19:01 -06:00
Kerry
3e4f3152bc
Device manager - parse user agent for device information (#9352)
* record device client inforamtion events on app start

* matrix-client-information -> matrix_client_information

* fix types

* remove another unused export

* add docs link

* display device client information in device details

* update snapshots

* integration-ish test client information in metadata

* tests

* fix tests

* export helper

* DeviceClientInformation type

* Device manager - select all devices (#9330)

* add device selection that does nothing

* multi select and sign out of sessions

* test multiple selection

* fix type after rebase

* select all sessions

* rename type

* use ExtendedDevice type everywhere

* rename clientName to appName for less collision with UA parser

* fix bad find and replace

* rename ExtendedDeviceInfo to ExtendedDeviceAppInfo

* rename DeviceType comp to DeviceTypeIcon

* update tests for new required property deviceType

* add stubbed user agent parsing

* setup test cases

* detect device type correctly

* 80% working ua parser

* parse asera gents for device info

* combine clientName/Version into one field, remove debug from tests
2022-10-06 10:06:29 +02:00
Travis Ralston
f92f7beb47
Delete the remainder of groups (#9357)
* Delete the remainder of groups

Fixes https://github.com/vector-im/element-web/issues/22770
Continues https://github.com/matrix-org/matrix-react-sdk/pull/8027

* Don't need the strings either
2022-10-05 17:44:46 +00:00
Kerry
bd270b08df
Device manager - add foundation for extended device info (#9344)
* record device client inforamtion events on app start

* matrix-client-information -> matrix_client_information

* fix types

* remove another unused export

* add docs link

* display device client information in device details

* update snapshots

* integration-ish test client information in metadata

* tests

* fix tests

* export helper

* DeviceClientInformation type

* Device manager - select all devices (#9330)

* add device selection that does nothing

* multi select and sign out of sessions

* test multiple selection

* fix type after rebase

* select all sessions

* rename type

* use ExtendedDevice type everywhere

* rename clientName to appName for less collision with UA parser

* fix bad find and replace

* rename ExtendedDeviceInfo to ExtendedDeviceAppInfo

* rename DeviceType comp to DeviceTypeIcon

* update tests for new required property deviceType

* add stubbed user agent parsing
2022-10-05 11:41:01 +00:00
Kerry
16c3efead5
Device manager - display client information in device details (PSG-682) (#9315)
* record device client inforamtion events on app start

* matrix-client-information -> matrix_client_information

* fix types

* remove another unused export

* add docs link

* display device client information in device details

* update snapshots

* integration-ish test client information in metadata

* tests

* fix tests

* export helper

* DeviceClientInformation type
2022-10-04 13:12:23 +00:00
Kerry
0ded5e0505
Device manager - record device client information on app start (PSG-633) (#9314)
* record device client inforamtion events on app start

* matrix-client-information -> matrix_client_information

* fix types

* remove another unused export

* add docs link

* add opt in setting for recording device information
2022-10-04 09:53:23 +02:00
Robin
ff59f68a9f
New group call experience: Call tiles (#9332)
* Add call tiles

* Factor CallDuration out into a reusable component

* Correct the separator character in LiveContentSummary
2022-09-30 19:26:08 +00:00
Germain
c2e2f406af
Fixes silenced notification preventing notification prompt to be shown (#9336) 2022-09-30 16:11:04 +01:00