Commit Graph

2166 Commits

Author SHA1 Message Date
Michael Telatynski
f3534b42df
Add string for membership event where both displayname & avatar change (#10880)
* Add string for membership event where both displayname & avatar change

* i18n and tests
2023-05-12 11:54:24 +00:00
Michael Telatynski
9611cbf6c4
Fix people space notification badge not updating for new DM invites (#10849)
* Add regression test

* Fix people space notification state not updating for new DM invites
2023-05-12 10:49:41 +00:00
Michael Telatynski
f758cbd38a
Make more of the codebase conform to strict types (#10859) 2023-05-12 09:49:37 +01:00
Michael Telatynski
2cee8a4b01
Specify lazy loading for avatars (#10866)
* Specify lazy loading for avatars

so browser doesn't fetch eagerly if off-screen

* Update snapshots
2023-05-11 18:29:48 +00:00
alunturner
0889dc55da
Room and user mentions for plain text editor (#10665)
* update useSuggestion

* update useSuggestion-tests

* add processMention tests

* add test

* add getMentionOrCommand tests

* change mock href for codeQL reasons

* fix TS issue in test

* add a big old cypress test

* fix lint error

* update comments

* reorganise functions in order of importance

* rename functions and variables

* add endOffset to return object

* fix failing tests

* update function names and comments

* update comment, remove delay

* update comments and early return

* nest mappedSuggestion inside Suggestion state and update test

* rename suggestion => suggestionData

* update comment

* add argument to findSuggestionInText

* make findSuggestionInText return mappedSuggestion

* fix TS error

* update comments and index check from === -1 to < 0

* tidy logic in increment functions

* rename variable

* Big refactor to address multiple comments, improve behaviour and add tests

* improve comments

* tidy up comment

* extend comment

* combine similar returns

* update comment

* remove single use variable

* fix comments
2023-05-11 14:28:42 +00:00
Michael Telatynski
68ff19fb4b
Fix regression in emoji picker order mangling after clearing filter (#10854)
* Add regression test for emoji picker order mangling after clearing filter

* Fix regression in emoji picker order mangling after clearing filter

* Iterate

* Update src/components/views/emojipicker/EmojiPicker.tsx
2023-05-11 13:24:39 +00:00
Michael Weimann
0a6fe83a8c
Add audible notifcation on broadcast error (#10654)
* Add audible notifcation on broadcast error

* Add error audio file

* Add error ogg

* Catch play broadcast error

* Await play error sound

* Add promise error handling

* Add comment about audio elements
2023-05-11 12:15:34 +00:00
Kerry
41c96877d3
Fix: Edit history modal crash (#10834)
* failing test

* handle nodes without children in messagediffutils
2023-05-11 10:21:02 +00:00
Michael Telatynski
949557b5c6
Fall back from server generated thumbnail to original image (#10853)
* Add test for falling back from thumbnail to original

* Fall back from server generated thumbnail to original image
2023-05-11 09:20:14 +00:00
Michael Telatynski
82e32035fd
Conform more of the codebase to strictNullChecks (#10842) 2023-05-11 09:56:56 +01:00
Suguru Hirahara
16ec3b5d7b
Add appearance-user-settings-tab.spec.ts (#10697)
* Add `appearance-user-settings-tab.spec.ts`

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

* Empty commit

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

* Fix a comment

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

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-05-11 06:33:50 +00:00
Michael Telatynski
456c66db5b
Conform more of the codebase to strictNullChecks (#10800) 2023-05-10 08:41:55 +01:00
Suguru Hirahara
c4f59d4d56
Add E2E test of ThemeChoicePanel (#10469)
* Add E2E test of ThemeChoicePanel

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

* Edit a comment

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

* Apply feedback

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

* Remove obsolete data-testId attributes

They has become obsolete with bfa8152538a3a0804ac14e231578d0cba73aa308.

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

* Update a jest snapshot

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

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-05-09 13:48:55 +00:00
Richard van der Hoff
5e8488c283
DeviceListener: use new getUserDeviceInfo method (#10826)
* DeviceListener: use new `getUserDeviceInfo` method

https://github.com/matrix-org/matrix-js-sdk/pull/3272 added a new
`CryptoApi.getUserDeviceInfo` method, which also works with rust crypto. Update
DeviceListener to use it, thus making many of the cypress tests work on Element
Web R.

* add missing await

... mostly to silence the quality gate
2023-05-09 13:39:51 +00:00
Michael Telatynski
08368860f4
Avoid calling prepareToEncrypt onKeyDown (#10828)
* Avoid calling prepareToEncrypt onKeyDown

* Iterate
2023-05-09 10:56:12 +00:00
Suguru Hirahara
ed5c02be6d
Fix long room address and name not being clipped on room info card and update _RoomSummaryCard.pcss (#10811)
* Handle a long room address and name with ellipsis on RoomSummaryCard

* Use a class selector for maintainability

Sort the selectors
2023-05-09 07:56:09 +00:00
Boluwatife Omosowon
739eec8555
Allows search to recognize full room links (#8275)
* fix matrix search link

* fix matrix search link

Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>

* fix: allow full link search

Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>

* fix: allow full link search on new search feature

Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>

* improve transformSearchTerm function

Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>

* improve transformSearchTerm function

Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>

* add review changes

* Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>

added review correction

changed the transformSearchTerm function to use parsePermaLink
removed extra spaces

* add angle brackets to copyright email title

* removed extra space

Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>

* Update src/utils/SearchInput.ts

Co-authored-by: Travis Ralston <travpc@gmail.com>

* fixed spolight dialog search for room and user links

* added tests for transformSearchTerm

* removed transformSearchTerm from room search bar

* replaces two test cases to one that should return the primaryEntityId if the search term was a permalink

* corrected ts issues

* changed type of transformSearchTerm to string

* changed return value from empty string to the original search term if the primaryEntityId of the parsedLink is null

* changed return value from empty string to the original search term if the primaryEntityId of the parsedLink is null

* refactored transformSearchTerm and added a new test case

* rewrote transformSearchTerm doc

* changed mocked return values of test case - should return the original search term if the search term is a permalink and the primaryEntityId is null

* lint corrections

---------

Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>
Co-authored-by: Boluwatife Omosowon <boluwatifeomosowon@Jesus-Loves-You.local>
Co-authored-by: Travis Ralston <travpc@gmail.com>
2023-05-09 07:55:50 +00:00
Michael Telatynski
3692de0460
Update finite automate to match user identifiers as per spec (#10798) 2023-05-09 07:46:19 +00:00
Kerry
d103d2e3dd
set default activity ordering to natural for room list (#10820) 2023-05-08 20:58:53 +00:00
Kerry
727c885687
Fix: Threads button is highlighted when I create a new room (#10819)
* fix thread button highlight logic

* lint
2023-05-08 20:58:27 +00:00
Kerry
b8482b6bc4
Fix: No feedback when waiting for the server on a /delete_devices request with SSO (#10795)
* add spinner while requests in progress during sso interactive auth

* strict
2023-05-07 21:12:45 +00:00
alunturner
01364ebf45
Apply strictNullChecks to src/components/views/voip/* (#10692)
* change interface to discriminated union

* fix ts errors

* use definite assertion operator

* use | undefined, instead of assertion operator

* correct the button press arguments for dial button

* update props to have `Props` suffix

* add comment

* remove unnecessary default

* remove unnecessary comment

* make classname match filename

* setup test file

* export consts for testing

* add initial test

* add another DialPad test

* fix imports
2023-05-05 13:26:31 +00:00
Michael Telatynski
02de2f5ba9
Add better error for email invites without identity server (#10739) 2023-05-05 12:04:13 +01:00
Michael Telatynski
99ac9e5029
Ensure tooltip contents is linked via aria to the target element (#10729)
* Ensure tooltip contents is linked via aria to the target element

* Iterate

* Fix tests

* Fix tests

* Update snapshot

* Fix missing aria labels for more tooltips

* Iterate

* Update snapshots
2023-05-05 08:26:11 +00:00
Michael Telatynski
4dd214506b
Move reaction message previews out of labs (#10601)
* Update reaction message previews to match designs

* Delabs reaction message previews

* tsc strict

* Iterate

* Add test

* Iterate
2023-05-05 07:45:14 +00:00
Kerry
1f4d857283
Apply strictNullChecks to src/components/views/settings (#10724) 2023-05-05 09:13:50 +01:00
Michael Telatynski
a4f0b80692
Improve quality of Typescript types (#10742) 2023-05-05 09:11:14 +01:00
Kerry
542bf68c63
Fix: reveal images when image previews are disabled (#10781)
* fix image wrapping when showImage previews is disabled

* strict v2
2023-05-05 03:41:42 +00:00
Kerry
44e0732144
Sort muted rooms to the bottom of their section of the room list (#10592)
* muted-to-the-bottom POC

* split muted rooms in natural algorithm

* add previous event to account data dispatch

* add muted to notification state

* sort muted rooms to the bottom

* only split muted rooms when sorting is RECENT

* remove debugs

* use RoomNotifState better

* add default notifications test util

* test getChangedOverrideRoomPushRules

* remove file

* test roomudpate in roomliststore

* unit test ImportanceAlgorithm

* strict fixes

* test recent x importance with muted rooms

* unit test NaturalAlgorithm

* test naturalalgorithm with muted rooms

* strict fixes

* comments

* add push rules test utility

* strict fixes

* more strict

* tidy comment

* document previousevent on account data dispatch event

* simplify (?) room mute rule utilities, comments

* remove debug
2023-05-05 01:53:26 +00:00
Andy Balaam
36ea338064
Add a waitFor in case it fixes flaky SecurityRoomSettingsTab test (#10785) 2023-05-04 10:40:49 +00:00
Kerry
692d73dfe8
Use semantic headings in user settings Help & About (#10752)
* split SettingsSection out of SettingsTab, replace usage

* correct copyright

* use semantic headings in GeneralRoomSettingsTab

* use SettingsTab and SettingsSubsection in room settings

* fix VoipRoomSettingsTab

* use SettingsSection components in space settings

* settingssubsection text component

* use semantic headings in HelpUserSetttings tab

* use ExternalLink components for external links

* test

* strict

* lint
2023-05-03 22:35:43 +00:00
Kerry
37b7dfe943
use ExternalLink components for external links (#10758)
* use ExternalLink components for external links

* test

* strict
2023-05-03 21:26:26 +00:00
Kerry
5a73d8e1b0
Use semantic headings in space settings (#10751)
* split SettingsSection out of SettingsTab, replace usage

* correct copyright

* use semantic headings in GeneralRoomSettingsTab

* use SettingsTab and SettingsSubsection in room settings

* fix VoipRoomSettingsTab

* use SettingsSection components in space settings
2023-05-03 01:55:55 +00:00
Kerry
4736f0e44c
Use semantic headings for room settings content (#10734)
* split SettingsSection out of SettingsTab, replace usage

* correct copyright

* use semantic headings in GeneralRoomSettingsTab

* use SettingsTab and SettingsSubsection in room settings

* fix VoipRoomSettingsTab
2023-05-02 21:14:36 +00:00
Kerry
0adf465397
Flaky test SecurityRoomSettingsTab enables encryption after confirmation (#10750)
* try killing all modals before test

* lint
2023-05-02 07:46:32 +00:00
Kerry
58c942be45
split SettingsSection out of SettingsTab, replace usage (#10735)
* split SettingsSection out of SettingsTab, replace usage

* correct copyright

* fix VoipRoomSettingsTab
2023-04-30 22:37:40 +00:00
Michael Weimann
35376996b0
Revert "Implement new toast UI (#10467)" (#10740)
This reverts commit 7632f36624.
2023-04-28 14:56:26 +00:00
Michael Telatynski
f819853cad
Fix autocomplete not resetting properly on message send (#10741) 2023-04-28 13:31:02 +00:00
Michael Telatynski
1281c0746b
Conform more of the codebase to strictNullChecks (#10731) 2023-04-28 09:45:36 +01: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
Michael Telatynski
a629ce3a53
Use generics to better type TabbedView (#10726) 2023-04-27 12:55:29 +01: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
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
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
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