Commit Graph

2264 Commits

Author SHA1 Message Date
Kerry
520659242b
Fix spacing regression in user settings - roles & permissions (#10993)
* add content container to settingsfieldset

* fix spacing
2023-05-28 22:20:44 +00:00
Kerry
9080f3dd55
await promises (#10992) 2023-05-28 22:19:37 +00:00
Andy Balaam
67313743fc
Fall back to receipt timestamp if we have no event (react-sdk part) (#10974) 2023-05-26 14:14:47 +00:00
Richard van der Hoff
810b8ff6d7
Update references to QrCodeEvent, SasEvent and VerificationEvent (#10991)
* Basic test for IncomingSasDialog

* Basic test for VerificationPanel

* Replace references to IGeneratedSas and ISasEvent

* Some secret references to the callbacks types

* Update references to `QrCodeEvent`, `SasEvent` and `VerificationEvent`
2023-05-26 09:29:32 +00:00
Kerry
530197bfcd
Move session manager out of beta (#10968)
* remove old device manager

* undo type fix for cypress crypto

* update test case
2023-05-26 01:58:28 +00:00
Kerry
e326526c10
set correct action for view device list button (#10979) 2023-05-25 22:44:40 +00:00
Kerry
d0d9a36d07
Use semantic headings in user settings - account (#10972)
* account password section

* account email and phone numbers

* update cypress selectors
2023-05-25 22:42:01 +00:00
Richard van der Hoff
5593872b7a
Fix display of devices without encryption support in Settings dialog (#10977)
* Update tests to demonstrate broken behaviour

* Fixes and comments

* Remove exception swallowing

This seems like it causes more problems than it solves.
2023-05-25 16:12:01 +00:00
Michael Telatynski
796ed35e75
Refactor SlashCommands to not use MatrixClientPeg (#10905) 2023-05-25 16:29:48 +01:00
Michael Telatynski
f52fab39fc
Use aria descriptions instead of labels for TextWithTooltip (#10952)
* Use aria descriptions instead of labels for TextWithTooltip

to prevent clobbering the reading of the content

* Update snapshot

* Fix snapshots

* Iterate

* Update snapshots

* delint
2023-05-25 08:42:09 +00:00
Michael Telatynski
f4a265b2c7
Use grapheme-splitter instead of lodash for saving emoji from being ripped apart (#10976)
* Use grapheme-splitter instead of lodash for saving emoji from being ripped apart

* Move to a more appropriate place

* Add tests and improve types
2023-05-25 08:32:20 +00:00
Michael Telatynski
277a3c0146
Conform more of the codebase to strict typescript (#10841) 2023-05-25 09:39:23 +01:00
Kerry
02bf39cc72
Add basic unit test setup for MatrixChat (#10971)
* mock enough things to get to welcome page

* lint

* add simple test for view room settings action

* fussy spacing

* some strict fixes
2023-05-25 02:35:22 +00:00
Suguru Hirahara
0c30f0c838
Simplify nodes on ThirdPartyMemberInfo (#10889)
* Remove mx_MemberInfo_profileField

* Merge mx_MemberInfo_profile with mx_MemberInfo_container

* Remove redundant div elements

* Update a Jest snapshot
2023-05-24 08:28:15 +00:00
Kerry
9f011b955b
Use semantic headings in user settings - discovery (#10838)
* allow testids in settings sections

* use semantic headings in LabsUserSettingsTab

* put back margin var

* use SettingsTab wrapper

* use semantic headings for deactivate acc section

* use semantic heading in manage integratios

* i18n

* use currentColor in warning-triangle svg, update use in RoomStatusBar

* use semantic headings for discovery section

* test manage integration settings

* test deactivate account section display

* remove SettingsFieldset margins

* threepids styles

* remove debug

* test discovery email and phone
2023-05-24 02:37:10 +00:00
Kerry
9211da20f4
Use semantic headings in user settings - Notifications (#10948)
* use semantic headings in user notif settings

* unset margin for subsection content when no heading

* remove debug
2023-05-23 23:36:09 +00:00
Michael Telatynski
30429df948
Eliminate the use of MatrixClientPeg in utils (#10910) 2023-05-23 16:24:12 +01:00
Oliver Sand
a0c2676c38
Pass device id to widgets (#10209)
* Pass device id to widget

Implement the [comment in MSC 3819](https://github.com/matrix-org/matrix-spec-proposals/pull/3819#discussion_r1099833846) which requests passing a device id to a widget.

This is based on the previous work in the matrix-widget-api: https://github.com/matrix-org/matrix-widget-api/pull/78

Signed-off-by: Oliver Sand <oliver.sand@nordeck.net>

* Include all data that is shared in the permissions screen

* Update matrix-widget-api to version 1.4.0

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

* Fix type and test

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

---------

Signed-off-by: Oliver Sand <oliver.sand@nordeck.net>
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
Co-authored-by: Dominik Henneke <dominik.henneke@nordeck.net>
2023-05-23 13:35:31 +00:00
Michael Telatynski
72d1bd910a
Switch from cheerio to DOMParser (#10929)
* Add tests around feature_latex_maths

* Switch from cheerio to DOMParser

* strict

* Iterate
2023-05-23 13:31:05 +00:00
Richard van der Hoff
161e19dfb6
Settings panels: avoid exceptions with rust crypto (#10962)
* Settings panels: avoid exceptions with rust crypto

If we are using rust crypto, `client.crypto` is undefined. We'll need to fix
these up better in future, but for now, just return early.

* Update tests
2023-05-23 12:01:27 +00:00
Suguru Hirahara
b7cd1f00fc
Use Icon component for icons on AppTile's menu bar (#10955)
* Use icon component for buttons on mx_AppTileMenuBar_widgets

* Remove redundant declarations

* Add a Percy snapshot test

* Set color value to mx_Icon, fill and stroke with currentColor

* Iterate
2023-05-22 07:48:40 +00:00
Kerry
74d30187a4
Apply strictNullChecks to src/components/views/rooms/* (#10875)
* fix everything except notificationbadge

* unit test ThirdPartyMemberInfo

* fix RoomPreviewBar dm tests

* lint

* test PinnedEventTile
2023-05-21 23:53:23 +00:00
Kerry
b3b03e5dcb
Use semantic headings in user settings Appearance (#10827)
* 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

* semantic heading in labs settings

* semantic headings in keyboard settings tab

* semantic heading in preferencesusersettingstab

* tidying

* use new settings components in eventindexpanel

* findByTestId

* prettier

* semantic headings and style refresh for crypto settings

* e2e panel

* use semantic headings in User settings appearance tab

* update selectors in tests

* tidy
2023-05-21 21:12:11 +00:00
Suguru Hirahara
c6f44d3053
Add Jest snapshots for AppTile (#10946)
- on PiP widget (PersistentApp)
- on RightPanel
2023-05-19 10:34:55 +00:00
Richard van der Hoff
cc842aac8a
shieldStatusForRoom: avoid deprecated MatrixClient methods (#10944)
Update this method to use modern crypto methods
2023-05-19 11:57:45 +01:00
Kerry
55336bf932
Use semantic heading in user settings Sidebar & Voip (#10782)
* 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

* semantic heading in labs settings

* semantic headings in keyboard settings tab

* semantic heading in preferencesusersettingstab

* tidying

* use new settings components in eventindexpanel

* findByTestId

* prettier

* semantic headings and style refresh for crypto settings

* e2e panel

* semantic headings and cleanup in Sidebar user settings

* semantic heading in voice user settings

* sonarcloud bug and test
2023-05-19 00:03:39 +00:00
Kerry
d9a61c093c
Use semantic headings in user settings Security (#10774)
* 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

* semantic heading in labs settings

* semantic headings in keyboard settings tab

* semantic heading in preferencesusersettingstab

* tidying

* use new settings components in eventindexpanel

* findByTestId

* prettier

* semantic headings and style refresh for crypto settings

* e2e panel

* test cross signing panel

* strict

* more strict

* tweak

* test eventindexpanel

* strict fixes
2023-05-18 22:32:10 +00:00
Michael Telatynski
d0b77cc3aa
Fix big emoji in replies (#10932)
* Add test for big emoji in replies

* Fix big emoji in replies

* Update test snapshot

* Iterate
2023-05-18 08:32:14 +00:00
Suguru Hirahara
8637a5d77d
Take Jest snapshots of widgets (AppTile) (#10897)
* Take a Jest snapshot of a widget (AppTile)

* Fix the comment

* Update test/components/views/elements/AppTile-test.tsx

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

* Add container

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-05-18 08:30:55 +00:00
Michael Telatynski
d9d53870e3
Fix roving tab index getting confused after dragging space order (#10901)
* Fix roving tab index getting confused after dragging space order

* Fix roving tab index for drag reordering

* delint

* Add test

* Make types happier

* Remove snapshot
2023-05-17 14:18:21 +00:00
Michael Telatynski
2da199c41d
Remove url npm dependency and use Web URL constructor (#10930) 2023-05-17 12:50:00 +01:00
Kerry
8cd84b0e7b
Use semantic headings in user settings - integrations and account deletion (#10837)
* allow testids in settings sections

* use semantic headings in LabsUserSettingsTab

* put back margin var

* use SettingsTab wrapper

* use semantic headings for deactivate acc section

* use semantic heading in manage integratios

* i18n

* explicit cast to boolean

* Update src/components/views/settings/shared/SettingsSubsection.tsx

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

* test manage integration settings

* test deactivate account section display

* remove debug

* fix cypress test

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-05-17 07:52:44 +00:00
Kerry
68b1930852
Use semantic headings in user settings Keyboard (#10793)
* settingssubsection text component

* use semantic headings in HelpUserSetttings tab

* test

* strict

* lint

* semantic heading in labs settings

* semantic headings in keyboard settings tab

* semantic heading in preferencesusersettingstab

* tidying

* findByTestId

* prettier

* allow testids in settings sections

* use semantic headings in LabsUserSettingsTab

* use semantic headings in usersettingspreferences

* rethemendex

* put back margin var
2023-05-17 02:34:55 +00:00
Kerry
38ae8e98e4
Use semantic headings in user settings Preferences (#10794)
* allow testids in settings sections

* use semantic headings in LabsUserSettingsTab

* use semantic headings in usersettingspreferences

* rethemendex

* put back margin var
2023-05-17 01:16:49 +00:00
Suguru Hirahara
e01d47923d
Deprecate mx_RightPanel_headerButton class (#10821)
* Replace: %s/mx_RightPanel_headerButton/mx_RoomHeader_button/g

* Conform the selectors to our naming policy: with flag (--)

- %s/mx_RoomHeader_button_highlight/mx_RoomHeader_button--highlight/g
- %s/mx_RoomHeader_button_unread/mx_RoomHeader_button--unread/g

* Update a Jest snapshot

* Move the declarations and Sass variables

- Move Sass variables to the place where they are used
2023-05-16 15:42:58 +00:00
Michael Telatynski
6a3f59cc76
Make more of the codebase conform to strict types (#10857) 2023-05-16 14:25:43 +01:00
alunturner
0d981326ac
RTE plain text mentions as pills (#10852)
* insert mentions as links styled as pills

* post merge fix and update test

* update comments, move typeguard out

* create a text node instead of setting innerText

* update test

* update test

* fix broken cypress test, remove .only

* make it able to deal with inserting in middle of blank lines

* update comment

* fix strict null error

* use typeguard

* avoid implicit truth check

* add hook tests

* add comment

* Update test/components/views/rooms/wysiwyg_composer/hooks/usePlainTextListeners-test.tsx

Co-authored-by: Andy Balaam <andy.balaam@matrix.org>

---------

Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
2023-05-16 11:54:16 +00:00
Michael Weimann
acdbae3e8c
Let TimelinePanel not send a receipt if there is no event (#10912) 2023-05-16 11:34:59 +00:00
Kerry
9bab356e20
Use semantic headings in user settings Labs (#10773)
* allow testids in settings sections

* use semantic headings in LabsUserSettingsTab

* put back margin var

* explicit cast to boolean

* Update src/components/views/settings/shared/SettingsSubsection.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-05-16 01:22:45 +00:00
Richard van der Hoff
38c13509fd
Use new getCrossSigningKeyId instead of old getCrossSigningId (#10885)
* Use new `getCrossSigningKeyId` instead of old `getCrossSigningId`

* Fix type error
2023-05-15 18:30:43 +00:00
Michael Telatynski
d53949e863
Ignore edits in message previews when they concern messages other than latest (#10868) 2023-05-15 18:27:46 +01:00
Michael Weimann
4e5687c454
Send correct receipts when viewing a room (#10864)
* Send correct receipts when viewing a room

* Fix strict type issues

* Handle promises

* Handle more primises

* Add generic array type

* Replace existende check with type predicate

* Fix wrong variable check

* Improve comment about initial read marker

* Use read_markers API for fully read receipts

* Log public receipt fallback

* Rename variables in new code to be aligned to the spec

* Add end-2-end test for read markers and receipts
2023-05-15 16:06:02 +00:00
Michael Telatynski
296ed2273e
Use semantic list elements for menu lists and tab lists (#10902)
* Use semantic list elements for pop up menu lists

* Use semantic list elements for tab lists

* Fix tests

* Update snapshot
2023-05-15 13:33:49 +00:00
Suguru Hirahara
3b2216ec9d
Fix class name of the read marker on MessagePanel (#10745)
* Optimize mx_RoomView_myReadMarker

- Replace the compound selector with a type selector
- Nest the type selector in "mx_RoomView_myReadMarker_container"

* Conform the style rules to the naming policy

Including "container" in a class name is redundant as our naming policy tells that a string followed by an underscore (_) represents a container if it contains an element.

* Run prettier

* Replace `mx_RoomView_myReadMarker hr` with `mx_RoomView_myReadMarker`

- Remove a unit
- Hide hr's parent (mx_RoomView_myReadMarker) on Percy snapshots

* Change the class name from `mx_RoomView_myReadMarker` to `mx_MessagePanel_myReadMarker`

The read marker is specified on MessagePanel.tsx, and should be named so to avoid confusion.

- Create _MessagePanel.pcss for the style rules of MessagePanel

* Update permalinks.spec.ts
2023-05-15 11:02:04 +00:00
David Baker
1aa9860743
Fix the state shown for call in rooms (#10833)
* Fix the state shown for call in rooms

We split out a separate state for 'missed' separate to 'ended' which
caused confusion as the state got set to this when it shouldn't have,
so calls that wouldn't have been shown as missed were.

Remove the csutom call state and just have the missed state as a
variant of the ended state. Re-order the if clauses so they hit the
right ones. Also don't pass the callState variable into renderContent()
which is a class method and so has access to the same info anyway.

* Fix test

* i18n (reorder only)

* Fix test

* Fix types

* Add test for legacy call event tile
2023-05-15 08:37:40 +00:00
Suguru Hirahara
70b67fca77
Add a snapshot for RoomHeaderButtons (#10807) 2023-05-12 19:49:07 +00:00
Robin
87e2274ae7
Enable pagination for overlay timelines (#10757)
* Update @types/jest to 29.2.6

This adds the correct types for the contexts field on mock objects, which I'll need shortly

* Enable pagination for overlay timelines
2023-05-12 16:27:41 +00:00
Richard van der Hoff
a597da26a0
DeviceListener: replace calls to deprecated APIs (#10883)
* DeviceListener: replace calls to deprecated APIs

* fix tests
2023-05-12 15:55:01 +00:00
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
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
Kerry
6c36a2400d
Unit test list ordering algorithms (#10682)
* unit test ImportanceAlgorithm

* strict fixes

* unit test NaturalAlgorithm
2023-04-25 20:59:50 +00:00