Commit graph

45934 commits

Author SHA1 Message Date
Michael Telatynski
457c1d011a
Add UIFeature.locationSharing to hide location sharing (#10727)
* Add UIFeature.locationSharing to hide location sharing

* Iterate
2023-04-28 07:46:33 +00:00
Michael Weimann
d084c34ea2
Send correct receipt when marking a room as read (#10730) 2023-04-28 06:07:25 +00:00
Suguru Hirahara
326e217d3f
Enable Jest and Percy snapshots for PreferencesUserSettingsTab (#10701)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-27 18:11:48 +00:00
Suguru Hirahara
d1a1506572
Update tests related to user onboarding - use Cypress Testing Library (#10728)
* Update user-onboarding-old.spec.ts - use Cypress Testing Library

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Update user-onboarding-new.spec.ts - use Cypress Testing Library

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-27 17:12:05 +00:00
Suguru Hirahara
569ef31f9d
Remove mx_EventTile:not([data-layout="bubble"]) selector (#9033)
* Move declarations out of `mx_EventTile:not([data-layout=bubble])`

merging style rules on _EventBubbleTile.scss

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Remove an obsolete `!important` flag from `&.mx_EventTile_continuation`

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Remove `clear: unset` declaration from EventTile on bubble layout

While mx_EventTile:not([data-layout="bubble"]) suggests that "clear: both" would not be applied to the bubble layout, the value "both" has been in fact luckily applied thanks to "mx_RoomView_MessageList li" on _RoomView.pcss, imported later than _EventTile.pcss.

Since "clear: both" is declared for mx_EventTile, this declaration is no longer needed here.

Though the value of that declaration of mx_EventTile on the timeline (including ThreadView) seems to have been overridden by "mx_RoomView_MessageList li" for all layouts, it should not be removed yet until E2E tests which check visual regressions are implemented, in order to minimize the risk of a regression outside of the timeline.

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Remove `:not()` pseudo class from `_FilePanel.pcss`

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Remove `!important` flag from `_MessageEditHistoryDialog.pcss`

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Remove a comment about overriding

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Run prettier

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-04-27 13:02:34 +00:00
Michael Telatynski
f5d05f3284
Memoize field validation results (#10714)
* Memoize field validation results

* Make validation memoization opt-in
2023-04-27 11:34:02 +00:00
Michael Telatynski
a629ce3a53
Use generics to better type TabbedView (#10726) 2023-04-27 12:55:29 +01:00
Suguru Hirahara
fcf2fe2c1d
Update read_events.spec.ts - use Cypress Testing Library (#10719)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-27 10:37:58 +00:00
David Robertson
8eac9f821a
Rename sliding-sync.ts to sliding-sync.spec.ts (#10723)
Follow up to #10709. Will hopefully make the CI on matrix-org/sliding-sync greener.

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-04-27 10:33:20 +00:00
Michael Telatynski
96bcfc58aa
Fix error about being unable to pass ref to function component (#10707) 2023-04-27 09:46:39 +00:00
Michael Telatynski
e1f7b0af2c
Offload some more waveform processing onto a worker (#9223) 2023-04-27 11:02:20 +01:00
alunturner
ca25c8f430
Commands for plain text editor (#10567)
* add the handlers for when autocomplete is open plus rough / handling

* hack in using the wysiwyg autocomplete

* switch to using onSelect for the behaviour

* expand comment

* add a handle command function to replace text

* add event firing step

* fix TS errors for RefObject

* extract common functionality to new util

* use util for plain text mode

* use util for rich text mode

* remove unused imports

* make util able to handle either type of keyboard event

* fix TS error for mxClient

* lift all new code into main component prior to extracting to custom hook

* shift logic into custom hook

* rename ref to editorRef for clarity

* remove comment

* try to add cypress test for behaviour

* remove unused imports

* fix various lint/TS errors for CI

* update cypress test

* add test for pressing escape to close autocomplete

* expand cypress tests

* add typing while autocomplete open test

* refactor to single piece of state and update comments

* update comment

* extract functions for testing

* add first tests

* improve tests

* remove console log

* call useSuggestion hook from different location

* update useSuggestion hook tests

* improve cypress tests

* remove unused import

* fix selector in cypress test

* add another set of util tests

* remove .only

* remove .only

* remove import

* improve cypress tests

* remove .only

* add comment

* improve comments

* tidy up tests

* consolidate all cypress tests to one

* add early return

* fix typo, add documentation

* add early return, tidy up comments

* change function expression to function declaration

* add documentation

* fix broken test

* add check to cypress tests

* update types

* update comment

* update comments

* shift ref declaration inside the hook

* remove unused import

* update cypress test and add comments

* update usePlainTextListener comments

* apply suggested changes to useSuggestion

* update tests

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-04-27 07:37:47 +00:00
Michael Telatynski
0a22ed90ef
Consolidate login errors (#10722) 2023-04-27 09:05:31 +01:00
alunturner
70326b98f2
bump max-height to 16 lines in the rich text editors (#10670) 2023-04-27 07:37:38 +00:00
Kerry
223892bf0e
Bail out of RoomSettingsDialog when room is not found (#10662)
* hack to fix console noise from unfaked timers and clearAllModals

* remove old debug logging in AsyncWrapper

* pass room to room settings tabs

* add errorboundary for roomsettingsdialog

* apply strictnullchecks to tabs/room

* dedupe code to set toom in roomsettingdialog

* add unit tests

* test SecurityRoomSettingsTab

* remove snapshot

* strict fixes

* more tests

* 2% more test coverage

* remove roomName from RoomSettingsDialogs state
2023-04-27 01:20:02 +00:00
Kerry
f6e8ffe750
add push rules test utility (#10712)
* add push rules test utility

* strict

* strict
2023-04-27 01:18:19 +00:00
Michael Telatynski
2b3e0b47ba
Fix all rooms search generating permalinks to wrong room id (#10625)
* Fix all rooms search generating permalinks to wrong room id

* Iterate

* Add comment

* Iterate

* Add coverage

* Iterate

* Add comment

* Restore src/utils/permalinks/Permalinks.ts

* Update src/components/structures/RoomSearchView.tsx

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

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-04-26 17:35:20 +00:00
Michael Telatynski
7f32b423c5
Revert "Include cypress tests in previewbuild bundle (#10705)"
This reverts commit d791649ad3.
2023-04-26 17:55:40 +01:00
Michael Telatynski
d791649ad3
Include cypress tests in previewbuild bundle (#10705) 2023-04-26 17:46:02 +01:00
Michael Telatynski
dde0a41ba8
Fix cypress tests exploding due to CSP (#10715) 2023-04-26 17:35:45 +01:00
renovate[bot]
6e87802add
Update definitelyTyped (#10642)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-26 12:55:17 +00:00
Florian Duros
5328f6e5fe
Element-R: Populate device list for right-panel (#10671)
* Use `getUserDeviceInfo` instead of `downloadKeys` and `getStoredDevicesForUser`

* Use new `getUserDeviceInfo` api in `UserInfo.tsx` and `UserInfo-test.tsx`

* Fix missing fields

* Use `getUserDeviceInfo` instead of `downloadKeys`

* Move `ManualDeviceKeyVerificationDialog.tsx` from class to functional component and add tests

* Fix strict errors

* Update snapshot

* Add snapshot test to `UserInfo-test.tsx`

* Add test for <BasicUserInfo />

* Remove useless TODO comment

* Add test for ambiguous device

* Rework `<BasicUserInfo />` test
2023-04-26 10:23:32 +00:00
renovate[bot]
9970ee6973
Update typescript-eslint monorepo to v5.59.0 (#10648)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-26 09:55:22 +00:00
Michael Telatynski
6166dbb661
Make existing and new issue URLs configurable (#10710)
* Make existing and new issue URLs configurable

* Apply a deep merge over sdk config to allow sane nested structures

* Defaultize

* Fix types

* Iterate

* Add FeedbackDialog snapshot test

* Add SdkConfig snapshot tests

* Iterate

* Fix tests

* Iterate types

* Fix test
2023-04-26 09:36:00 +00:00
Michael Telatynski
e4610e4672
Posthog properly handle Analytics ID changing from under us (#10702)
* Posthog properly handle Analytics ID changing from under us

* Update tests
2023-04-26 08:03:35 +00:00
Michael Weimann
857e22f943
Fix condition of logging possible room list corruption (#10685)
* Revert condition of logging possible room list corruption

* Fix loop condition
2023-04-26 07:57:33 +00:00
renovate[bot]
b32482bc4a
Update cypress-io/github-action digest to 59c3b9b (#10639)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kerry <kerrya@element.io>
2023-04-26 05:08:25 +00:00
Suguru Hirahara
382d2787c2
Remove obsolete style rules - mx_DialogDesignChanges_wrapper (#10550)
The style rules have been obsolete since IA 1.1 feedback toast was removed by 5d89230271.

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-26 04:47:56 +00:00
Kerry
6c36a2400d
Unit test list ordering algorithms (#10682)
* unit test ImportanceAlgorithm

* strict fixes

* unit test NaturalAlgorithm
2023-04-25 20:59:50 +00:00
Michael Telatynski
8783021e53
Fix Clock being read as an absolute time rather than duration (#10706)
* Fix Clock being read as an absolute time rather than duration

* Round durations and update snapshots
2023-04-25 17:10:46 +01:00
Michael Telatynski
86ea059de6
Make cypress happy about spec files all containing tests (#10709) 2023-04-25 15:42:59 +00:00
Michael Telatynski
4b1b9b17ef
Update roles cypress is looking for (#10708)
* Update roles cypress is looking for

* Fix sliding sync test
2023-04-25 14:46:18 +00:00
RiotRobot
621fdf1313 Reset matrix-js-sdk back to develop branch 2023-04-25 10:59:51 +01:00
RiotRobot
cd138b047c Merge branch 'master' into develop 2023-04-25 10:58:07 +01:00
RiotRobot
f859af4918 v3.71.1 2023-04-25 10:55:00 +01:00
RiotRobot
2080bf3796 Prepare changelog for v3.71.1 2023-04-25 10:54:57 +01:00
RiotRobot
eeaada34aa Upgrade matrix-js-sdk to 25.0.0 2023-04-25 10:51:30 +01:00
RiotRobot
e263e2d152 Reset matrix-js-sdk back to develop branch 2023-04-25 10:17:34 +01:00
RiotRobot
d20b3f5e06 Resetting package fields for development 2023-04-25 10:16:30 +01:00
RiotRobot
18c15036b7 Merge branch 'master' into develop 2023-04-25 10:16:24 +01:00
RiotRobot
3992c97fe2 v3.71.0 2023-04-25 10:16:10 +01:00
RiotRobot
8c49aeb4d8 Prepare changelog for v3.71.0 2023-04-25 10:16:08 +01:00
Michael Telatynski
bf182bc945 Merge pull request from GHSA-xv83-x443-7rmw
* Escape HTML for plaintext search results

* Add tests
2023-04-25 09:35:55 +01:00
Michael Telatynski
a1a087f755
Fix usages of ARIA tabpanel (#10628)
* RovingTabIndex handle looping around start/end

* Make TabbedView expose aria tabpanel/tablist/tab roles

* Fix right panel being wrongly specified as aria tabs

Not all right panels map to the top right header buttons so we cannot describe it as a tabpanel relation

* tsc strict

* Update snapshots

* Fix ARIA AXE violation

* Update tests
2023-04-25 09:31:54 +01:00
Michael Telatynski
961b843662
Merge pull request from GHSA-xv83-x443-7rmw
* Escape HTML for plaintext search results

* Add tests
2023-04-25 09:30:32 +01:00
Michael Telatynski
619a9e8542
Conform more of the codebase with strictNullChecks (#10703) 2023-04-25 09:28:48 +01:00
Florian Duros
db40479910
Element-R: Starting a DMs with a user (#10673)
* Use `cli.getUserDeviceInfo` instead of `cli.downloadKeys` to create a room

* Use `client.getCrypto().getUserDeviceInfo` instead of `client.getUserDeviceInfo`

* Update `createRoom-test.ts` to use `getUserDeviceInfo`

* Remove duplicate  field
2023-04-24 14:19:08 +00:00
Richard van der Hoff
d7bb8043ea
Replace uses of checkDeviceTrust with getDeviceVerificationStatus (#10663)
matrix-org/matrix-js-sdk#3287 and matrix-org/matrix-js-sdk#3303 added a new API called getDeviceVerificationStatus. Let's use it.
2023-04-24 14:19:46 +01:00
Andy Balaam
aa8c0f5cc7
Honour feature toggles in guest mode (#10651)
* Honour feature toggles in guest mode

* Suppress TS warning about returning null MatrixClient

* Revert "Suppress TS warning about returning null MatrixClient"

Don't ts-ignore this - we will eventually fix it via the strict work.

This reverts commit 0c657e6afd4c69d07c39bc2783184f36feaf940f.
2023-04-24 10:02:17 +00:00
Michael Telatynski
8c811776bb
Update cypress.yaml 2023-04-24 11:08:35 +01:00