Commit Graph

232 Commits

Author SHA1 Message Date
Florian Duros
da6ac36f11
New room list: add partial keyboard shortcuts support (#29783)
* feat: add support to `Action.ViewRoomDelta`

* test: add tests for support of `Action.ViewRoomDelta`

* test(e2e): add tests for shortcuts

* doc: improve comments in `useRoomListNavigation`
2025-04-22 08:31:12 +00:00
Marc
09ceb3c580
MVVM RoomSummaryCard Topic (#29710)
* feat: create roomSummaryCardTopic view model

* chore: add comments and small update on test mock
2025-04-17 15:56:19 +00:00
R Midhun Suresh
1077729a19
New Room List: Prevent potential scroll jump/flicker when switching spaces (#29781)
* Expose last active room in a given space from space store

* Calculate active index based on active room in new space

* Write test
2025-04-17 12:25:06 +00:00
Marc
4f32727829
feat: warn self change on roles settings (#28926)
* feat: warn self change on roles settings

* test: update RolesRoomSettingsTab to match new modal condition

* test: update e2e RolesRoomSettingsTab to add new modal

* feat: powerlevelselector reput initial value if cancel
2025-04-17 08:58:27 +00:00
Florian Duros
fd455179f7
New room list: avoid extra render for room list item (#29752)
* fix: avoid extra render in the new room list

* fix: listen to room name changes

* fix: trigger render when notification state change

* test: fix room list item tests

* chore: fix typo `RoomNotificationState.isUnsentMessage`

* refactor: move `isNotificationDecorationVisible` into `useRoomListItemViewModel`

* refactor: recalculate notification values on notification state changes

* refactor: rename `isNotificationDecorationVisible` to `showNotificationDecoration`

* test: add test for room list item view

* test: add notification tests in room list item vm

* fix: listen to notification updates in `NotificationDecoration`

* test: update notification decoration tests

* refactor: display notification decoration according to vm

* test: update room list item view tests

* fix: a11y label computation after room name change

* refactor: improve notification handling
2025-04-16 21:40:36 +00:00
renovate[bot]
db9428de87
Update react monorepo (#29765)
* Update react monorepo

* Update snapshots

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>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2025-04-16 09:34:01 +00:00
Florian Duros
b511bf064d
New room list: new visual for invitation (#29773)
* feat: rework invitation styling in room list item

* test: update notification decoration test

* test: add test for vm

* test(e2e): update to new invitation styling
2025-04-16 09:23:23 +00:00
David Langley
aa821a5b6f
Remove virtual rooms (#29635)
* Remove virtual rooms from the timelinePanel and RoomView

* Remove VoipUserMapper

* Remove some unneeded imports

* Remove tovirtual slash command test

* Remove getSupportsVirtualRooms and virtualLookup

* lint

* Remove PROTOCOL_SIP_NATIVE

* Remove native/virtual looks fields and fix tests

* Remove unused lookup fields
2025-04-16 09:36:34 +01:00
Florian Duros
18a7250cf9
New room list: fix incorrect decoration (#29770)
* fix(call): reset call value when the roomId changes

* fix(call): reset presence indicator when the room changes

* refactor: use existing `usePresence`

* test: fix room avatar view test

* test: update snapshots
2025-04-15 16:35:37 +00:00
Will Hunt
6fc3dd4628
Refactor RoomAvatar into a functional component. (#29743)
* Refactor RoomAvatar into a functional component

* Add useRoomAvatar hook

* Remove useRoomAvatar hook and fix RoomAvatarEvents not using thumbnails.

* lint

* Ensure stable version of roomIdName

* Use new hook

* lint

* remove unused param

* Fixup tests

* remove console

* Update test
2025-04-15 09:23:26 +00:00
Will Hunt
23a42e0d54
Refactor several unit tests to use SettingsStore directly. (#29744)
* Refactor notifications-test.ts

* Refactor other tests to stop mocking SettingsStore
2025-04-15 08:01:35 +00:00
Florian Duros
986be9c00d
Fix flaky MatrixChat tests (#29739)
* test: fix flaky MatrixChat `should persist login credentials` test

* test: fix flaky MatrixChat `should log and return to welcome page with correct error when login state is not found` test

* test: fix flaky MatrixChat `should store clientId and issuer in session storage` test
2025-04-14 14:22:46 +00:00
Julien CLEMENT
475e449e81
print better errors in the search view instead of a blocking modal (#29724)
* print better errors in the search view instead of a blocking modal

* update tests and i18n

* fix unused variable

* fix unused variable again
2025-04-14 13:36:34 +00:00
Florian Duros
7ce0a76414
New room list: fix public room icon visibility when filter change (#29737)
* fix: recompute public variable when room changes in room list item view model

* test: add test to check that isPublic is computed correctly when the room changes
2025-04-14 11:59:31 +00:00
Florian Duros
07d5a72f26
New room list: video room and video call decoration (#29693)
* feat: add video call and EC call to room list item vm

* feat: add video call notification decoration to notification decoration component

* feat: add video call support to room list item view

* feat: add new RoomAvatarView component

* feat: deprecate `DecoratedRoomAvatar`

* feat: use `RoomAvatarView` in room list item

* feat: allow custom class for `RoomAvatar`

* test: update notification decoration

* test: update room list item view

* test: update room list snapshot

* test: add tests for room avatar vm

* test: add tests for room avatar view

* test(e2e): update snapshots

* fix: video room creation rights

* test: e2e add test for public and video room
2025-04-14 09:27:43 +00:00
Florian Duros
f39f3d2164
New room list: minor visual fixes (#29723)
* fix: use correct color for room list header

* fix: use error solid icon

* fix: rename Unread as Unreads

* test: update jest snapshots

* test(e2e): update screenshots

* test: fix test
2025-04-14 07:45:32 +00:00
Florian Duros
bcd396e19e
test: fix flaky SetIdServer test (#29719) 2025-04-11 14:26:48 +00:00
renovate[bot]
e1b2e3a101
Update react monorepo to v19 (major) (#28914)
* Update react monorepo to v19

* Import JSX explicitly for React 19 compatibility

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

* Update usages of refs for React 19 compatibility

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

* Update react imports

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

* Avoid legacy contexts as much as possible

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

* Avoid deprecated React symbols

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

* Stash

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

* Update usages of refs for React 19 compatibility

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>

* Switch pillify to use a html-react-parser approach rather than DOM muddling

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

* Iterate

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

* Iterate react html parsing

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

* Iterate react html parsing

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

* Iterate html parsing

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

* Memoize the EventContentBody component

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

* Iterate html parsing

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>

* Iterate

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

* Discard changes to src/Linkify.tsx

* Discard changes to src/components/views/messages/TextualBody.tsx

* Discard changes to src/settings/handlers/AbstractLocalStorageSettingsHandler.ts

* 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>

* Iterate

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

* Prepare for React 19 upgrade

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

* Iterate

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

* Remove stale comment

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>
2025-04-09 19:03:09 +00:00
Andy Balaam
01bfaec729
Catch errors after syncing recovery (#29691)
* Allow setting the Encryption settings tab to any initial state

* Add a variant to the reset flow for 'sync_failed'

* Catch errors after syncing recovery

Fixes #29229

* fixup! Allow setting the Encryption settings tab to any initial state

* fixup! Add a variant to the reset flow for 'sync_failed'

* Move docs for identity panel variants to ResetIdentityPanelVariant
2025-04-08 14:09:04 +00:00
Florian Duros
ab51ff6b7e
Remove Secure Backup, Cross-signing and Cryptography sections in Security & Privacy user settings (#29088)
* feat(security tab)!: remove secure backup panel

BREAKING CHANGE: the key storage user interaction are moved into the Encryption tab. The debugging information are moved into the devtools.

* feat(security tab)!: remove cross signing section

BREAKING CHANGE: the cryptographic identity can be reseted in the Encryption tab. The debugging information are moved into the devtools

* feat(security tab)!: remove cryptography section

BREAKING CHANGE: this section can be found in the Advanced section of the encryption tab.

* test(security tab): update snapshot

* chore(security tab): remove unused component and function

* chore(security tab): update i18n

* test(e2e): remove `backups.spec.ts`
2025-04-08 12:40:06 +00:00
ElementRobot
2bc7223c1c
Localazy Download (#29675)
* [create-pull-request] automated change

* test: fix `RoomListItemView` test

---------

Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
Co-authored-by: Florian Duros <florian.duros@ormaz.fr>
2025-04-08 09:51:15 +00:00
Will Hunt
8fc6638d6e
Allow reporting a room when rejecting an invite. (#29570)
* Add report room dialog button/dialog.

* Update copy

* fixup tests / lint

* Fix title in test.

* update snapshot

* Add unit tests for dialog

* lint

* First pass at adding a report room on invite.

* Use a single line input field for reason to avoid bumping the layout.

* Fixups

* Embed reason to make it clear on grouping

* Revert accidental commit

* lint

* Add some playwright tests.

* tweaks

* Make ignored users list more accessible.

* i18n

* Fix sliding sync test.

* Add unit test

* Even more unit tests.

* move test

* Update to match designs.

* remove console statements

* fix css

* tidy up

* improve comments

* fix css

* updates
2025-04-08 09:08:00 +00:00
R Midhun Suresh
c24a1baf38
RoomListViewModel: Reset primary and secondary filters on space change (#29672)
* Reset filters when space changes

* Write test
2025-04-04 08:40:25 +00:00
Florian Duros
d337106eed
New room list: fix multiple visual issues (#29673)
* fix(room list item): add bold when there is a notification

* fix(room list item menu): fix color of check icon

* fix(menu): remove chevron

* chore: update @vector-im/compound-web

* test(room list): update tests

* test(e2e): update snapshots
2025-04-04 07:45:45 +00:00
Will Hunt
cb657d6848
Update report room dialog to match designs (#29669)
* Rework for designs

* Update report room position

* lint

* Improve test coverage
2025-04-03 13:25:19 +00:00
Florian Duros
817d7b78b8
New room list: add notification options menu (#29639)
* feat: add `utils.hasAccessToNotificationMenu`

* feat(room list item view model): use `hasAccessToNotificationMenu` to compute `showHoverMenu`

* feat(room list item menu view model): add notification options menu attributes

* feat(room list item menu view): add notification options

* test: add tests for `utils.hasAccessToNotificationMenu`

* test(room list item view model): add test for `showHoverMenu`

* test(room list item menu view model): add tests for new attributes

* test(room list item menu view): add tests for notification options menu

* chore: update i18n

* test(e2e): update screenshots

* test(e2e): add tests for notification options menu
2025-04-02 12:30:27 +00:00
Florian Duros
82d93695a2
Update @vector-im/compound-web (#29641)
* chore: update `@vector-im/compound-web`

* test: update snapshots
2025-04-02 10:09:18 +00:00
Michael Telatynski
8bb4d44532
Bundle Element Call with Element Web packages (#29309)
* Embed Element Call into Element Web packages

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>

* Pass rageshakeSubmitUrl & posthogApiHost to EC widget

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>

* Iterate

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>

* Update snapshots

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

* Use @vector-im/element-call-embedded

* Only pass posthog params to EC if Analytics is enabled

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

* Fix test mock

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

* Update EC params to match https://github.com/element-hq/element-call/pull/3089

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

* Update to latest element-call package

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>

* Update to element-call-embedded@ v0.9.0-rc.1

* Gate Sentry params behind analytics consent

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

* Update to element-call-embedded v0.9.0-rc.4

* Update Element Call embedded to 0.9.0 release

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Hugh Nimmo-Smith <hughns@element.io>
2025-03-28 20:34:32 +00:00
Michael Telatynski
209ab59978
Replace onHeightChanged with ResizeObserver (#29602)
* Replace onHeightChanged with ResizeObserver

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>
2025-03-28 10:36:10 +00:00
Florian Duros
6ae11dab52
New room list: fix spacing and padding (#29607)
* fix(menu): reduce gap between button and button size

* fix(notification decoration): increase gap between icons

* fix(room list item): different right padding depending on the menu, notification decoration and the regular case

* test: update snapshots

* test(e2e): update snapshots
2025-03-28 10:21:31 +00:00
Michael Telatynski
fac982811c
Update usages of refs for React 19 compatibility (#29536)
* Update usages of refs for React 19 compatibility

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>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-03-28 10:07:41 +00:00
Michael Telatynski
05df321f34
Import JSX explicitly for React 19 compatibility (#29535)
* Import JSX explicitly for React 19 compatibility

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

* Fixup

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

* Fixup

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-03-27 10:43:58 +00:00
Michael Telatynski
3f47487472
Switch away from nesting React trees and mangling the DOM (#29586)
* Switch away from nesting React trees and mangling the DOM

By parsing HTML events and manipulating the AST before passing it to React

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

* Use MatrixClientContext in Pill now that we are in the main React tree

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

* Add missing import

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

* Break import cycles

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>

* Minimise

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>

* Docs

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-03-26 20:25:03 +00:00
Florian Duros
bbd798ef36
New room list: add notification decoration (#29552)
* chore: update @compound-web

* feat(notification decoration): add NotificationDecoration component

* feat(room list item): get notification state in view model

* feat(room list item): use notification decoration in RoomListItemView

* test(notification decoration): add tests

* test(room list item view model): add a11yLabel tests

* test(room list item): update tests

* test(e2e): add decoration tests
2025-03-26 13:32:02 +00:00
ElementRobot
f3f05874fa
Localazy Download, including changes to 'only send to verified' (#29592)
* [create-pull-request] automated change

* Update tests for copy changes on 'only send to verified'

* Update one more test snapshot for new wording of exclude unverified

* Update screenshots

---------

Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
2025-03-26 13:00:17 +00:00
R Midhun Suresh
690d623dcf
New Room List: Move tests that are in the wrong location (#29584)
* Move test to room-list-filter-sort.spec.ts

This test should reside with all the other filter related tests.

* Move sorting tests out of filter describe block

These two tests somehow ended up in the wrong block!

* Fix lint
2025-03-25 12:18:58 +00:00
Will Hunt
13c4ab2cf4
Add support for hiding videos (#29496)
* start hide

* Move useSettingsValueWithSetter to useSettings

* Add new setting showMediaEventIds

* Add a migration path

* Add an action button to hide settings.

* Tweaks to MImageBody to support new setting.

* Fixup and add tests

* add description for migration

* docs fixes

* add type

* i18n

* appese prettier

* Add tests for HideActionButton

* lint

* lint

* First pass at support for previewing/hiding images.

* Add a test for video files.

* First pass at supporting hiding video files.

* Use a hook for media visibility.

* Drop setting hook usage.

* Fixup MImageBody test

* Fixup tests

* Support functional components for message body rendering.

* Add a comment

* Move props into IProps

* Use new wrapping logic

* lint

* fixup

* allow for a delay for the image to render

* remove .only

* lint

* Fix jest test

* Fixup tests.

* make tests happy

* Improve comments

* review fixes

* unbreak test
2025-03-24 14:38:34 +00:00
Robin
74da64db63
Use an outline icon for the report room button (#29573)
For visual consistency
2025-03-24 14:03:34 +00:00
ElementRobot
e5d37a324d
Localazy Download (#29577)
* [create-pull-request] automated change

* Fix playwright tests

* Update tests to reflect string changes

---------

Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
Co-authored-by: R Midhun Suresh <hi@midhun.dev>
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
2025-03-24 12:02:20 +00:00
Will Hunt
e1970df704
Add report room dialog button/dialog. (#29513)
* Add report room dialog button/dialog.

* Update copy

* fixup tests / lint

* Fix title in test.

* update snapshot

* Add unit tests for dialog

* lint
2025-03-21 17:08:37 +00:00
R Midhun Suresh
b54122884c
RoomListViewModel: Make the active room sticky in the list (#29551)
* Add new hook for sticky room

This hook takes the filtered, sorted rooms and returns a new list of
rooms such that the active room is kept in the same index even when the
list has changes.

* Use new hook in view model

* Add tests

* Use single * in comments
2025-03-21 12:11:59 +00:00
Michael Telatynski
0d28df0f67
Reuse PushProcessor from MatrixClient (#29561)
* Reuse PushProcessor from MatrixClient

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

* Reuse PushProcessor getPushRuleGlobRegex

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>

* Update regex handling

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-03-21 11:34:06 +00:00
R Midhun Suresh
3a39486468
RoomListViewModel: Reset any primary filter on secondary filter change (#29562)
* Reset primary filter when secondary filter is applied

* Add test
2025-03-21 10:46:20 +00:00
Will Hunt
599112e122
Replace checkboxes with Compound checkboxes, and appropriately label each checkbox. (#29363)
* Fix labelling of avatar menu

* Make the integration manager toggle more clear.

* fix label

* lint

* Update snapshots.

* Refactor many cases of checkbox to use the new compound component.

* Remove non-checkbox related changes

* Reset some things

* Remove usages of mx_checkbox* styling.

* Use label locators for apperance tests.

* small linter tweaks

* lint

* update screenshot

* Test updates

* lint

* Realign checkboxes for device selection.

* Fixup QuickSettings styling

* remove comment

* lint

* flex comment

* remove unused label

* remove redundant classes

* add test for spaces

* lint

* Copyright

* fixup spaces test

* spaces lint

* Replace pin with compound pin.

* Realign icons

* Remove hack for colouring icons

* Adjust existing rooms component to correctly label room.

* Add test for adding an existing room to an existing space.

* Set deterministic sort order for rooms

* lint
2025-03-20 15:35:54 +00:00
Andy Balaam
170dcd1c0e
In force-verify mode, prevent bypassing by cancelling device verification (#29487)
* In force-verify mode, prevent bypassing by cancelling device verification

* Don't show the after-login screen if we are racing with forced verification

* Unit test for not bypassing verification by cancelling device verify
2025-03-20 15:10:08 +00:00
Michael Telatynski
a6ae04bcde
Update react imports (#29538)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-03-19 10:39:52 +00:00
Florian Duros
3587161a2c
New room list: add selection decoration (#29531)
* fix(room list): remove 1px extra padding

* feat(room list): add selection decoration to room list item and scroll list to this element

* test(room list item): add is selected test

* test(room list): update snapshot

* test(e2e): add test to keep the room list item visible

* test(e2e): update snapshots
2025-03-19 08:39:12 +00:00
David Baker
f59af3786e
Simplified Sliding Sync (#28515)
* Experimental SSS

Working branch to get SSS functional on element-web.

Requires https://github.com/matrix-org/matrix-js-sdk/pull/4400

* Adjust tests to use new behaviour

* Remove well-known proxy URL lookup; always use native

This is actually required for SSS because otherwise it would use
the proxy over native support.

* Linting

* Debug logging

* Control the race condition when swapping between rooms

* Dont' filter by space as synapse doesn't support it

* Remove SS code related to registering lists and managing ranges

- Update the spidering code to spider all the relevant lists.
- Add canonical alias to the required_state to allow room name calcs to work.

Room sort order is busted because we don't yet look at `bump_stamp`.

* User bumpStamp if it is present

* Drop initial room load from 20 per list to 10

* Half the batch size to trickle more quickly

* Prettier

* prettier on tests too

* Remove proxy URL & unused import

* Hopefully fix tests to assert what the behaviour is supposed to be

* Move the singleton to the manager tyo fix import loop

* Very well, code, I will remove you

Why were you there in the first place?

* Strip out more unused stuff

* Fix playwright test

Seems like this lack of order updating unless a room is selected
was just always a bug with both regular and non-sliding sync. I
have no idea how the test passed on develop because it won't run.

* Fix test to do maybe what it was supposed to do... possibly?

* Remove test for old pre-simplified sliding sync behaviour

* Unused import

* Remove sliding sync proxy & test

I was wrong about what this test was asserting, it was suposed
to assert that notification dots aren't shown (because SS didn't
support them somehow I guess) but they are fine in SSS so the test
is just no longer relevant.

* Remove now pointless credentials

* Remove subscription removal as SSS doesn't do that

* Update tests

* add test

* Switch to new labs flag & break if old labs flag is enabled

* Remove unused import & fix test

* Fix other test

* Remove name & description from old labs flag

as they're not displayed anywhere so not useful

* Remove old sliding sync option

by making it not a feature

* Add back unread nindicator test but inverted

and minus the bit about disabling notification which surely would have
defeated the original point anyway?

* Reinstate test for room_subscriptions

...and also make tests actually use sliding sync

* Use UserFriendlyError

* Remove empty constructor

* Remove unrelated changes

* Unused import

* Fix import

* Avoid moving import

---------

Co-authored-by: Kegan Dougal <7190048+kegsay@users.noreply.github.com>
2025-03-18 17:54:32 +00:00
Will Hunt
e662c1959b
Add ability to hide images after clicking "show image" (#29467)
* start hide

* Move useSettingsValueWithSetter to useSettings

* Add new setting showMediaEventIds

* Add a migration path

* Add an action button to hide settings.

* Tweaks to MImageBody to support new setting.

* Fixup and add tests

* add description for migration

* docs fixes

* add type

* i18n

* appese prettier

* Add tests for HideActionButton

* lint

* lint

* Use a hook for media visibility.

* Drop setting hook usage.

* Fixup MImageBody test

* Fixup tests

* Support functional components for message body rendering.

* Add a comment

* Move props into IProps
2025-03-18 14:23:24 +00:00
R Midhun Suresh
839329b52a
RoomListViewModel: Track the index of the active room in the list (#29519)
* Introduce a hook to track active room

This hook simply keeps a state which tracks the index of the active room
in the list of rooms passed through props. This index will be recomputed
if the active rooms changes or if the list itself changed.

* Use hook in the view model

* Write tests

* Fix broken tests
2025-03-18 12:49:10 +00:00