Commit graph

46111 commits

Author SHA1 Message Date
Florian Duros
8d77d6e4cc
Add cypress test for verifying a new device via SAS (#10940)
* Add WIP Sas cross-signing test

* Login after bot creation

* Figuring out how to make it work in ci

* Wait for `r0/login` to be called before bot creation

* Make waitForVerificationRequest automatically accept requests

... thereby making the `acceptVerificationRequest` helper redundant

* Clean up `deviceIsCrossSigned`

* combine `handleVerificationRequest` and `verifyEmojiSas`

* get rid of a  layer

... it adds no value

* fix bad merge

* minor cleanups to new test

* Move `logIntoElement` to utils module

* use `logIntoElement`  function

* Avoid intercept

* Avoid `CryptoTestContext`

---------

Co-authored-by: Richard van der Hoff <richard@matrix.org>
2023-05-25 18:24:50 +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
Richard van der Hoff
192e6f6c3d
Fix PR lookup for fetchdep.sh (#10990)
Context: `fetchdep.sh` attempts to check out a github repository based on the
details in a pull request. To do this, it needs to know how to find the pull
request. So, the github workflows attempt to set environment variables to tell
it. Unfortunately, they currently disagree about what the names of the
environment variables should be.

This appears to have been introduced by #8498.

To simplify matters, we may as well have the script use `${GITHUB_REPOSITORY}`
directly, and remove te unused `REPOSITORY` env var from the workflows.
2023-05-25 13:50:17 +00:00
许煜恒
8abe392294
Support Insert from iPhone or iPad in Safari (#10851)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-05-25 12:00:15 +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
Suguru Hirahara
af78a5a2f5
Change button label 'Okay' to 'OK' on showAnalyticsLearnMoreDialog (#10983) 2023-05-25 08:11:04 +00:00
Suguru Hirahara
953da1ae2a
Remove _RoleButton.pcss (#10958)
* Remove obsolete style rules

These have been obsolete since 3c5c2bef6d.

* Remove _RoleButton.pcss

mx_RoleButton_tooltip style rules are used only on NotificationBadge.tsx.

* Rename the class
2023-05-25 04:03:19 +00: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
Michael Telatynski
269a348177
Specify supportedStages for User Interactive Auth (#10975) 2023-05-24 11:02:32 +00:00
Richard van der Hoff
2571f54e8b
Cypress: skip tests known to fail when using Rust crypto (#10873)
* Cypress: skip tests known to fail when using Rust crypto

... which means we can then run the cypress test suite against Element Web R to
check we aren't introducing regressions.

* Update cypress/e2e/register/register.spec.ts

* Use env var to detect rust crypto

* Hoist `skipIfRustCrypto` call earlier
2023-05-24 09:50:05 +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
Suguru Hirahara
7248878e7d
Add security-user-settings-tab.spec.ts (#10925)
* Add security-user-settings-tab.spec.ts

* Feedback
2023-05-24 07:44:18 +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
Kerry
f491f2f951
use semantic headings for spellcheck and language (#10959) 2023-05-23 23:34:56 +00:00
Kerry
2f2804f8af
fix content overflow in settings subsection (#10960) 2023-05-23 23:31:56 +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
renovate[bot]
151b0efe73
Update dependency posthog-js to v1.57.2 [SECURITY] (#10966)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-05-23 13:06:54 +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
Richard van der Hoff
7c34d66bde
Cypress: workaround for EventTile being remounted (#10961)
(Hopefully) fixes https://github.com/vector-im/element-web/issues/25417
2023-05-23 10:09:31 +00:00
Richard van der Hoff
f9e99ed302
Cypress: fix dodgy use of string as event name (#10963) 2023-05-23 09:24:15 +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
Suguru Hirahara
2e3cb0adf7
Replace a Sass variable with a CSS custom property - hover-transition (#10786) 2023-05-22 07:40: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
Suguru Hirahara
08c0f332b3
Remove an obsolete CSS file - _ChatCreateOrReuseChatDialog.pcss (#10949)
It has been obsolete since f85898cdca.
2023-05-21 23:50:14 +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
e652177706
Use classNames function for appTileBodyClass on AppTile.tsx (#10939) 2023-05-19 15:18:18 +00:00
Richard van der Hoff
60e1349eaa
MessageContextMenu: update once the message is sent (#10950)
Fixes a flaky cypress test where the "Remove" option was not appearing
2023-05-19 14:11:40 +00:00
Richard van der Hoff
3623643248
Cypress: allow enabling Rust Crypto via env var (#10951)
* Cypress: allow enabling Rust Crypto via env var

* prettify
2023-05-19 13:55:13 +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
Richard van der Hoff
606eaa5274
StickerPicker: update when accountdata is updated (#10945)
* StickerPicker: update when accountdata is updated

This was incorrectly listening for in-room account data; in fact `m.widgets` is
global account data.

Fixes some flaky cypress tests.

* another ref
2023-05-19 09:52:17 +00:00
Kerry
8513d2f4ff
Fix: flaky percy test "Rendering permalinks" (#10874)
* hide timestamp

* retrigger sonar

* trigger build

* hide elements instead of removing them which might effect scroll

* lint
2023-05-19 02:53:44 +00: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
Richard van der Hoff
6c262fff6b
Deflake spotlight cypress tests (#10943)
* Avoid racing with dialog update

* Wait for rooms to update before opening dialog

* Remove some apparently-spurious `wait`s
2023-05-18 21:44:37 +00:00
Richard van der Hoff
8654a24405
Minor cleanups to handleVerificationRequest in cypress tests (#10941)
* Remove redundant `verifier.done()` call

This `done` call completes the verification process and stops it responding
with further messages. It is unnecessary, *provided* the verification completes
successfully, for which see
https://github.com/matrix-org/matrix-js-sdk/pull/3382.

* Remove duplicated code in `decryption-failure` test

* remove unused imports
2023-05-18 15:12:41 +00:00
Suguru Hirahara
7d0c68aa29
Edit room-header.spec.ts to check apps button (#10934)
* Edit room-header.spec.ts to check apps button

* Check aria-checked status instead

* Edit a comment
2023-05-18 12:54:53 +00:00
Suguru Hirahara
fabfae172b
Update _AuxPanel.pcss (#10888)
* Fix class names - from m_ to mx_

* Move mx_RoomView_auxPanel from _RoomView.pcss to _AuxPanel.pcss

The class name 'mx_RoomView_auxPanel' belongs to AuxPanel, not RoomView

* Correct naming

* Strictify: mx_RoomView_auxPanel *

* Nest mx_AuxPanel_stateViews_span

* Sort

* Run prettier

* Use custom properties

* Revert "Use custom properties"

This reverts commit fe720d05f4572e74e71887203d43c491f0723a92.
2023-05-18 08:54:31 +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
renovate[bot]
dcac340fdc
Update dependency @percy/cli to v1.24.1 (#10936)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-05-18 08:31:25 +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
Patrick Cloke
38467c64bb
Check spec version for MSC3827. (#10937) 2023-05-18 07:47:56 +00:00
Suguru Hirahara
9f574cc764
Replace Sass variable with CSS custom property: --selected-message-border-width (#10876) 2023-05-18 04:18:59 +00:00
Suguru Hirahara
8779219727
Hide empty MessageActionBar on message edit history dialog (#10447)
* Hide MessageActionBar on message edit history dialog if neither redact nor view source button is rendered inside it

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

* Revert "Hide MessageActionBar on message edit history dialog if neither redact nor view source button is rendered inside it"

This reverts commit 247e7d2c8f3a5e2979c93f6a8c31d47d540cc186.

* Iterate - Hide MessageActionBar on message edit history dialog if neither redact nor view source button is rendered inside it

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

* Feedback

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-05-18 04:17:05 +00:00