Commit Graph

148 Commits (02e7fb340e8743a5f3879bf356074946837f74ab)

Author SHA1 Message Date
Richard van der Hoff bd7ce7cda9
Expected UTDs: use a different message for UTDs sent before login (#12391)
* Use different messages for UTDs sent before login

* Playwright test for historical events

* Add some tests

* Don't show "verify" message if backup is working

* Apply suggestions from code review
2024-04-25 08:11:41 +00:00
Florian Duros 700b3955a4
Add `Tooltip` to `AccessibleButton` (#12443)
* Deprecate AccessibleTooltipButton

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Deprecate AccessibleTooltipButton

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix `UserInfo-test.tsx`

* Update `LoginWithQRFlow-test.tsx` snapshot

* Remove tooltip provider from test

* Fix `AccessibleButton`

* Update snapshots

* Revert to original import

* Use title to populate aria-label

* Rollback AccessibleButton or Tooltip changes. Will come in another PR

* Rollback en.json change

* Update snapshots

* Fix `UserInfo`

* Update snapshots

* Use label instead of title in test

* Use label instead of title in TAC test

* Use label instead of title in read-receipt test

* Remove tooltip for ContextMenu

* Add extra information for caption field

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2024-04-24 12:24:25 +00:00
renovate[bot] 3e12cd950a
Update all non-major dependencies (#12423)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-16 14:47:44 +00:00
Hubert Chathi 31373399f9
Add support for device dehydration v2 (#12316)
* rehydrate/dehydrate device if configured in well-known

* add handling for dehydrated devices

* some fixes

* schedule dehydration

* improve display of own dehydrated device

* created dehydrated device when creating or resetting SSSS

* some UI tweaks

* reorder strings

* lint

* remove statement for testing

* add playwright test

* lint and fix broken test

* update to new dehydration API

* some fixes from review

* try to fix test error

* remove unneeded debug line

* apply changes from review

* add Jest tests

* fix typo

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

* don't need Object.assign

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>
2024-04-15 15:47:15 +00:00
Florian Duros aadb46358b
Fix thread navigation in timeline (#12412)
* Remove thread dispatch action

* Add comment

* Add e2e test
2024-04-12 09:07:57 +00:00
David Baker 59395abb6b
Focus the thread panel when clicking on an item in the TAC (#12410)
* Focus the thread panel when clicking on an item in the TAC

actually the 'close' button in the threads panel as it's the only
interactive element: we can improve this later when we use landmarks
& generally have better a11y.

* Undo minor refactoring

as none of it is test3ed, it's not worth it.

* add unit test

* Add matrixchat tests

* Needs awaits

* ts-ignore

* Fix test (I think...)

* Remove unnecessary value set

* Not how assignments work
2024-04-10 13:13:08 +00:00
Florian Duros 5815e70b76
TAC: Release Announcement (#12380)
* WIP

* Store the release announcements in the account settings

* Update TAC release announcement description

* Fix settings content comparison

* Add logging in case of failure

* Watch settings changes

* I add release announcement settings to disable it

* Disable release announcement in e2e test

* Add release announcement in e2e test

* Add tests for ReleaseAnnouncementStore.ts

* Update compound-web to `3.3.0`

* Update TAC tests

* Update Labs tests

* Nits

* Add test for ReleaseAnnouncement.tsx

* Update `@vector-im/compound-web`

* Add playwright snapshot

* Delete false playwright screenshot

* Wait for EW to be displayed after reload

* Add screenshot

* Clean util file

* Renaming and comments fixing

* Use second store instead of looking in the store.

---------

Co-authored-by: R Midhun Suresh <hi@midhun.dev>
2024-04-08 08:43:59 +00:00
David Baker f37821d62c
Fix/disable failing playwright tests (#12402)
* Set display name earlier to fix playwright test

Unsure why this is failing on CI, it's fine locally. Let's try
setting the display name earlier to see if that fixes it.

* Disable failing presence test

also comments

* Link issue too
2024-04-05 18:07:25 +00:00
Richard van der Hoff 3de8de541a
Remove redundant workaround in playwright test (#12390)
This was https://github.com/element-hq/element-web/issues/26723, which is fixed.
2024-04-03 10:09:25 +00:00
Richard van der Hoff 9587cfacfa
playwright: Document some of the fixtures (#12388) 2024-04-03 10:02:41 +00:00
David Baker 4ae94ae247
Mark all threads as read button (#12378)
* Mark all threads as read button

* Wrap in TooltipProvider and update snapshots

* Remove TooltipProvider wrapper: just add it to the test

* Add some more tests

* Add test for no-room-context handler because sonarcloud

* Add playwright test

* Make assertNoTacIndicator wait

* Use dedicated useMatrixClientContext function

Co-authored-by: Florian Duros <florianduros@element.io>

* Use dedicated useRoomContext function

Co-authored-by: Florian Duros <florianduros@element.io>

* Compound spacing variables

Co-authored-by: Florian Duros <florianduros@element.io>

* Compound spacing variables

Co-authored-by: Florian Duros <florianduros@element.io>

* Imports

* Use createTestClient()

* Add function to utils

* Use mkRoom

---------

Co-authored-by: Florian Duros <florianduros@element.io>
2024-03-28 17:38:21 +00:00
Richard van der Hoff 157ca48dff
Remove references to `matrix-js-sdk/src/crypto/verification` (#12365)
All this stuff is deprecated and has better alternatives now.
2024-03-25 17:44:45 +00:00
Michael Telatynski ef2bd7ae04
Improve types for `sendEvent` (#12335) 2024-03-25 12:48:48 +00:00
Michael Telatynski 56d7911897
Iterate styles around Link new device via QR (#12356)
* Rearrange user settings tab order to move Sessions up to 2nd

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate copy & iconography on Settings > Sessions > Link new device

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate design of Scan QR code screen

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Tweak styles

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update tests and snapshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update tests and snapshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update screenshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-03-22 15:50:06 +00:00
David Baker 8f22550f19
Merge pull request #12336 from matrix-org/andybalaam/stas-demydiuk-membership-type3
Introduce Membership type (take 2)
2024-03-22 15:36:39 +00:00
Richard van der Hoff d36c1b39fd
Clean up some references to internal js-sdk classes (#12363)
* Fix references to `crypto-api/verification`

This is supposed to be an internal module; use the front door instead.

* `IRecoveryKey` -> `GeneratedSecretStorageKey`

`IRecoveryKey` is just a backwards-compatibility alias for
`GeneratedSecretStorageKey`

* `ISecretStorageKeyInfo` -> `SecretStorage.SecretStorageKeyDescription`

Again, same thing

* `IPassphraseInfo` -> `SecretStorage.PassphraseInfo`

* Remove unused import restriction exceptions
2024-03-22 12:28:13 +00:00
Robin a0795c7518
Improve readability of badges and pills (#12360)
* Improve readability of badges and pills

Badges will now always use light theme colors so that they become white-on-gray in both themes, and the contrast of pills has been increased so that they use primary action colors as the background.

* Fix tests
2024-03-22 00:27:13 +00:00
Michael Telatynski ea3fff2d2f
Fix some playwright flaky tests (#12357)
* Fix flaky test `should memorize the timeline position when switch Room A -> Room B -> Room A`

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix flaky test `should be correctly rendered - high contrast theme`

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix flaky test `Cryptography › setting up secure key backup should work isDeviceVerified=false`

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update screenshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update screenshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-03-21 15:49:12 +00:00
Andy Balaam d7bdbee8d2 Merge branch 'develop' into andybalaam/stas-demydiuk-membership-type3 2024-03-20 17:25:23 +00:00
Michael Telatynski 2cbf92860b
Improve types for `sendStateEvent` (#12331) 2024-03-20 14:27:29 +00:00
renovate[bot] 665605b2b6
Update dependency typescript to v5.4.2 (#12324)
* Update dependency typescript to v5.4.2

* Fix type conflicts

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Make tsc happier

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2024-03-19 17:55:06 +00:00
Florian Duros ddd0ec48ac
Change user permission by using a new apply button (#12346)
* Add PowerLevelSelector.tsx.
It's extracting the current behavior of the privileged users and muted of `RolesRoomSettingsTab.tsx` into a dedicated component.
It's also adding a new apply button.

* Use `PowerLevelSelector` to render privileged and muted users in `RolesRoomSettingsTab`

* Update existing tests

* Add playwright test

* Fix typo

* Fix typo
2024-03-19 13:45:23 +00:00
David Baker a5ed97b903
Mark as Unread (#12254)
* Support the mark as unread flag

* Add mark as unread menu option

and make clering notifications also clear the unread flag

* Mark as read on viewing room

* Tests

* Remove random import

* Don't show mark as unread for historical rooms

* Fix tests & add test for menu option

* Test RoomNotificationState updates on unread flag change

* Test it doesn't update on other room account data

* New icon for mark as unread

* Add analytics events for mark as (un)read

* Bump to new analytics-events package

* Read from both stable & unstable prefixes

* Cast to boolean before checking

to avoid setting state unnecessarily

* Typo

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

* Doc external interface (and the rest at the same time)

* Doc & rename unread market set function

* Doc const exports

* Remove listener on destroy

* Add playwright test

* Clearer language, hopefully

* Move comment

* Add reference to the MSC

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

* Expand on function doc

* Remove empty beforeEach

* Rejig badge logic a little and add tests

* Fix basdges to not display dots in room sublists again

and hopefully rename the forceDot option to something that better
indicates what it does, and add tests.

* Remove duplicate license header (?)

* Missing word (several times...)

* Incorporate PR suggestion on badge type switch

* Better description in doc comment

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

* Update other doc comments in the same way

* Remove duplicate quote

* Use quotes consistently

* Better test name

* c+p fail

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2024-03-19 13:28:20 +00:00
Michael Telatynski a8341c0e95
Extract types for re-use in matrix-js-sdk.d.ts (#12350)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-03-19 10:19:38 +00:00
Andy Balaam 5cd7743fcb Remove use of KnownMembership from playwright tests 2024-03-18 16:32:36 +00:00
Robin 26b4d47af1
Refine the colors of some more components (#12343)
* Refine the colors of some more components

This is a reintroduction of https://github.com/matrix-org/matrix-react-sdk/pull/12255, and should be the last part of the Compound color refinement work (https://github.com/element-hq/element-web/issues/26992). I've updated the following components to reflect design decisions (https://www.figma.com/file/pqhlirZFEwEp5XpudSbiia/Theming-Web-templates?type=design&node-id=80-60219&mode=design&t=mjqwylUie1vRwzOV-0) that will help them fit in better with the new design system:

- Message bubbles
- Pills
- Sent indicators
- Jump to bottom/unread buttons
- Composer placeholder
- Notification badges
- Room sublists
- Verification shields
- Date separators
- Tooltips

Closes https://github.com/element-hq/element-web/issues/22122

* Update some screenshots
2024-03-18 15:47:55 +00:00
Andy Balaam d3c0435446 Adept KnownMembership imports for new location in types 2024-03-18 14:43:08 +00:00
Andy Balaam 34559d2a89 Adapt Membership usage for the change to an enum KnownMembership 2024-03-18 14:43:08 +00:00
Stanislav Demydiuk da99bad7b9 Introduce Membership type 2024-03-18 14:43:08 +00:00
Florian Duros e247d31808
TAC: Order rooms by most recent after notification level (#12329)
* Order room by thread timestamp

* Fix key errors in test

* Update jest snapshots

* Update snapshots

* Rename alpha/beta to numbers

* Add playwright test
2024-03-15 09:11:52 +00:00
Florian Duros e309410266
TAC: Fix hover state when expanded (#12337)
* Fix TAC hover state

* Add playwright test

* Update playwright snapshot after last compound style changes
2024-03-14 16:21:18 +00:00
Robin 80c4c3c28c
Refine styles of menus, toasts, popovers, and modals (#12332)
* Refine styles of menus, toasts, popovers, and modals

This is a reintroduction of https://github.com/matrix-org/matrix-react-sdk/pull/12247, with the difference that modal styles have now been refreshed as well.

* Restore the fixed heights of some dialogs

* Fix formatting and flaky screenshot
2024-03-13 13:38:32 +00:00
Florian Duros ddbc6439ce
Fix spotlight opening in TAC (#12315)
* Fix spotlight opening in TAC

* Add tests

* Remove `RovingTabIndexProvider`
2024-03-08 10:18:30 +00:00
renovate[bot] 942fabc5a8
Update all non-major dependencies (#12310)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2024-03-05 17:56:10 +00:00
Robin 6eafe0e5a8
Refine styles of controls to match Compound (#12299)
This changes the styles of buttons, other form controls, and tabs in settings to:

1. Improve their usage of semantic colors, so that they adapt correctly to custom themes
2. Make them more visually coherent with the new Compound design system, as we integrate more of it into the app

This is a re-introduction of https://github.com/matrix-org/matrix-react-sdk/pull/12241 with the difference that we're now using our branding colors again on form colors, and buttons have become rounded to match the appearance of new Compound buttons.
2024-03-05 04:25:47 +00:00
Michael Telatynski 86469bdd32
Add custom reporter to auto-report flaky Playwright tests (#12290) 2024-02-28 13:02:09 +00:00
David Baker 2402cd59bc
Allow screenshot update docker to run multiple test files (#12291)
The entrypoint script only passed the first argument so if you specified
multiple test files it would only run the first.

This will need the docker image to be rebuilt on each machine you run it
on to take effect.
2024-02-28 10:04:25 +00:00
David Baker 5ac222e1c4
Fix alignment of user menu avatar (#12289)
* Fix alignment of user menu avatar

https://github.com/matrix-org/matrix-react-sdk/pull/12267 made the avatar
a couple of pixels out of alignment with the space icons. It just needed
to be moved 2px to the right to match the 18px margin of the space icons
(including the padding from the black border).

Also change elements in the user menu to block elements so they don't
generate extra vertical space in the user menu div, which was causing the
hairline to be too far down.

* Update snapshots

* Typo

Co-authored-by: Robin <robin@robin.town>

* Reference the span by class

* The img wasn't actually necessary here

---------

Co-authored-by: Robin <robin@robin.town>
2024-02-27 19:50:44 +00:00
David Baker 28f7aac9a5
Hide the archived section (#12286)
* Hide the archived section

* Only add archived section if necessary

* Update e2e tests
2024-02-27 10:00:10 +00:00
Valere 8a70260c81
ModuleAPI: `overwrite_login` action was not stopping the existing client resulting in the action failing with rust-sdk (#12272)
* Fix overwrite login action not stopping client

* remove unneeded fixture for overwrite login test

* Fix playwrite bad import of app sources

* revert uneeded change on fore OnLoggedIn causing side effects

* Add unit test for overwrite login action

* remove un needed ts-ignore
2024-02-22 15:41:21 +00:00
renovate[bot] bbbb0e3dec
Update all non-major dependencies (#12214)
* Update all non-major dependencies

* Prettier

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2024-02-22 10:11:25 +00:00
David Baker ebd0a046b1
Fix the space panel getting bigger when gaining a scroll bar (#12267)
* Fix the space panel getting bigger when gaining a scroll bar

Just makes the scrollbar gutter stable and removes 8px of padding
to compensate, so it will make the bar slightly larger, but it will
no longer change size weirdly if you have too many spaces in too short
a window.

* Tweak margins to keep space panel the same size

* Try 1px more

* Try 1px more to the left

* Fix sizes and disable flex when in narrow mode

* Update screenshots

* Another screenshot

* Last screenshot hopefully
2024-02-21 15:18:58 +00:00
Florian Duros 6d55ce0217
Use browser's font size instead of hardcoded `16px` as root font size (#12246)
* WIP Use browser font size instead of hardcoded 16px

* Add font migration to v3

* Remove custom font size input

* Use a dropdown instead of a slider

* Add margin to the font size dropdown

* Fix `UpdateFontSizeDelta` action typo

* Fix `fontScale`in `Call.ts`

* Rename `baseFontSizeV3` to `fontSizeDelta`

* Update playwright test

* Add `default` next to the browser font size

* Remove remaining `TODO`

* Remove falsy `private`

* Improve doc

* Update snapshots after develop merge

* Remove commented import
2024-02-21 11:23:07 +00:00
Michael Telatynski 36a8d503df
Add Playwright tests for OIDC-aware & OIDC-native (#12252)
* Resolve race condition between opening settings & well-known check in OIDC mode

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add OIDC-aware and OIDC-native tests using MAS

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-02-21 10:43:47 +00:00
Florian Duros 96a33b800a
Revert "Use Compound primary colors for most actions" (#12264)
* Revert ed5ef023b2

* Update failing snapshots

* Update snapshots after develop merge
2024-02-20 16:24:40 +00:00
David Baker d20e9e4f8e
Fix gradients spacings on the space panel (#12262)
* Fix gradients spacings on the space panel

Make the gradients two separate ones so they can be fixed pixel widths
from the top & bottom rather than percentages of the height.

Tweak the spacings between the user menu & threads panel to match
the figma and from Gaelle's design.

* Update snapshots

* More screenshots
2024-02-20 15:28:46 +00:00
Michael Telatynski a9add4504f
Improvements around docker in Playwright (#12261)
* Extract Postgres Docker to its own class

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Don't specify docker `--rm` in CI as it makes debugging harder

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Improve docker commands and introspection

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Remove `HOST_DOCKER_INTERNAL` magic in favour of `host.containers.internal`

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Always pipe

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Re-add pipe flag to silence pg_isready and podman checks

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-02-20 14:21:10 +00:00
Florian Duros ac435c8d4e
Revert "Refine menu, toast, and popover colors (#12247)" (#12263)
This reverts commit 0856c7617d.

Co-authored-by: David Langley <langley.dave@gmail.com>
2024-02-20 13:54:33 +00:00
Michael Telatynski 0e22413885
Improvements to Playwright test infrastructure (#12260)
* Move mailhog fixture to element-web-test.ts

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Remove spurious debug log

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Lazily set up ElementAppPage subfixtures to avoid conflicting on network routing

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update playwright/e2e/crypto/utils.ts

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-02-19 17:26:32 +00:00
David Baker e8ce9cb360
Use h1 as first heading in dialogs (#12250)
* Use h1 as first heading in dialogs

The dialog should be modal and therefore the only content active
on the screen, so the title of the dialog should be the top level.

Update snapshots & tests appropriately.

* Just customise the letter spacing on dialog titles
2024-02-16 14:23:33 +00:00