Commit Graph

45946 Commits

Author SHA1 Message Date
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
Michael Telatynski
2ae50940c8
Update cypress.yaml 2023-04-24 11:01:55 +01:00
Michael Telatynski
25ac825ae5
Cypress use the simulated merge commit for the source of tests (#10688)
* Cypress use the simulated merge commit for the source of tests

* Add comments

* Update .github/workflows/cypress.yaml

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-24 08:24:50 +00:00
Tulir Asokan
2486e7a90a
Fix default content in devtools event sender (#10699)
It regressed from `{\n\n}` to an empty string in #10391

Signed-off-by: Tulir Asokan <tulir@maunium.net>
2023-04-24 08:24:28 +00:00
Suguru Hirahara
ca102c4d36
Remove some obsolete button styles from _common.pcss (#10548)
* Remove obsolete style rules - `mx_linkButton`

The block was added with fbab8ceeef for CreateKeyBackupDialog.js. It has been replaced with AccessibleButton element (see: onSkipPassPhraseClick on L283 and changeText on L314-316). The last function which had used mx_linkButton (_onOptOutClick) has been removed.

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

* Remove obsolete style rules - `mx_textButton`

mx_textButton has been replaced with AccessibleButton (with kind="link"). There is also not an element which uses the class.

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

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-24 08:21:24 +00:00
Eric Eastwood
16ab5e9db0
Properly translate errors in ChangePassword.tsx so they show up translated to the user but not in our logs (#10615)
* Properly translate errors in `ChangePassword.tsx`

So they show up translated to the user but not in our logs.

Part of https://github.com/vector-im/element-web/issues/9597 and also fixes it
since it's the last piece mentioned (there could be other cases we log translated strings)

Fix https://github.com/vector-im/element-web/issues/9597

* Make more useful

* Update i18n strings

* No need to checkPassword since field validation already covers this

See https://github.com/matrix-org/matrix-react-sdk/pull/10615#discussion_r1167363765

Both of the error cases are covered by the logic in `verifyFieldsBeforeSubmit()` just above
and there is no way `checkPassword` would ever throw one of these errors since they are
already valid by the time it reaches here.

* Update i18n strings

* Revert "No need to checkPassword since field validation already covers this"

This reverts commit 7786dd151028e6fbf04d1a38a9c2cd47a3fbfc4b.

* Update i18n strings

* Add todo context to note that we can remove this logic in the future

* Ensure is an error

* Remove else

See https://github.com/matrix-org/matrix-react-sdk/pull/10615#discussion_r1173477053
2023-04-24 09:41:09 +01:00
Suguru Hirahara
e24e85f7a5
Merge set-integration-manager.spec.ts with general-user-settings-tab.spec.ts (#10698)
* Merge `set-integration-manager.spec.ts` with `general-user-settings-tab.spec.ts`

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

* Remove `set-integration-manager.spec.ts`

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

* Remove a duplicate command

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

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-24 07:56:25 +00:00
Michael Telatynski
96c8267f71
Improve types to match reality (#10691) 2023-04-24 07:29:01 +00:00
Suguru Hirahara
ba796504f5
Tidy up IRCLayout.pcss (#10189)
* Specify the data-layout=irc against ':not([data-layout=bubble])'

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

* Include mx_EventTile_info in mx_EventTile[data-layout=irc]

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

* Move declarations up, removing a default declaration

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

* Tidy up mx_EventTile:hover

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

* Use a spacing variable

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

* Sort by order properties

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

* Move and add comments

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

* Merge style declarations - flex-shrink and height

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

* Consider cascading order

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

* Move order declaration top

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

* Fix an invalid comment

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

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-23 07:37:20 +00:00
Suguru Hirahara
92906c2130
Replace Sass variables with custom properties on _font-weights.pcss (#10554)
* Replace `$font-normal` and `$font-semi-bold`

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

* Replace `font-weight: 600` with the custom property

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

* Replace the existing variables

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

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-21 14:16:00 +00:00
Robin
7c4d0ceddc
Fix a crash when a call ends while you're in it (#10681) 2023-04-21 13:54:27 +00:00
Richard van der Hoff
83f12fcba0
More tests for UserInfo (#10677)
* UserInfo-test: move mocking to `beforeEach`

... so that changes to the mocks do not leak between tests

* Add some more tests for UserInfo
2023-04-21 13:48:27 +00:00
Suguru Hirahara
893feed13b
Remove a redundant snapshot - 'Manage integrations' on General settings tab (#10689)
This snapshot became redundant thanks to a new one on general-user-settings-tab.spec.ts (User settings tab - General), and should be removed to reduce the usage of quota.

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-21 13:41:48 +00:00
Richard van der Hoff
5fc402cda0
Deprecate the $spacing- variables (#10686)
* Deprecate the $spacing variables

* more comments
2023-04-21 13:30:21 +00:00
Suguru Hirahara
64997e6f69
Remove obsolete mx_InviteDialog_transferButton class (#10687)
The class has been introduced by 2cc6bcec29be908ac45bf181272e2542aadd73f9 ("Much theming & visual of transfer window dial pad"), and removed by c829cb948031f83d1422867ff54af9ebc2047ba9 ("Use flexbox to layout buttons") from _InviteDialog.scss on the same PR. The class has not used anywhere else since then.

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-21 13:24:40 +00:00
Michael Telatynski
fdfe800b2c
Fix lack of screen reader indication when triggering auto complete (#10664) 2023-04-21 09:49:05 +00:00
Michael Telatynski
be5928cb64
Conform more of the codebase to strictNullChecks (#10672)
* Conform more of the codebase to `strictNullChecks`

* Iterate

* Iterate

* Iterate

* Iterate

* Conform more of the codebase to `strictNullChecks`

* Iterate

* Update record key
2023-04-21 11:50:42 +01:00
Michael Telatynski
792a39a39b
ARIA Accessibility improvements (#10675)
* Fix confusing tab indexes in EventTilePreview

* Stop using headings inside buttons

* Prefer labelledby and describedby over duplicated aria-labels

* Improve semantics of tables used in settings

* Fix types

* Update tests

* Fix timestamps
2023-04-21 09:48:48 +00:00
Suguru Hirahara
259b5fe253
Update threads.spec.ts - use Cypress Testing Library (#10680)
* Set within()

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

* Use findByRole("textbox")

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

* Use findByText()

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

* Apply findByRole() to reaction and emoji picker

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

* Use findByText() and findByRole() for removing a message

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

* Apply findByRole() to the close button

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

* Replace other commands

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

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-21 09:45:10 +00:00
Suguru Hirahara
05ef1d5560
Update sliding-sync.spec.ts - use Cypress Testing Library (#10618)
* Update sliding-sync.spec.ts - use Cypress Testing Library

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

* Use findByRole() - group, treeitem

The elements with ARIA "treeitem" role resides in ones with ARIA "group" role such as Favourites, People, and Invites. The elements with the "treeitem" role correspond to rooms on the room list.

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

* Use the library more - 'should render the Rooms list in reverse chronological order by default and allowing sorting A-Z'

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

* Use cy.findAllByRole("treeitem")

Note the Test room is excluded from being counted thanks to within().

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

* Rename the rooms to avoid confusion

Since it has been unclear "Join" etc. is a verb or a room name, the room
names are changed as below:

- Join -> Room to Join
- Reject -> Room to Reject (the invite)
- Rescind -> Room to Rescind (the invite)

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

* Specify ARIA label for the room sublist headers

Have different ARIA labels specified for "mx_RoomSublist" and "mx_RoomSublist_headerContainer" to clarify the structure.

Change the test to check the new ARIA label.

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

* lint

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

* Fix a race condition

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

* Revert "Specify ARIA label for the room sublist headers"

This reverts commit 193a47de4c0fac4139d7c689fa020d6f0acc6819.

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

* Fix realHover() target

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

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-21 09:32:26 +00:00
Kerry
7a914e73f8
hack to fix console noise from unfaked timers and clearAllModals (#10660) 2023-04-20 22:35:44 +00:00
Suguru Hirahara
5445ee85cd
Update spaces.spec.ts - use Cypress Testing Library (#10620)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-20 21:36:44 +00:00
Michael Telatynski
782060a26e
ARIA Accessibility improvements (#10674)
* Add missing aria-expanded attributes

* Improve autoComplete for phone numbers & email addresses

* Fix room summary card heading order

* Fix missing label on timeline search field

* Use appropriate semantic elements for dropdown listbox

* Use semantic list elements in keyboard settings tab

* Use semantic list elements in spotlight

* Fix types and i18n

* Improve types

* Update tests

* Add snapshot test
2023-04-20 17:13:30 +00:00
Michael Telatynski
2da52372d4
Add arrow key controls to emoji and reaction pickers (#10637)
* Add arrow key controls to emoji and reaction pickers

* Iterate types

* Switch to using aria-activedescendant

* Add tests

* Fix tests

* Iterate

* Update test

* Tweak header keyboard navigation behaviour

* Also handle scrolling on left/right arrow keys

* Iterate
2023-04-20 14:56:21 +00:00
Michael Telatynski
0d9fa0515d
Fix typing tile duplicating users (#10678) 2023-04-20 14:44:54 +00:00
Suguru Hirahara
467c52a2ae
Add E2E test - general-user-settings-tab.spec.ts (#10658)
* Add E2E test: `general-user-settings-tab.spec.ts`

Initial implementation

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

* lint

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

* Check an input area for a new email address too

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

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-20 13:18:19 +00:00
Michael Telatynski
483b53c148
Translate credits in help about section (#10676) 2023-04-20 12:18:13 +00:00
Richard van der Hoff
2cec8b5a44
Add Cypress tests for the "complete security" phase (#10668)
* Cypress tests for the "complete security" phase

* fix imports
2023-04-20 11:04:51 +00:00
Suguru Hirahara
6b211dd602
Update events.spec.ts - use Cypress Testing Library (#10590)
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-20 09:33:31 +00:00
Michael Telatynski
1efa82917a
Fix wrong room topic tooltip position (#10667)
* Fix wrong room topic tooltip position

* Update snapshots

* Fix tests
2023-04-20 08:25:53 +00:00
Michael Telatynski
93b4ee654b
Conform more of the codebase to strictNullChecks (#10666)
* Conform more of the codebase to `strictNullChecks`

* Iterate

* Iterate

* Iterate

* Iterate
2023-04-20 09:49:10 +01:00
Suguru Hirahara
8867f1801e
Remove obsolete CSS declarations from _RoomHeader.pcss (#10496)
* Remove obsolete mx_RoomHeader_textButton and mx_RoomHeader_cancelButton

These declarations have been obsolete since GroupView.js was deleted by fce36ec826.

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

* Remove obsolete mx_RoomHeader_spinner

As of 79d3cca6 it was used as follows:

````
if (this.props.saving) {
    const Spinner = sdk.getComponent("elements.Spinner");
    spinner = <div className="mx_RoomHeader_spinner"><Spinner /></div>;
}
````

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

* Remove obsolete mx_RoomHeader_info

This was deprecated by 18fedb23ec

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

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-20 08:21:06 +00:00
Michael Weimann
83e6a6057d
Add developer tools option to room list context menu (#10635)
* Make developer tools more accessible

* Extend tests

* Use settings hook

* Trigger CI
2023-04-19 11:34:27 +00:00
Kerry
957945b356
remove old debug logging in AsyncWrapper (#10661) 2023-04-19 07:45:27 +00:00
renovate[bot]
aff3bd6e32
Update all non-major dependencies (#10644)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-19 03:29:21 +00:00
renovate[bot]
12cd87f497
Update dependency rimraf to v5 (#10649)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kerry <kerrya@element.io>
2023-04-19 03:24:18 +00:00
Suguru Hirahara
869856df2d
Remove obsolete class name and declarations on General user settings tab (#10659)
* Remove an obsolete class name: `mx_EmailAddresses_new`

The class name was added by aa7afe819f for an initial implementation and became obsolete thanks to 1090b7d912.

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

* Remove obsolete declarations: `mx_ExistingPhoneNumber_delete`

The declarations have been obsolete since 11f2b4320d.

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

* Remove obsolete declarations: `mx_ExistingEmailAddress_delete`

The declarations have also been deprecated by 11f2b4320d.

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

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-18 20:59:18 +00:00
ElementRobot
3b60c8076b
[Backport staging] Fix create subspace dialog not working (#10656)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-04-18 19:00:09 +01:00
Michael Telatynski
0db40e327c
Fix create subspace dialog not working (#10652) 2023-04-18 16:00:55 +00:00