Commit Graph

48383 Commits

Author SHA1 Message Date
R Midhun Suresh
cf8b87fd14
Add tabs to the right panel (#12672)
* Create new method for header button behaviour

With the introduction of tabs, the behaviour of the header buttons is
changed as follows:
- Close any right panel if open
- Open the correct right panel if no panel was open before

The old method (and behaviour) is retained as showOrHidePhase.

* Implement tabs in the right panel

There are three tabs: Info, People and Threads

* Remove unwanted code from RoomSummaryCard

- Remove the menu item for opening the memberlist since that is now
  taken of by the tabs.
- Remove the close button

* Remove code for focusing close button from tac item

See https://github.com/matrix-org/matrix-react-sdk/pull/12410

There's no longer a close button to focus so we instead focus the thread
tab. This is done in RightPaneltabs.tsx so we just need to remove this
code.

* Introduce a room info icon to the header

This was previously present in the legacy room header but not in the new
header.

* BaseCard changes

- Adds id, ariaLabelledBy and role props to implement tab accessibility.
- Adds hideHeaderButtons prop to hide header buttons (think back and
  close buttons).
- Change confusing header rendering code:
  header is not rendered ONLY when no header is passed AND
  hideHeaderButtons is true.

* Refactor repeated code into function

Created a new function createSpaceScopeHeader which returns the
component if the room is a space room. Previously this code was
duplicated in every component that uses SpaceScopeHeader component.

* Pass BaseCard attributes and use helper function

Actually using the code from the last two commits

* Add, update and remove tests/screenshots/snapshots

* Fix distance between search bar and tabs

* Update compound

* Update screenshots/snapshots
2024-07-09 11:36:50 +00:00
Michael Telatynski
cd39d91c15
Promote new room header from labs to Beta (#12739)
* Promote new room header from labs to Beta

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

* Update tests

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

* Fix reload warning

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

* Update snapshot

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-07-09 09:45:48 +00:00
ElementRobot
7487b27857
[create-pull-request] automated change (#12740)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
2024-07-09 06:24:22 +00:00
Michael Telatynski
8679ace2b2
Fix incoming call toast crash due to audio refactor (#12737)
* Fix incoming call toast crash due to audio refactor

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>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-07-08 12:44:54 +00:00
RiotRobot
2bf3335557 v3.102.0 2024-07-08 12:23:18 +00:00
RiotRobot
1e060de31a Upgrade dependency to matrix-js-sdk@34.0.0 2024-07-08 12:20:01 +00:00
Michael Telatynski
466f37a83d
Improve new room header accessibility (#12725)
* Fix room header topic not showing on keyboard navigation whilst still using tabstops

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

* Fix keyboard activation of the room header FacePile

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

* Fix label on room header facepile

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

* Comment

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

* Update src/components/views/elements/FacePile.tsx

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2024-07-08 11:52:26 +00:00
Richard van der Hoff
b2a89151e6
Remove redundant call to setCrypto (#12738)
Since matrix-org/matrix-js-sdk#4292, this thing is a no-op.
2024-07-08 10:57:54 +00:00
Michael Telatynski
2a26afe438
Redesign room search interface (#12677)
* Extract SearchInfo interface and SearchScope enum

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

* Fix in-progress and update behaviour of RoomSearchView

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

* Remove search button from legacy header

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

* Move search from aux panel to room summary card

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

* Wire up Cmd/Ctrl F for moved search field

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

* Use cpd space tokens

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

* Remove stale props

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

* Fix ctrl/cmd f search shortcut

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

* Tests

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

* Tests

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

* Update Compound

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

* Revert the back button for now

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

* i18n

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>

* Iterate

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

* Cancel search on escape

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

* Fix missing X

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

* Improve coverage

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

* Extract SearchScope and SearchInfo into Searching

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

* delint

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

* delint

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

* Fix test

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

* Switch to icon button for cancel search

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

* Iterate

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

* yarn.lock

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

* Iterate

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

* lint

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>

* Update screenshots

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

* i18n

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>

* Update locators

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

* Revert screenshots

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

* Update screenshots

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

* Update snapshots

* Discard changes to package.json

* i18n

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

* Snapshots

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

* Handle narrow viewports

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

* Iterate

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

* Improve coverage

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

* Improve coverage

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

* Iterate

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

* Revert copy

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-07-08 09:57:41 +00:00
ElementRobot
596ad38260
[create-pull-request] automated change (#12735)
Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com>
2024-07-08 06:18:46 +00:00
ElementRobot
5bda8d0d5c
[create-pull-request] automated change (#12734)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
2024-07-06 06:22:31 +00:00
David Baker
81f29d13dc
Move language settings to 'preferences' (#12723)
* Move language settings to 'preferences'

Their new home is in this tab

* Update snapshot

* Move playwright test code

* Add test

* tests

* Update screenshot
2024-07-05 22:04:27 +00:00
David Baker
dcf7643d4a
Fix closing all modals (#12728)
* Fix closing all modals

We used `Modal.closeCurrentModal()` in a bunch of places, in all cases
(as far as I can see: it wasn't commented) we meant to close all open
modals. This swaps that function for one that closes all open modals.

Also types the close reason which claimed to be something in a comment,
of course, was wrong because a load of places passed their own random
string which was never used.

* Force close modals

* Try with minimal changes

* Already had a method for this

* Add test

* More tests

* Unused importsd
2024-07-05 13:39:13 +00:00
Richard van der Hoff
a7542dc0ac
Remove dependency on libolm (#12704)
* Remove dependency on libolm

We no longer use this (and haven't for some time, afaict).

* Make olm a dev dep

* Revert "Make olm a dev dep"

This reverts commit f733cdfaf0d7af198b89a10021a976e8f4fff632.
2024-07-05 10:20:47 +00:00
David Baker
06117695bc
Fix close button on forgot password flow (#12732)
* Fix close button on forgot password flow

The 'x' had escaped out the right of the button for some reason

* Add test that actually opens the dialog in question

* Actually screenshot the right thing

* Unnecessary screenshot
2024-07-05 09:51:21 +00:00
Florian Duros
2f953f1d0f
New layout selector ui in user settings (#12676)
* feat: reworked the layout switcher

* feat: make the classname optional in EventTilePreview.tsx

* test: add tests to LayoutSwitcher

* feat: change appearance tab

* test: update appearance snapshot

* e2e: add tests

* css: add comment for gap overriding
2024-07-05 07:30:31 +00:00
ElementRobot
6f5d21fedb
[create-pull-request] automated change (#12731)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
2024-07-05 06:22:38 +00:00
ElementRobot
72b97eac0f
[create-pull-request] automated change (#12730)
Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com>
2024-07-05 06:19:34 +00:00
SuperKenVery
e288f61f0a
Prevent Element appearing in system media controls (#10995)
* Use WebAudio API to play notification sound

So that it won't appear in system media control.

* Run prettier

* Chosse from mp3 and ogg

* Run prettier

* Use WebAudioAPI everywhere

There's still one remoteAudio. I'm not sure what it does. It seems it's
only used in tests...

* Run prettier

* Eliminate a stupid error

* Iterate

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

* Update setupManualMocks.ts

* Iterate

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

* delint

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>

* mocks

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

* mocks

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>

* Simplify

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

* covg

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2024-07-04 18:08:06 +00:00
Robin
c61eca8c24
Don't consider textual characters to be emoji (#12582)
* Don't consider textual characters to be emoji

We were using emojibase-regex to match emoji within messages. However, the docs (https://emojibase.dev/docs/regex/) state that this regex matches both emoji and text presentation characters. This is not what we want, and will result in false positives for characters like '↔' that could turn into an emoji if paired with a variation selector. Unfortunately, none of the other regexes provided by Emojibase do what we want either (https://github.com/milesj/emojibase/issues/174). In the meantime, browser support for the RGI_Emoji character sequence class has made it feasible to write an emoji regex by hand, so that's what I've done.

* Add a fallback for BIGEMOJI_REGEX as well
2024-07-04 17:48:07 +00:00
Richard van der Hoff
489bc32674
Remove references to some deprecated js-sdk identifiers (#12729)
* IKeyBackupInfo -> KeyBackupInfo

* ICryptoCallbacks -> CryptoCallbacks

* IRoomEncryption -> RoomEncryptionEventContent

* MEGOLM_ALGORITHM -> a single local constant

* UserTrustLevel -> UserVerificationStatus
2024-07-04 15:50:07 +00:00
RiotRobot
55fba07ad1 v3.102.0-rc.1 2024-07-04 12:57:45 +00:00
RiotRobot
8febc65bb9 Upgrade dependency to matrix-js-sdk@34.0.0-rc.1 2024-07-04 12:51:13 +00:00
Richard van der Hoff
de12d69e6b
Flaky-test bot: reopen existing issues (#12727)
If a test becomes flaky again, reopen the old issue.
2024-07-04 10:24:15 +00:00
David Baker
e48110d7c6
Move the account management button (#12663)
* Disable profile controls if the HS doesn't allow them to be set

Also updates to the js-sdk interface changes in https://github.com/matrix-org/matrix-js-sdk/pull/4246

* Remove unnecessary await

* Pass disabled prop to accessiblebutton in avatarsetting

* Move the account management button

The section it lives in with the server name goes, and the button
just lives on its own in the profile section.

* Update test

* Revert bits of previous PR that are no longer wanted

because we squash merge so git can no longer make sense of what changes
have been applied.

* More squash-merge fails

* More more squash merge fails
2024-07-04 09:46:26 +00:00
Richard van der Hoff
1fbc97296c
Use LTS nodejs in github workflows (#12726)
Currently our GH workflows all use nodejs 18, but that's not compatible with the
stated support range of matrix-js-sdk, which requires the latest LTS nodejs;
so, when we attermpt to `yarn install` on an older nodejs, we get an error.

Switch to LTS nodejs for all the places we set up nodejs.
2024-07-04 09:24:02 +00:00
ElementRobot
e75dc4e038
[create-pull-request] automated change (#12724)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
2024-07-04 06:24:09 +00:00
Michael Telatynski
0434929ee5
Replace deprecated temporal proposal polyfill (#12636)
* Replace deprecated temporal proposal polyfill

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

* Switch polyfill

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

* Rounding

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

* Fix tests

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-07-03 17:02:10 +00:00
Michael Telatynski
6b90fe20ab
Extract focus_search dispatch action into enum (#12721)
* Extract `focus_search` dispatch action into enum

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

* copypasta

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-07-03 17:02:02 +00:00
Michael Telatynski
b0d2010247
Update new room header facepile tooltip (#12699)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-07-03 17:01:58 +00:00
Michael Telatynski
353b6c0de9
Disable xvfb as it is not necessary for headless mode (#12720)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-07-03 17:01:51 +00:00
ElementRobot
2702f8ba8c
[create-pull-request] automated change (#12722)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
2024-07-03 06:25:00 +00:00
Florian Duros
53ea045c54
Update @vector-im/compound-web (#12718)
* deps: update `@vector-im/compound-web`

* feat: use new EditInPlace

* e2e: update snapshots
2024-07-02 12:35:13 +00:00
David Baker
510fb1ba2f
Disable profile controls if the HS doesn't allow them to be set (#12652)
* Disable profile controls if the HS doesn't allow them to be set

Also updates to the js-sdk interface changes in https://github.com/matrix-org/matrix-js-sdk/pull/4246

* Remove unnecessary await

* Pass disabled prop to accessiblebutton in avatarsetting

* Use getCapabilities

in case there are no cached capabilities

* Fix test

* Go back to just using getCapabilities

Rather than change the other places
2024-07-02 10:04:07 +00:00
David Baker
922676a7cc
Clear autocomplete input on selection accept (#12709)
* Clear autocomplete input on selection accept

Fixes https://github.com/element-hq/element-web/issues/27194

* Playwright: use rust crypto for the bot user (#12708)

... because legacy crypto is legacy

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2024-07-02 09:38:20 +00:00
Florian Duros
7d8623de89
Fix Match system theme toggle (#12719)
* deps: force react-id version

* e2e: use checkbox name
2024-07-02 08:39:22 +00:00
ElementRobot
6ebaf3b46b
[create-pull-request] automated change (#12717)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
2024-07-02 06:25:26 +00:00
ElementRobot
ba7ffd68d2
[create-pull-request] automated change (#12715)
Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com>
2024-07-01 06:18:53 +00:00
ElementRobot
9b00af6b56
[create-pull-request] automated change (#12712)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
2024-06-28 06:24:33 +00:00
ElementRobot
f475e1a6da
[create-pull-request] automated change (#12711)
Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com>
2024-06-28 06:19:44 +00:00
Richard van der Hoff
8feaae66fb
Playwright: use rust crypto for the bot user (#12708)
... because legacy crypto is legacy
2024-06-27 15:43:24 +00:00
ElementRobot
b449dc835b
[create-pull-request] automated change (#12707)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
2024-06-27 06:24:50 +00:00
Florian Duros
33a017b528
New theme ui in user settings (#12576)
* Add hook to get the theme

* Adapt subsection settings to new ui

* WIP new theme subsection

* Add theme selection

* Fix test types

* Disabled theme selector when system theme is used

* Update compound to `4.4.1`

* Add custom theme support

* Remove old ThemChoicePanel

* Fix QuickThemeSwitcher-test.tsx

* Fix AppearanceUserSettingsTab-test.tsx

* Update i18n

* Fix ThemeChoicePanel-test.tsx

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

* Small tweaks

* Fix CSS comments and use compound variable

* Remove custom theme title

* i18n: update

* test: add tests to theme selection

* test: update AppearanceUserSettingsTab-test snapshot

* test: rework custom theme

* playwright: fix audio-player.spec.ts

* playwright: appearance tab

* test: update snapshot

* playright: add custom theme

* i18n: use correct char for ellipsis

* a11y: add missing aria-label to delete button

* dialog: update close button tooltip

* theme: remove local state and handle custom delete

* theme: don't add twice the same custom theme

* test: update snapshot

* playwright: update snapshot

* custom theme: add background to custom theme list

* update compound web

* Use new destructive property on `IconButton` of theme panel

* test: update snapshots

* rename new ui into legacy

* remove wrong constructor doc

* fix theme selector padding

* theme selector: fix key

* test: fix e2e
2024-06-26 15:47:01 +00:00
Michael Telatynski
8ede89101a
Adjust room header hover transition from 300ms to 200ms (#12703)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-06-26 14:17:12 +00:00
David Baker
ea0baee101
Split out email & phone number settings to separate components & move discovery to privacy tab (#12670)
* WIP update of threepid settings section

* Remove email / phone number section from original place

and don't show the new one if 3pids are disabled

* Update snapshots

* Pull identity server / 3pid binding settings out to separate component

and put it in the security & privacy section which is its new home

* Update snapshot

* Move relevant part of test & update screenshots / snapshots

* Remove unnecessary dependency

* Add test for discovery settings

* Add spacing in terms agreement
2024-06-26 13:04:19 +00:00
Michael Telatynski
72475240ec
Extract SearchScope and SearchInfo into Searching (#12698)
* Extract SearchScope and SearchInfo into Searching

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

* delint

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

* delint

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

* Fix test

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

* Comments

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-06-26 10:59:04 +00:00
Michael Telatynski
7a81470558
Pass through BASE_URL env on playwright screenshot docker wrapper (#12696)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-06-26 09:34:15 +00:00
Michael Telatynski
86a95cfff7
Switch from graphemer to Intl.Segmenter (#12697)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-06-26 09:34:07 +00:00
ElementRobot
95c8aa3d18
[create-pull-request] automated change (#12702)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
2024-06-26 06:24:43 +00:00
ElementRobot
b78e6f02f7
[create-pull-request] automated change (#12701)
Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com>
2024-06-26 06:19:17 +00:00