Commit graph

2066 commits

Author SHA1 Message Date
alunturner
9dbc5f3773
Add quotes to rich text editor (#9932)
* bump rich text editor to 0.20.0
* add new svg for the button
* show the button
* make the composer display look like the timeline display
2023-01-20 10:55:46 +00:00
Kegan Dougal
769fd4a786 TS errors 2023-01-20 10:32:53 +00:00
kegsay
fcde4b7880
Merge branch 'develop' into kegan/lists-as-keys 2023-01-19 16:52:06 +00:00
alunturner
a63da74f06
Add code blocks to rich text editor (#9921)
* Applies small changes to code block display in timeline
* Makes the composer code block look like the timeline display, but without line numbers
* Adds a button to allow code blocks to be implemented
* Adds tests for the new button
2023-01-19 15:49:21 +00:00
Kegan Dougal
eed7340663 Add additional tests 2023-01-19 15:02:48 +00:00
Kegan Dougal
4db1928bcd Prettier and strict 2023-01-19 12:49:20 +00:00
Kegan Dougal
7c2dd7224f unbreak jest tests 2023-01-19 11:15:08 +00:00
alunturner
8a2e386531
Add disabled button state to rich text editor (#9930)
* add disabled css state
* conditionally apply disabled css state
* hides disabled tooltips
2023-01-19 09:24:29 +00:00
Florian Duros
b47588fc5c
Fix {enter} press in RTE (#9927)
Fix enter combination in RTE
2023-01-19 09:17:18 +00:00
Michael Weimann
eb43f3449e
Fix the problem that the password reset email has to be confirmed twice (#9926) 2023-01-19 09:03:48 +01:00
Michael Weimann
6d354e3e10
Add test coverage (#9928) 2023-01-18 15:49:34 +01:00
Florian Duros
e4a9684d76
Fix cypress RTE flaky test (#9920)
* Update @matrix-org/matrix-wysiwyg to 0.19.0
* Press {enter} to send message
2023-01-18 10:09:25 +01:00
Michael Weimann
70d3d03c15
Fix logout devices on password reset (#9925) 2023-01-18 08:25:03 +01:00
Michael Weimann
22a2a93751
Only notify for first broadcast chunk (#9901)
* Only notify for first broadcast chunk

* Trigger CI
2023-01-17 09:04:36 +00:00
Michael Weimann
fe0d3a7668
Error handling if broadcast events could not be sent (#9885) 2023-01-17 07:57:59 +00:00
Kerry
33e8a62dae
convert MPollBody tests into rtl (#9906)
* convert MPollBody tests into rtl

* strict fixes

* more strict

* more semantic assertions

* update types for extensible events changes
2023-01-16 01:25:33 +00:00
Clark Fischer
2417482667
Fix error when viewing source of redacted events (#9914)
* Fix viewing source of redacted events

Clicking 'View Source' in the context menu of a redacted event causes an error,
and the user gets no visible result.

This fixes <ViewSource /> to indicate that the source is unavailable when a
message has been redacted. The original source remains available.

<SyntaxHighlight /> requires a non-null string for its `content` prop, and, in
the case of redacted events, <ViewSource /> was passing `undefined`. This is
ultimately because redacting an event causes `MatrixEvent.clearEvent` to be
`undefined`, which <ViewSource /> wasn't checking.

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

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>

* Use correct highlight.js call

Previous call signature was deprecated.

See https://github.com/highlightjs/highlight.js/issues/2277

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
2023-01-15 16:22:59 +00:00
Travis Ralston
badb2c4b27
Use js-sdk imports for poll event types instead of events-sdk (#9904)
* Use js-sdk imports for poll event types instead of events-sdk

* Attempt to appease some tsc --strict errors

* Manually create poll response in cypress test
2023-01-13 10:02:33 -07:00
alunturner
6052db1e8a
Add list functionality to rich text editor (#9871)
* adds buttons to toggle bulleted and numbered lists on and off
* adds icons for those buttons
* css changes to timeline display
* adds tests for the new buttons, refactors existing tests
2023-01-13 15:44:35 +00:00
Michael Telatynski
0c30b577e0
Fix reply action in message context menu notif & file panels (#9895) 2023-01-12 14:52:52 +00:00
Janne Mareike Koschinski
7a36ba0fde
Fix issue where thread dropdown would not show up correctly (#9872)
* Fix issue where thread dropdown would not correctly
* Write additional test for both issues

- Thread dropdown should be shown if there is any thread, even if not participated
- Thread list correctly updates after every change of the dropdown immediately
2023-01-12 11:54:03 +01:00
Germain
d4f247d1fe Merge branch 'develop' into gsouquet/threads-forceenablelabsflag 2023-01-11 11:51:57 +00:00
Patrick Cloke
da2640b7ba
Display rooms & threads as unread (bold) if threads have unread messages. (#9763)
Co-authored-by: Germain <germain@souquet.com>
Co-authored-by: Germain <germains@element.io>
Fixes https://github.com/vector-im/element-web/issues/23907
2023-01-11 11:49:03 +00:00
Germain
df03112a3b
Fix mock client missing user functions (#9887) 2023-01-11 11:33:06 +00:00
alunturner
880a86c8b1
Convert enzyme to rtl: UserInfo (#9846)
* converts tests from Enzyme to Rtl
* increases test coverage
2023-01-11 10:46:35 +00:00
Florian Duros
a691e634b0
Add edit and remove actions to link in RTE (#9864)
Add edit and remove actions to link in RTE
2023-01-11 10:10:55 +00:00
Travis Ralston
19ba620de2 Revert "Revert "Factor out MessageEvent.from() usage (#9882)""
This reverts commit 99e38ca88e.
2023-01-10 13:43:15 -07:00
Travis Ralston
edc44922c2 Revert "Revert "Remove unused/disabled room list drag&drop tests (#9883)""
This reverts commit 0453283bed.
2023-01-10 13:43:10 -07:00
Travis Ralston
0453283bed Revert "Remove unused/disabled room list drag&drop tests (#9883)"
This reverts commit 34f0229d75.
2023-01-10 13:32:11 -07:00
Travis Ralston
99e38ca88e Revert "Factor out MessageEvent.from() usage (#9882)"
This reverts commit c09ca7b4ee.
2023-01-10 13:32:07 -07:00
Travis Ralston
c09ca7b4ee
Factor out MessageEvent.from() usage (#9882)
* Factor out `MessageEvent.from()` usage

The class/function is disappearing from the events-sdk, at least in this form.

* Manually create contents for events used by cypress

The utility function is out of range of the calling code at runtime, for some reason.

* Run prettier

* Maybe this will fix the build
2023-01-10 09:20:10 -07:00
Travis Ralston
34f0229d75
Remove unused/disabled room list drag&drop tests (#9883)
It's been years since we've had drag and drop - just delete the test.
2023-01-10 09:20:02 -07:00
Johannes Marbach
c94a4abe3d
Merge pull request #9873 from matrix-org/johannes/polls-dialog-scaling
Make create poll dialog scale better (PSG-929)
2023-01-10 16:07:49 +01:00
Michael Weimann
4627456837
Prevent starting a voice message while recording a broadcast (#9844) 2023-01-10 15:51:20 +01:00
Johannes Marbach
5dfde12c1c
Merge branch 'develop' into johannes/polls-dialog-scaling 2023-01-10 12:14:50 +01:00
Kerry
b1c32995c6
Device manager - prune client information events after remote sign out (#9874)
* prune client infromation events from old devices

* test client data pruning

* remove debug

* strict

* Update src/components/views/settings/devices/useOwnDevices.ts

Co-authored-by: Michael Weimann <michaelw@matrix.org>

* improvements from review

Co-authored-by: Michael Weimann <michaelw@matrix.org>
2023-01-10 07:01:50 +01:00
Michael Weimann
4f0a5d1eb4
Fix broadcast last sequence number (#9858) 2023-01-09 17:18:46 +00:00
Michael Weimann
be972bc913
Check connection before starting broadcast (#9857) 2023-01-09 16:08:30 +01:00
Germain
7ca1b385d9 Force enable threads labs flag 2023-01-09 12:38:19 +00:00
Johannes Marbach
214fa13d7d Update snapshots 2023-01-06 17:44:36 +01:00
Michael Weimann
32deddc77e
Merge branch 'develop' into weeman1337/mute-broadcast-notifications 2023-01-05 18:11:55 +01:00
Travis Ralston
fb761c70d5
Remove unused function/file (#9863) 2023-01-05 09:11:30 -07:00
Michael Weimann
ab9152044c
Use the same avatar colour when creating 1:1 DM rooms (#9850) 2023-01-05 17:05:21 +01:00
Michael Weimann
f0f6399189
Merge branch 'develop' into weeman1337/mute-broadcast-notifications 2023-01-05 16:14:40 +01:00
grimhilt
ecfd1736e5
combine search results when the query is present in multiple successive messages (#9855)
* merge successives messages

* add tests

* fix styles

* update test to match the expected parameters

* fix types errors

* fix tsc types errors

Co-authored-by: grimhilt <grimhilt@users.noreply.github.com>
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
2023-01-05 11:37:58 +00:00
Michael Weimann
f34c1609c3
Disable bubbles for broadcasts (#9860) 2023-01-05 12:33:28 +01:00
Michael Weimann
3a9268e963
Merge branch 'develop' into weeman1337/mute-broadcast-notifications 2023-01-05 09:23:24 +01:00
Michael Weimann
488a08a25e
Allow reactions for broadcasts (#9856) 2023-01-05 08:40:09 +01:00
Robin
720bf0573a
Make calls automatically disconnect if the widget disappears (#9862)
If something goes wrong with the widget, there's no way we can continue the call, so this acts as a safeguard against stuck calls in cases where the widget crashes or disconnects weirdly.
2023-01-04 15:51:42 -05: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
alunturner
3bcea5fb0b
Convert enzyme to rtl: BeaconMarker (#9840) 2023-01-04 10:00:13 +00:00
Robin
cb1af0d3de
Redesign the picture-in-picture window (#9800)
* Remove unnecessary PipContainer component

* Redesign the picture-in-picture window

* Add a hover effect to the controls

* Clarify that WidgetPip has call-specific behavior
2023-01-04 04:44:38 +00:00
Michael Weimann
804f0925df
Merge branch 'develop' into weeman1337/mute-broadcast-notifications 2023-01-03 16:54:05 +01:00
Florian Duros
6b155620e4
Fix emoji in RTE editing (#9827)
Fix emoji in RTE editing
2023-01-03 15:35:14 +00:00
Michael Weimann
b79912e390
Improve strict typing 2023-01-03 10:16:46 +01:00
Michael Weimann
cb4e444a60
Mute broadcast chunk notifications 2023-01-03 10:16:32 +01:00
Marco Bartelt
1b06b72b67
static-user-onboarding-steps (#9799) 2023-01-02 14:34:34 +00:00
Michael Weimann
0f7a2ce6df
Confirm listen to a broadcast while recording (#9831) 2023-01-02 12:21:33 +00:00
Michael Weimann
91e078d96b
Show room broadcast when ending a recording (#9841) 2023-01-02 11:05:51 +00:00
Michael Weimann
3ce064731b
Migrate AppTile-Test to RTL (#9838) 2022-12-30 10:33:10 +00:00
Kedas
b0dd0b8aef
Fixes empty content type during upload (#9848)
* Specify exact Content-Type for encrypted uploads

* Add content type check for encrypted file upload

* Fix code style issues
2022-12-30 08:34:38 +00:00
alunturner
b034ada6fd
Convert enzyme to rtl: BasicMessageComposer (#9839) 2022-12-29 20:52:51 +00:00
Germain
adab82edae
Migrate TextualBody to RTL (#9845) 2022-12-29 16:21:00 +00:00
Germain
1e8b59ea40
Migrate Enzyme to RTL (#9842) 2022-12-29 15:35:19 +00:00
alunturner
6d2d13fdee
Enzyme to rtl: QuickThemeSwitcher (#9843) 2022-12-29 12:44:18 +00:00
Michael Weimann
064a5ad422
Show regular avatar for broadcasts (#9835) 2022-12-29 10:03:24 +00:00
alunturner
49fefb0c32
Convert enzyme to rtl: RightPanel (#9837) 2022-12-29 08:40:42 +00:00
Kerry
c0ba1b8a1c
Device manager - contextual menus (#9832)
* add session count to current session contextual signout

* add contextual menu to other sessions section

* typo

* i18n

* strict
2022-12-29 02:08:57 +00:00
alunturner
2e097a00c7
Convert enzyme to rtl: BeaconStatus (#9836)
* rewrite in rtl
* update snapshots
2022-12-28 16:24:46 +00:00
Michael Weimann
100b1d5aa1
Fix broadcast pre-recording check (#9834) 2022-12-28 15:13:37 +00:00
Michael Weimann
c257e137aa
Allow call and broadcast PiP at the same time (#9829) 2022-12-28 13:43:44 +00:00
Germain
d2763c329d
Migrate AccessibleButton-test to RTL (#9833) 2022-12-28 10:40:34 +00:00
Michael Weimann
2b7d106481
Handle voice broadcast last_chunk_sequence (#9812) 2022-12-28 09:32:49 +00:00
Michael Weimann
539a50ae30
Pause non-live broadcast from other room (#9825) 2022-12-28 09:29:42 +01:00
Michael Weimann
5912c7a637
Replace broadcast instance with SDKContext (#9824) 2022-12-27 08:39:26 +01:00
Michael Weimann
6c40e2476a
Consider own broadcasts from other device as a playback (#9821) 2022-12-23 16:41:18 +00:00
Michael Weimann
32140855fb
When deleting a voice broadcast, also delete related events (#9737) 2022-12-23 15:44:01 +00:00
Michael Weimann
a2777d3a03
Add labs setting to force small broadcast chunks (#9806) 2022-12-23 13:45:26 +00:00
Florian Duros
fe0273b1a6
Add link creation to rich text editor (#9775)
Add link creation to RTE
2022-12-23 11:34:15 +00:00
Florian Duros
88c3864682
Replace some enzyme tests by @testing-library/react (#9822)
* Replace MessageComposerButtons-test.tsx enzyme by @testing-library/react

* Replace HtmlUtils-test.tsx enzyme by @testing-library/react
2022-12-23 10:46:14 +00:00
Kerry
5b9496aad8
test toastStore (#9823) 2022-12-23 09:35:41 +00:00
Michael Weimann
b07bd4d102
Show initial broadcast position in seekbar (#9796) 2022-12-22 14:30:42 +00:00
Germain
e9224f6fce
Add mark as read option in room setting (#9798) 2022-12-22 13:18:38 +00:00
Timo
ce75d3381f
Pass analyticsID to the elementCall iFrame (#9637)
Co-authored-by: Robin <robin@robin.town>
Co-authored-by: Timo K <timok@element.io>
2022-12-22 12:09:57 +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
Kerry
fbc3228143
Device manager - current device design and copy tweaks (#9801)
* indent device details

* udpate copy for current device security warning

* lint

* test coverage for copy

* strict
2022-12-22 01:58:29 +00:00
Kerry
9a8545bf34
Fix: Editing a poll will silently change it to a closed poll (#9809)
* add failing test case

* dont reset poll disclosure on editing
2022-12-21 21:29:11 +00:00
Michael Weimann
93dd010809
Prevent unnecessary m.direct updates (#9805)
* Prevent unnecessary m.direct updates

Signed-off-by: Michael Weimann <michaelw@matrix.org>

* Replace object with Map

* Clean up comment; simplify code

* Fix rte flaky test (#9811)

* Snap in PiP widget when content changed (#9797)

* Check modified at the end of setDMRoom

* Revert "Snap in PiP widget when content changed (#9797)"

This reverts commit be1e5753677bdf84b3657994dc5ad20d250038bd.

* Revert "Fix rte flaky test (#9811)"

This reverts commit 20d9eb3924c5ebc63f03cb61b172035725e3474d.

* Update src/Rooms.ts

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

Signed-off-by: Michael Weimann <michaelw@matrix.org>
Co-authored-by: Florian Duros <florianduros@element.io>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2022-12-21 09:30:08 -07:00
Germain
dd88fbbc3b
Fix checkForPreJoinUISI for thread roots (#9803)
* Fix blank timeline when thread root is UTD

* add test for pre join uisi checks and thread roots

* ts strict fix

* Update to timeline panel test

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

* Fixes to TimelinePanel-test

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2022-12-21 16:03:58 +00:00
Michael Weimann
1614674ca9
Snap in PiP widget when content changed (#9797) 2022-12-21 13:06:26 +00:00
Florian Duros
7db2ee749f
Fix rte flaky test (#9811) 2022-12-21 11:22:17 +00:00
Germain
bef8e077f6
Unify notifications panel event design (#9754) 2022-12-21 10:25:50 +00:00
Florian Duros
d6e447b934
Load RTE component only when needed (#9804)
Use react lazy to load rte component
2022-12-20 14:59:18 +00:00
Richard van der Hoff
ad7c002f4d Merge remote-tracking branch 'origin/develop' into rav/edited_events 2022-12-20 11:20:03 +00:00
Richard van der Hoff
dc29317445 Improve display of edited events 2022-12-20 11:19:47 +00:00
Kerry
0485b74acb
Device manager - design tweaks (#9768)
* hover style on dropdown

* hover states

* device details spacing

* device details h3 -> h4

* missing fullstops

* update snapshots for new copy

* device details expand icon bigger

* hide current session security card when details expanded

* filter dropdown padding and hover state

* update cypress selector for device detail heading
2022-12-20 01:17:05 +00:00
Michael Weimann
2152f2ab8b
Stop broadcast playback when stopping the broadcast (#9795) 2022-12-19 16:05:34 +00:00
Germain
8541e1c4b5
Change room list sorting to activity and unread first by default (#9773) 2022-12-19 10:42:58 +00:00
Michael Weimann
35a187a231
Handle starting a call while listen to a broadcast (#9764) 2022-12-19 08:44:19 +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
Richard van der Hoff
9901219194 rip out unused mkPresence
it only serves to make the strict type checker complain
2022-12-17 23:52:54 +00:00
Michael Weimann
9584388171
Improve some voice broadcast tests (#9786) 2022-12-16 18:23:29 +00:00
Richard van der Hoff
6ec6d44c96
Add a config flag to enable the rust crypto-sdk (#9759)
This PR adds an option to `config.json` which will make the js-sdk use the rust crypto sdk, instead of the libolm implementation.

To use it, you need to add something like this to `config.json`:

```
    "features": {
        "feature_rust_crypto": true
    },
```

We don't (yet) have any way to migrate a device between implementations, so the setting that was in use when you log in is persisted to the device; it is *visible* via the labs section but cannot currently be changed.

This is part of https://github.com/vector-im/element-web/issues/21972, and enables the functionality added to the js-sdk in https://github.com/matrix-org/matrix-js-sdk/pull/2969.
2022-12-16 17:10:26 +00:00
Michael Weimann
51554399fb
Implement broadcast message preview (#9762) 2022-12-16 11:01:16 +00:00
Michael Weimann
6205c70462
Display broadcast live state only depending on the recording (#9774) 2022-12-16 09:55:54 +00:00
Faye Duxovni
4724506320
Improve decryption error UI by consolidating error messages and providing instructions when possible (#9544)
* Improve decryption error UI by consolidating error messages and providing instructions when possible

* Fix TS strict errors

* Rename .scss to .pcss

* Avoid accessing clipboard, Cypress doesn't like it

* Display DecryptionFailureBar alongside other AuxPanel bars

* Add comments

* Add small margin off-screen for visible decryption failures

* Fix some more TS strict errors

* Add unit tests for DecryptionFailureBar

* Add button to resend key requests manually

* Remove references to matrix-js-sdk crypto internals

* Add hysteresis to visible decryption failures

* Add comment

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

* Add comment

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

* Don't create empty div if we're not showing resend requests button

* cancel updateSessions on unmount

* Update unit tests

* Fix lint and implicit any

* Simplify visible event bounds checking

* Adjust cypress test descriptions

* Add percy snapshots

* Update src/components/structures/TimelinePanel.tsx

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

* Add comments on TimelinePanel IState

* comment

* Add names to percy snapshots

* Show Resend Key Requests button when there are sessions that haven't already been requested via this bar

* We no longer request keys from senders

* update i18n

* update expected text in cypress test

* don't download keys ourselves, update device info in response to updates from client

* fix ts strict errors

* visibledecryptionfailures undefined handling

* Fix implicitAny errors

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-12-15 17:24:33 +00:00
Michael Weimann
ab560bba40
Implement small broadcast PiP (#9755) 2022-12-15 11:43:01 +00:00
Michael Weimann
ce554276db
Prevent to start two broadcasts at the same time (#9744) 2022-12-14 17:08:42 +00:00
Robin
8869374c6b
Honor font settings in Element Call (#9751)
Because this encodes font settings into widget URLs at the time that the client first loads a call, this has the consequence that users may need to restart their client to see font setting changes take effect in Element Call. For users who rely on these settings for accessibility, it's a lot better than nothing, though.
2022-12-14 13:23:26 +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
Germain
9668a24ca7
Revert "Check each thread for unread messages. (#9723)" (#9745)
* Revert "Check each thread for unread messages. (#9723)"

This reverts commit 9de5654353.

* ts strict
2022-12-13 14:59:52 +00:00
Michael Weimann
a701296f33
Link voice broadcast avatar and room name to room (#9722) 2022-12-13 13:32:19 +01:00
Faye Duxovni
47cc8d6edf
Don't double-add events to threads in tests (#9742) 2022-12-12 15:43:42 -07: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
dae13ac852
Merge branch 'develop' into weeman1337/prettier 2022-12-12 15:58:30 +01:00
Patrick Cloke
9de5654353
Check each thread for unread messages. (#9723)
Co-authored-by: Germain <germain@souquet.com>
Co-authored-by: Janne Mareike Koschinski <jannemk@element.io>
2022-12-12 14:34:05 +00:00
Michael Weimann
526645c791
Apply prettier formatting 2022-12-12 12:24:14 +01:00
Florian Duros
73986faa7d
Add inline code to rich text editor (#9720)
Add inline code to rich text editor
2022-12-09 14:06:15 +01:00
Florian Duros
65f9843576
Add emoji handling for plain text mode (#9727)
Add emoji handling for plain text mode
2022-12-09 11:38:14 +01:00
Kerry
888e69f39a
Device manage - handle sessions that don't support encryption (#9717)
* add handling for unverifiable sessions

* test

* update types for filtervariation

* strict fixes

* avoid setting up cross signing in device man tests
2022-12-08 21:52:00 +00:00
Kerry
6150b86421
Overlay virtual room call events into main timeline (#9626)
* super WIP POC for merging virtual room events into main timeline

* remove some debugs

* c

* add some todos

* remove hardcoded fake virtual user

* insert overlay events into main timeline without resorting main tl events

* remove more debugs

* add extra tick to roomview tests

* RoomView test case for virtual room

* test case for merged timeline

* make overlay event filter generic

* remove TODOs from LegacyCallEventGrouper

* tidy comments

* remove some newlines

* test timelinepanel room timeline event handling

* use newState.roomId

* fix strict errors in RoomView

* fix strict errors in TimelinePanel

* add type

* pr tweaks

* strict errors

* more strict fix

* strict error whackamole

* update ROomView tests to use rtl
2022-12-08 21:37:25 +00:00
Michael Weimann
1b6d753cfe
Add voice broadcast device selection tooltip (#9726) 2022-12-08 15:27:32 +01:00
Marco Bartelt
95ac957fa4
add-privileged-users-in-room (#9596) 2022-12-08 12:40:31 +01:00
Andy Balaam
0f17728aa1
Merge branch 'develop' into feat/emoji-picker-rich-text-mode 2022-12-08 09:39:30 +00:00
Florian Duros
7943f83858
Change formatting buttons behavior (#9715)
Change formatting buttons behaviour
2022-12-07 12:13:35 +01:00
Michael Weimann
254815cbcf
Tweak voice broadcast chunk decoding (#9713) 2022-12-07 10:37:30 +01:00
Florian Duros
bc001c2b88
Fix types 2022-12-06 16:45:25 +01:00
Florian Duros
1bd560d350
Merge remote-tracking branch 'origin/develop' into feat/emoji-picker-rich-text-mode 2022-12-06 16:38:46 +01:00
Florian Duros
27139ca68e
Add test for emoji 2022-12-06 16:38:25 +01:00
Germain
3a501003e2
Add setting to hide bold notifications (#9705) 2022-12-06 09:59:17 +00:00
Michael Weimann
474f464e48
Voice broadcast indicator in room list (#9709) 2022-12-06 10:56:29 +01:00
Michael Weimann
89439d4f10
Further password reset flow enhancements (#9662) 2022-12-06 10:01:25 +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
Florian Duros
54e12d265b
Merge remote-tracking branch 'origin/develop' into feat/emoji-picker-rich-text-mode 2022-12-05 17:40:46 +01:00
Florian Duros
f5efa85882
Fix types and console.log 2022-12-05 17:40:33 +01:00
László Várady
75c2c1a572
Honor advanced audio processing settings when recording voice messages (#9610)
* VoiceRecordings: honor advanced audio processing settings

Audio processing settings introduced in #8759 is now taken into account
when recording a voice message.

Signed-off-by: László Várady <laszlo.varady@protonmail.com>

* VoiceRecordings: add higher-quality audio recording

When recording non-voice audio (e.g. music, FX), a different Opus encoder
application should be specified. It is also recommended to increase the
bitrate to 64-96 kb/s for musical use.

Note: the HQ mode is currently activated when noise suppression is
turned off. This is a very arbitrary condition.

Signed-off-by: László Várady <laszlo.varady@protonmail.com>

* RecorderWorklet: fix type mismatch

src/audio/VoiceRecording.ts:129:67 - Argument of type 'null' is not
assignable to parameter of type 'string | URL'.

Signed-off-by: László Várady <laszlo.varady@protonmail.com>

* VoiceRecording: test audio settings

Signed-off-by: László Várady <laszlo.varady@protonmail.com>

* Fix typos

Signed-off-by: László Várady <laszlo.varady@protonmail.com>

* VoiceRecording: refactor using destructuring assignment

Signed-off-by: László Várady <laszlo.varady@protonmail.com>

* VoiceRecording: add comments about constants and non-trivial conditions

Signed-off-by: László Várady <laszlo.varady@protonmail.com>

Signed-off-by: László Várady <laszlo.varady@protonmail.com>
2022-12-05 11:19:50 -05:00
Michael Weimann
f117548b38
Do not resume voice broadcasts on seek (#9686) 2022-12-05 09:43:47 +01:00
Robin
62a740d318
Fix call splitbrains when switching between rooms (#9692)
* Fix call splitbrains when switching between rooms

Mounting CallView causes the user's call membership room state to be cleaned up. However, because the GroupCall object always thought the local device was disconnected from the call, it would remove the local device from room state when the clean method is called, causing a splitbrain. This uses GroupCall's new enteredViaAnotherSession field to fix that, and also simplify participant tracking.

* Remove clean tests that have been moved to matrix-js-sdk
2022-12-02 09:35:31 +01:00
Kerry
81098b9914
Add config setting to disable bulk unverified sessions nag (#9657)
* 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
2022-12-02 03:24:45 +00:00
Kerry
5742c24114
Only display bulk unverified sessions nag when current session is verified (PSG-893) (#9656)
* test bulk unverified sessions toast behaviour

* unverified sessions toast text tweak

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

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

* fix strict error

* really fix strict error
2022-12-02 02:59:46 +00:00
kegsay
1f703b8898
bugfix: fix an issue where the Notifier would incorrectly fire for non-timeline events (#9664)
* bugfix: fix an issue where the Notifier would incorrectly fire for non-timeline events

This was caused by listening for ClientEvent.Event, not RoomEvent.Timeline.
Fixes https://github.com/vector-im/element-web/issues/17263

* tsc strict checks maybe

* More types?

* Update src/Notifier.ts

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

* Update src/Notifier.ts

* fix LL test; review comments

* More tests

* More tsc strict checks..

* More strict ts..

* More ts

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-12-01 12:21:56 +00:00
Michael Telatynski
ccfb455847
Fix power selector being wrongly disabled for admins themselves (#9681) 2022-12-01 09:49:46 +00:00
Kerry
1d4cbee81c
test bulk unverified sessions toast behaviour (#9655)
* test bulk unverified sessions toast behaviour

* add more assertions for show/hide toast, fix strict errors
2022-12-01 08:47:20 +01:00
Eric Eastwood
ca58617cee
Add more debugging for why audio ring/ringback might not be playing (#9642)
* Add more debugging for why audio might not be playing

More debugging for https://github.com/vector-im/element-web/issues/20832

* Listen to events from <audio>

* Make it easier to spot event type

* Move to start/stop functions

* Fix some lints

* Protect from potentially undefined element

* Needs more mocked functions

* More code coverage

* Test formatting

* Add return types

See https://github.com/matrix-org/matrix-react-sdk/pull/9642#discussion_r1036274817

* Add comment on when magic comment is applicable

See https://github.com/matrix-org/matrix-react-sdk/pull/9642#discussion_r1036258757
2022-12-01 04:08:09 +00:00
Robin
d2109de4ca
Remove unused Element Call capabilities (#9653)
As of 44e22e268420bd4b24a110840e2edaca46653407 in the Element Call repo, Element Call widgets no longer request the capability to start calls.
2022-11-30 13:54:18 +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 Weimann
d0fd0cfea0
Update Voice Broadcast buffering style (#9643) 2022-11-30 11:43:58 +01:00
Michael Weimann
459df4583e
Fix start voice broadcast recording while listening (#9630) 2022-11-30 11:16:22 +01:00
Michael Weimann
70a7961681
Update voice broadcast time display (#9646) 2022-11-30 08:47:29 +01:00
Robin
69e03860a0
Show day counts in call durations (#9641)
* Show day counts in call durations

Previously call durations over a day long would be truncated, for example displaying as '2h 0m 0s' instead of '1d 2h 0m 0s'.

* Fix strict mode errors

* Fix strings

Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-11-29 14:21:51 -07:00
Michael Telatynski
d341c56b1f
Fix issues around up arrow event edit shortcut (#9645) 2022-11-29 14:55:48 +00:00
Richard van der Hoff
f642765149
Pass a client into RoomNotifs.getRoomNotifsState (#9631)
Pass an explicit client into `RoomNotifs.getRoomNotifsState`, rather than
relying on `MatrixClientPeg`. This resolves a race condition where we have a
component which thinks it is using a particular component, but
`MatrixClientPeg` has been updated.
2022-11-29 10:55:15 +00:00
Michael Telatynski
8bd60d09dc
Fix search not being cleared when clicking on a result (#9635)
* Fix test naming

* Fix search not being cleared when clicking on a result

* Update RoomView.tsx

* Update RoomView.tsx
2022-11-29 10:36:59 +00:00
Robin
2c612d5aa1
Use native js-sdk group call support (#9625)
* Use native js-sdk group call support

Now that the js-sdk supports group calls natively, our group call implementation can be simplified a bit. Switching to the js-sdk implementation also brings the react-sdk up to date with recent MSC3401 changes, and adds support for joining calls from multiple devices. (So, the previous logic which sent to-device messages to prevent multi-device sessions is no longer necessary.)

* Fix strings

* Fix strict type errors
2022-11-28 16:37:32 -05:00
Michael Weimann
3c7781a561
Stop voice broadcast on delete (#9629) 2022-11-28 18:45:50 +01:00
Florian Duros
033c26ab53
Fix edit a reply in rich text editor (#9615)
Fix edit a reply in rich text editor
2022-11-28 16:01:49 +01:00
Michael Weimann
b302275289
Add input device selection during voice broadcast (#9620) 2022-11-28 14:16:44 +00:00
Michael Weimann
5b5c3ab33c
Tweak voice broadcast play icon (#9622) 2022-11-28 12:03:18 +00:00
Michael Weimann
e38c59c535
Pause voice broadcast on calls (#9623) 2022-11-28 11:43:59 +00:00
Janne Mareike Koschinski
55d9dbf00d
Fix thread list jumping back down while scrolling (#9606)
* Fix timeline jumping after every thread update

* Add tests to prevent this from occuring again
2022-11-25 13:22:06 +01:00
Michael Weimann
55921e4888
Fix voice broadcast recording (#9617) 2022-11-25 08:47:46 +01:00
Florian Duros
d71a72e27c
Add slow jest reporter (#9599)
Add slow jest reporter
2022-11-24 14:53:32 +01:00
Florian Duros
7c63d52500
Add placeholder for rich text editor (#9613)
* Add placeholder for rich text editor
2022-11-24 10:31:56 +00:00
Michael Telatynski
8b8d24c24c
Fix regression with TimelinePanel props updates not taking effect (#9608)
* Fix regression with TimelinePanel props updates not taking effect

* Add test
2022-11-24 09:51:21 +00:00
Michael Weimann
a8e15ebe60
Add voice broadcast playback pip (#9603) 2022-11-24 09:08:41 +01:00
Michael Weimann
569a364933
Add filter console test util (#9607) 2022-11-23 09:01:42 +01:00
Germain
40cbee60db
Consolidate public room search experience (#9605) 2022-11-22 15:05:09 +00:00
Germain
7b5e73207f
Fix SpaceTreeLevel enzyme test (#9602) 2022-11-22 09:53:33 +00:00
Michael Weimann
e5ce6d7800
New password reset flow (#9581) 2022-11-22 07:58:37 +01:00
Michael Weimann
3f74ac37e8
Refactor PipView + fix strict errors (#9604) 2022-11-22 07:57:38 +01:00
Eric Eastwood
2393510a7f
Fix getRelationsForEvent under TypeScript strict mode (#9558)
* Fix getRelationsForEvent tsc strictness

* Use shared type for GetRelationsForEvent

* Fix lint

* Add alternative type

* getRelationsForEvent is not required

* Relations are optional

* Reactions are optional

* We expect relations in these tests

* Add more protection if the eventID is not defined

* Allow null too

* Better test typing

* User ID is not necessary unless something is selected

* It's okay to [].includes(null)

* Null is as good as undefined here

* Null or undefined is good here

* We have some expectations for the tests

* The room and user can be undefined too

* Protec

* Reactions are optional

* Try match signatures

* Null or undefined

* More null or undefined

* Protec

* Fix typo (wrong variable)

* Remove optional params

See https://github.com/matrix-org/matrix-react-sdk/pull/9558#discussion_r1017515913

* Fix up last maaaaybe relevant lint

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-11-21 20:54:24 -07: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
Michael Weimann
d699f5607b
Add voice broadcast seek 30s forward/backward buttons (#9592) 2022-11-21 08:47:09 +01:00
Kerry
caac059479
Device manager - add tooltip to device details toggle (#9594)
* add hide/show tooltip to dm details toggle

* use named export, update tests
2022-11-21 08:24:56 +13:00
kegsay
acdcda78f0
sliding sync: add lazy-loading member support (#9530)
* sliding sync: add lazy-loading member support

Also swap to `$ME` constants when referring to our own member event.

* Hook into existing LL logic when showing the MemberList

* Linting

* Use consts in js sdk not react sdk

* Add jest tests

* linting

* Store the room in the test

* Fix up getRoom impl

* Add MemberListStore

* Use the right context in MemberList tests

* Fix RightPanel-test

* Always return members even if we lazy load

* Add MemberListStore tests

* Additional tests
2022-11-18 19:05:00 +00:00
Michael Telatynski
d626f71fdd
Extract Search handling from RoomView into its own Component (#9574)
* Extract Search handling from RoomView into its own Component

* Iterate

* Fix types

* Add tests

* Increase coverage

* Simplify test

* Improve coverage
2022-11-18 16:40:22 +00:00
Michael Telatynski
590b845f3f
Remove all usages of UNSAFE_* React methods (#9583) 2022-11-18 09:22:43 +00:00
Germain
38dbe8ed33
Migrate some tests to React Testing Library (#9584) 2022-11-18 09:16:11 +00:00
Michael Weimann
ef548a4843
Add live voice broadcast indicator to user menu (#9590) 2022-11-18 08:36:20 +01:00
Florian Duros
d5e076bc3d
Use react-testing-library instead of enzyme for useDebouncedCallback 2022-11-17 12:01:31 +01:00
Florian Duros
3243d215e6
Remove useWysiwyg mock (#9578) 2022-11-16 15:38:00 +00:00
Michael Weimann
cf3c899dd1
Tweak voice broadcast live icon (#9576) 2022-11-16 16:13:59 +01:00
Germain
663c7e069e
Migrate useTopic test to RTL (#9580) 2022-11-15 14:00:02 +01: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
436146105e
Implement voice broadcast device selection (#9572) 2022-11-15 10:02:40 +01:00
Florian Duros
45d53d3404
Update @matrix-org/matrix-wysiwyg dependency 2022-11-14 14:12:09 +01:00
Michael Weimann
18c03daa86
Fix links being mangled by markdown processing (#9570) 2022-11-14 10:52:42 +01:00
Hanadi
212233cb0b
Fix: inline links selecting radio button (#9543)
* fix: inline link selecting radio button
2022-11-14 09:11:37 +00:00
Germain
e8d4fbb8ff
Fix missing avatar for show current profiles (#9563) 2022-11-11 16:02:01 +00:00
Michael Weimann
fca6ff271c
Extract requestMediaPermissions (#9568) 2022-11-11 10:38:51 +01:00
Germain
ee13e23b15
Resilience fix for homeserver without thread notification support (#9565)
* Notification state resilience

* TypeScript strict fixes

* Add tests
2022-11-10 18:01:19 +00: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 Weimann
f6347d24ef
Show time left for voice broadcast recordings (#9564) 2022-11-10 10:53:49 +00:00
Michael Telatynski
962e8e0b23
Differentiate download and decryption errors when showing images (#9562) 2022-11-10 09:27:20 +00:00
Michael Weimann
abec724387
Add voice broadcast pre-recoding PiP (#9548) 2022-11-10 09:38:48 +01:00
László Várady
afdf289a78
Advanced audio processing settings (#8759)
Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>
Fixes https://github.com/vector-im/element-web/issues/6278
Fixes undefined
2022-11-09 20:14:55 +00:00
Michael Telatynski
da779531f1
Close context menu when a modal is opened to prevent user getting stuck (#9560) 2022-11-09 15:33:09 +00:00
Michael Weimann
7fbdd8bb5d
Handle local events for voice broadcasts (#9561) 2022-11-09 11:17:54 +00:00
Germain
3f3005a3ca
Always use current profile on thread events (#9524) 2022-11-08 10:58:26 +00:00
Michael Weimann
5fb0f5cc3e
Fix LegacyCallHandler-test (#9552) 2022-11-08 09:02:07 +00:00
Eric Eastwood
3cbd88c280
Fix ThreadView tests not using thread flag (#9547)
Fixes tests failing from changes made by https://github.com/matrix-org/matrix-js-sdk/pull/2856
2022-11-07 14:21:49 -06:00
Michael Weimann
36a574a14f
Use server side relations for voice broadcasts (#9534) 2022-11-07 14:19:49 +00:00
Michael Telatynski
3747464b41
Make SonarCloud happier (#9545)
* Make SonarCloud happier

* i18n

* Iterate

* Update AddExistingToSpaceDialog.tsx

* Update SlashCommands.tsx
2022-11-07 13:45:34 +00:00
Michael Telatynski
77764d80bc
Fix regressions around media uploads failing and causing soft crashes (#9549) 2022-11-07 11:56:43 +00:00
Florian Duros
5ca9accce2
Improve design of the rich text editor (#9533)
New design for rich text composer
2022-11-04 15:36:50 +00:00
Michael Weimann
66d0b318bc
Add voice broadcast playback seekbar (#9529) 2022-11-04 11:50:19 +01:00
Michael Telatynski
04bc8fb71c
Optimise Jest run in CI (#9542) 2022-11-04 10:48:08 +00:00
Michael Telatynski
28ecdc0cb4
Send layout analytics as WebLayout (#9482) 2022-11-04 09:10:37 +00:00
Michael Telatynski
5f540eb25c
Update types to match js-sdk --strict mode (#9528)
Co-authored-by: Michael Weimann <michaelw@matrix.org>
2022-11-03 12:50:07 +00:00
Hugh Nimmo-Smith
f05cc5d8f3
Refactor + improve test coverage for QR login (#9525) 2022-11-02 10:51:20 +00:00
Michael Weimann
9096bd82d6
Extract PlaybackInterface (#9526) 2022-11-02 09:46:42 +01:00
kegsay
dcf497d013
sliding-sync: spider all rooms on the user's account for search (#9514)
* sliding-sync: spider all rooms on the user's account for search

On startup, slowly accumulate room metadata for all rooms on the
user's account. This is so we can populate the local search cache
with enough data for it to function, obviating the need to have
separate code paths for sliding sync searches.

This will allow spotlight search to work with slow/no network
connectivity, though clicking on the room will still require a
round trip.

This is an explicit request from @ara4n to improve the snapiness
of room searches, despite the unbounded bandwidth costs requesting
all N rooms on the user's account.

* Comments and tweak defaults

* Review comments; remove SS search code

* bugfix: use setListRanges once the list has been set up

If we don't, then we send needless extra data and can cause
bugs because setList will wipe the index->room_id map, which
trips up SlidingRoomListStore.
2022-11-01 10:27:03 +00:00
Michael Weimann
66c20a0798
Display voice broadcast total length (#9517) 2022-10-31 17:35:02 +00:00
Germain
9b644844da
Fix NotificationBadge unsent color (#9522) 2022-10-31 09:45:02 +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
Michael Weimann
c497046e39
Implement voice broadcast last_chunk_sequence (#9513) 2022-10-27 16:24:03 +02:00
Germain
07003a5bc1
Make thread replies trigger a room list re-ordering (#9510) 2022-10-27 13:50:05 +01:00
Johannes Marbach
af47b74992
Merge pull request #9501 from matrix-org/psg-863/dm-learn-more-rename
Device manager - add extra details to device security and renaming (PSG-863)
2022-10-27 08:40:27 +02:00
Florian Duros
3d1a0ccf12
Merge branch 'develop' into feat/add-plain-text-mode 2022-10-26 19:05:59 +02:00
Florian Duros
92b4c8bf4e
Review clean 2022-10-26 19:05:27 +02:00
Michael Weimann
e6a645dfae
Stop voice broadcast from save device on resume (#9509) 2022-10-26 18:59:47 +02:00
Florian Duros
d25cbb53b0
Merge branch 'develop' into feat/add-plain-text-mode 2022-10-26 18:56:33 +02:00
Michael Telatynski
ee61994c05
Reset custom power selector when blurred on empty (#9508) 2022-10-26 16:14:33 +00:00
Florian Duros
423f87a43a
Merge branch 'develop' into feat/add-plain-text-mode 2022-10-26 17:16:34 +02:00
Florian Duros
fb751c3c7b
Add test for plain mode 2022-10-26 17:16:13 +02:00
Michael Weimann
7692533e18
Improve fetch mock setup (#9511)
- Move from language to mock setup file
- Add mock rule for stub image requests
2022-10-26 14:54:45 +00:00
Kerry
31c0988220
Merge branch 'develop' into psg-863/dm-learn-more-rename 2022-10-26 15:09:44 +02:00
kegsay
0453b264e3
Sliding Sync: improve sort order, show subspace rooms, better tombstoned room handling (#9484)
* Add support for include_old_rooms and by_notification_level

* Include subspaces when apply spaces filter

* Remove stray is_tombstoned

* tests: add SlidingRoomListStore jest tests; update proxy version in cypress

* Add additional tests

* Additional tests

* Linting

* Update test/stores/room-list/SlidingRoomListStore-test.ts

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-10-26 14:04:03 +01:00
Florian Duros
f1610dae3d
Fix selection 2022-10-26 14:56:41 +02:00
Michael Weimann
625971acb5
Replace voice broadcast running with resumed (#9502) 2022-10-26 12:54:44 +00:00
Michael Weimann
846417a3a8
Unify voice broadcast css (#9504) 2022-10-26 13:45:39 +02:00
Kerry Archibald
35e45136b4 add learn more to device security cards 2022-10-26 11:30:32 +02:00
Kerry Archibald
bb4bffe1e8 learn more for session renaming 2022-10-26 11:05:31 +02:00
Kerry Archibald
78440d2d43 use correct card type 2022-10-26 11:05:31 +02:00
Kerry Archibald
18e59b2d98 add learn more to filtered sessions 2022-10-26 11:05:26 +02:00
Kerry
69642544ac
Device manager - add learn more popups to filtered sessions section (#9497)
* add learn more to filtered sessions

* fullstop

* update tests and i18n for fullstop

* remove unused switch

* whitespace

* use correct card type
2022-10-26 11:04:16 +02:00
Michael Telatynski
b7ff56a726
Add type assertions where we know an event is a room event (has room_id) (#9498) 2022-10-25 18:57:36 +00:00
Germain
306a2449e5
Show thread notification if thread timeline is closed (#9495)
* Show thread notification if thread timeline is closed

* Simplify isViewingEventTimeline statement

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

* Fix show desktop notifications

* Add RoomViewStore thread id assertions

* Add Notifier tests

* fix lint

* Remove it.only

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-10-25 16:53:31 +00:00
Florian Duros
50279c8870
Add basic plain text editor 2022-10-25 17:26:14 +02:00
Florian Duros
b5ab1239ed
Merge branch 'develop' into feat/add-message-edition-wysiwyg-composer 2022-10-25 10:42:29 +02:00
Kerry
d473b4ac4a
Device manager - confirm sign out of other sessions (PSG-921) (#9487)
* change testid attribute for dialog buttons to rtl friendly

* add confirm dialog for signing out sessions

* cleanup commented

* update cypress tets

* clear modals before test

* missing modal in jest tests on ci only
2022-10-25 10:39:48 +02:00
Florian Duros
787acbcc31
Merge branch 'develop' into feat/add-message-edition-wysiwyg-composer 2022-10-25 10:32:29 +02:00
David Baker
37e613bb05
Fix embedded Element Call screen sharing (#9485)
* Fix embedded Element Call screen sharing

Makes it a request in each direction rather than a request and reply
since replies to requests time out and so can't wait for user interaction.

* Fix tests
2022-10-24 18:54:24 +01:00
Robin
e4c44dc282
Auto-approve rageshake event capabilities for virtual Element Call widgets (#9492) 2022-10-24 13:49:54 -04:00
Michael Weimann
d702f4a291
When start listening to a broadcast, pause the others (#9489) 2022-10-24 16:06:58 +02:00
Florian Duros
fda4dabf6d
Fix MessageComposer test 2022-10-24 15:03:18 +02:00
Florian Duros
de86221c72
Merge remote-tracking branch 'origin/develop' into feat/add-message-edition-wysiwyg-composer 2022-10-24 14:41:27 +02:00
Florian Duros
edecc451dd
Fix MessageCompoer-test 2022-10-24 14:41:11 +02:00
Florian Duros
50c29502e4
Add new tests for WysiwygComposer 2022-10-24 12:35:09 +02:00
Michael Telatynski
eafc2d23a7
Ensure spaces in the spotlight dialog have rounded square avatars (#9480) 2022-10-24 08:58:36 +00:00
Michael Telatynski
913af09e61
Convert some tests from Enzyme to RTL (#9483) 2022-10-24 09:06:20 +01:00
Germain
9eb4f8d723
Add thread notification with server assistance (MSC3773) (#9400)
Co-authored-by: Janne Mareike Koschinski <janne@kuschku.de>
2022-10-24 07:50:21 +01:00
Michael Weimann
d4f1c573ad
Fix voice broadcast recording limit (#9478) 2022-10-22 13:07:39 +02:00
Florian Duros
4d089dcc05
Merge remote-tracking branch 'origin/develop' into feat/add-message-edition-wysiwyg-composer 2022-10-21 10:15:46 +02:00
Michael Weimann
5f59ce182e
Resume voice broadcast on load (#9475) 2022-10-21 09:30:02 +02:00
Šimon Brandner
f464682967
Make Element Call screensharing work on desktop (#9476) 2022-10-20 18:39:24 +00:00
Michael Weimann
9d405a905d
Set voice broadcast defaults (#9471) 2022-10-20 15:41:10 +02:00
Michael Weimann
b7996a2e49
Implement pause voice broadcast recording (#9469) 2022-10-20 12:44:41 +00:00
Germain
be281fd735
Fix threads fallback incorrectly targets root event (#9229)
* Use RelationType enum instead of hardcoded value

* Fix threads replies fallback to target last reply

* Only unsubscribe from threads events if needed

* fix strict null check

* fix strict null checks

* strict null checks

* fix typing

* Unsubscribe listeners if new thread is `null`

Co-authored-by: Faye Duxovni <fayed@element.io>

* Update strict null checks

* Type HTMLElement as nullable

* Add thread fallback integration test

* lint fix

* Update snapshots

* Add test after changing thread

* Remove test comment

* update snapshot

* fix room context test utility

* Add ThreadListContextMenu test

* lint fix

* fix thread rendering

Co-authored-by: Faye Duxovni <fayed@element.io>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-10-20 12:48:25 +01:00
Michael Weimann
d898af820b
Fix displaying already stopped broadcasts in the timeline (#9470) 2022-10-20 12:17:38 +02:00
Michael Weimann
3c9ba3e69f
Replace Icon with webpack loaded SVG (#9464) 2022-10-20 09:04:14 +01:00
kegsay
17c3fb89c1
Store refactor: convert WidgetPermissionStore (#9458)
* Store refactor: convert WidgetPermissionStore

Add Jest tests as well.

* More tests

* Review comments
2022-10-19 22:00:53 +02:00
Michael Weimann
07a1e9a009
Stop voice broadcast recording on redaction (#9455) 2022-10-19 16:02:48 +00:00
Kerry
d5a4718d46
Test display of qr code login section (#9456)
* 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

* test coverage for display of qr code section

* remove unused test props

Co-authored-by: Hugh Nimmo-Smith <hughns@matrix.org>
Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-10-19 15:11:42 +00:00
Florian Duros
e77f333fb6
Merge remote-tracking branch 'origin/develop' into feat/add-message-edition-wysiwyg-composer 2022-10-19 16:34:22 +02:00
Michael Weimann
8066b9ffbe
Prevent starting another voice broadcast (#9457) 2022-10-19 16:22:07 +02:00
kegsay
13fbd096b0
Stores refactor: convert TypingStore; rename TestStores to TestSdkContext (#9454) 2022-10-19 14:14:14 +01:00
Michael Weimann
bb0c175b7e
Display info dialogs if unable to start voice broadcasts (#9453) 2022-10-19 15:01:14 +02: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
Florian Duros
460f60e99d
First attempt to make the edition works in the WysiwygComposer 2022-10-19 12:45:51 +02:00
Michael Weimann
84f2974b57
Always show voice broadcasts tile (#9444) 2022-10-19 12:04:15 +02:00
Andy Balaam
e0ab0ac5c9
Allow pressing Enter to send messages in new composer (#9451)
* Allow pressing Enter to send messages in new composer

* Cypress tests for composer send behaviour
2022-10-19 03:07:21 +00:00
Kerry
b04991a962
Device manager - put client/browser device metadata in correct section (#9447) 2022-10-18 13:00:01 +00:00
Michael Weimann
a61076b4fb
Add confirm end voice broadcast dialog (#9442) 2022-10-18 09:12:28 +02: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
Michael Weimann
ca8b1b04ef
Implement VoiceBroadcastBody update (#9439)
* Implement VoiceBroadcastBody updat

* Add doc in VoiceBroadcastBody-test
2022-10-17 13:43:04 -06:00
Timo
372720ec8b
Room call banner (#9378)
Signed-off-by: Timo K <timok@element.io>
Co-authored-by: Timo K <timok@element.io>
Co-authored-by: Robin <robin@robin.town>
2022-10-17 21:36:17 +02:00
Michael Telatynski
13db1b17be
Prevent useContextMenu isOpen from being true if the button ref goes away (#9418) 2022-10-17 17:42:04 +01:00
Michael Weimann
e1d631cb47
Improve Voice Broadcast header layout (#9437)
* Fix Voice Broadcast live badge position

* Prevent voice broadcast header overflow

* Fix VoiceBroadcastPlaybackBody-test
2022-10-17 17:13:06 +01:00
Michael Weimann
788dd904b7
Implement voice broadcast playback buffering (#9435)
Co-authored-by: Kerry <kerrya@element.io>
2022-10-17 15:35:13 +00:00
Kerry
877c95df8f
device manager - add spinners while devices are signing out (#9433) 2022-10-17 17:14:49 +02:00
Michael Weimann
72d7939afc
Disable stopping a voice broadcast recording by click on the tile (#9436) 2022-10-17 14:54:33 +00:00
Michael Weimann
631720b21b
Start playback for ongoing broadcast with the last chunk (#9434) 2022-10-17 16:31:22 +02:00
Michael Weimann
1b74782854
Voice Broadcast live state / extract RelationsHelper (#9432)
* Extract RelationsHelper

* Make RelationsHelper.relations optional
2022-10-17 13:31:03 +01:00
Andy Balaam
e38c9e036c
Automatically focus the WYSIWYG composer when you enter a room (#9412)
Automatically focus the WYSIWYG composer when you enter a room
2022-10-17 11:48:47 +00:00
Michael Telatynski
6009d1c176
Remove deprecated m.room.aliases references (#9431)
* Remove deprecated `m.room.aliases` references

* Update SlashCommands.tsx
2022-10-17 10:58:46 +01:00
Kerry
2d9f828810
Device manager - silence call ringers when local notifications are silenced (#9420)
* silence call ringers when local notifications are silenced

* more coverage for silencing

* explain disabled silence button

* lint

* increase wait for modal

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-10-17 09:16:04 +00:00
Michael Weimann
0630a9c448
End voice broadcast recording on any call (#9425) 2022-10-16 11:35:25 +00:00
Michael Weimann
195065b217
Voice Broadcast recording pip (#9385) 2022-10-14 18:12:26 +00:00
Florian Duros
2146c91343
Merge branch 'develop' into feat/reply-support-wysiwyg-composer 2022-10-14 17:21:46 +02:00
Michael Telatynski
cf1b592f26
Update overly sensitive snapshot (#9421)
* Update snapshot

* Fix tests by adding missing stub
2022-10-14 15:57:12 +01:00
Michael Weimann
cb5667b4a4
Voice Broadcast playback (#9372)
* Implement actual voice broadcast playback

* Move PublicInterface type to test

* Implement pausing a voice broadcast playback

* Implement PR feedback

* Remove unnecessary early return
2022-10-14 15:48:54 +01:00
Florian Duros
d1a98b632e
Add test to attachRelation 2022-10-14 16:42:45 +02:00
Florian Duros
e8d0fb0ab0
Fix linting in test 2022-10-14 16:03:45 +02:00
Florian Duros
4e8b731d2c
Merge branch 'develop' into feat/reply-support-wysiwyg-composer 2022-10-14 15:53:19 +02:00