* Migrate more jest tests to vitest
* Fix jest config
* Fix jest config
* Make remaining jest tests type-happy
* Iterate
* Fix Notifier import cycle
* Fix tests
* Delint
* Iterate
* Handle SDKContextClass `client` initialisation internally
Rather than via MatrixChat - this is predominantly for Lifecycle tests as they don't use a MatrixChat and it doesn't make much sense for this component to own this state.
* Fix tests
* Iterate
* Simplify diff
* Improve coverage
* Improve coverage
* Iterate
* Add new settings to enable/disable the sections
* Add `RoomList.showSections` settings to preference user settings
* Hide sections ui in room list header
- Hide the collapse/expand button and the *new section* entry in the
menu.
- Display the *start chat* button instead of the compose menu when the
only action available is to create a DM
* Hide sections ui in context menu of room item
* Listen to show section settings in room list item vm
* Listen to show sections setting in room list header vm
* Put all the rooms inside the chat section when sections are disabled
When the chat section is the only section, the room list is in "flat
list mode". Putting all the rooms inside the chat section.
The section filters (aka custom section, favourites etc) are not passed
to the skip list.
* Update preferences settings screenshot
* Add e2e test for RoomList.showSections toggle
* Hide "Chat moved" toast when a room is tagged when RoomList.showSections is disabled
* First stage
1. Make avatar BIGGER!
2. Move status button out to its own component so we can reuse it
* Working version
but using context menu rather than dropdown menu which almost looks
right but not quite.
* Commit the set status view component
* Change to use dropdown with custom trigger
* Show full set status component in user menu
and styling tweaks
* In user menu, clicking takes you to settings
* Add the view model
* oxfmt
because apparently mine had decided to go away
* Fix type import
* Pass set status viewmodel in story
* Bump compound-web
for customisable dropdown
* Snapshot
* Add explicit aria label
as combobox role things don't just inherit from their inner text
* snapshot again
* Only show user status if feature flag enabled
* Make status btton view not a button
because it doesn't need to be. Also rename accordingly.
* Screenshots
* Disable in settings if feature flag off
* Snapshot
* Snapshot again
* Update screenshots
including room settings one which wasn't really supposed to change
although the avatar now takes up the space it's in - leaving it for
design to check.
* Fix size & positioning of the status button
* Update screenshots
* Screenshots
* Test for SetStatusViewModel
* Update set status view on status change
* Use a link component for the status button
which has built in hover state
* Float the status button in a 28px container
vs making it actually 28px min height
* Separate user menu profile into two sections
With 8px gap between things in the two sections and 12px gap between
sections (ie. in practice, 12px gap between the status control and username).
* Screenshot
* Screenshots
* Pass set status view model in the state
rather than as an extra prop. Fixes it in the story too.
* Pass ownprofilestore into the viewmodel
* Don't use snapshot for testing the view model
Avoids getting all the random stuff from the sub VM in the snapshot
and better to test what we care about anyway.
* don't mention the bad word
* Here too
* Don't show user status for guests
* Update guest story to remove user status
* Fix Notifier import cycle
* Fix tests
* Delint
* Iterate
* Handle SDKContextClass `client` initialisation internally
Rather than via MatrixChat - this is predominantly for Lifecycle tests as they don't use a MatrixChat and it doesn't make much sense for this component to own this state.
* Fix tests
* Iterate
* Improve coverage
* Improve coverage
* Fix bad merge
* Iterate
* Move more element-web tests over to vitest
Switches default env to happy-dom as SdkConfig needs a DOM and is part of the setupTests given a lot of code relies on it
* Restore jest variant of editor mock file for tests not yet moved over
* Migrate batch of tests tro vitest
* Iterate
* Migrate another test
* Simplify
* Iterate
* Iterate
* Fix lockfile
* Deduplicate
* Iterate
* Handle SDKContextClass `client` initialisation internally
Rather than via MatrixChat - this is predominantly for Lifecycle tests as they don't use a MatrixChat and it doesn't make much sense for this component to own this state.
* Fix tests
* start voice call in pip
* Update jest.config.ts
* fix "join" button to use correct intent
* Add regression test for join button
* Update RoomHeader-test.tsx
* fmt
* Add playwright test
* Fix expected intent on "join" button press
* Add additional pip check to exising:
`should be able to join a ${callType} call in progress` test
* Update RoomHeader-test.tsx
After waking from sleep (notably macOS Sequoia), the whole sync backlog is delivered in one
batch, so every backlogged notifying event calls playAudioNotification near-simultaneously
and the identical audio buffers superimpose into a single loud "stacked" sound.
Throttle audible plays to at most one per distinct resolved sound within
NOTIFICATION_SOUND_THROTTLE_MS, keyed on the sound so two genuinely different sounds arriving
within the window each still play. The throttle runs only after the existing silencing gate,
so it suppresses redundant audible plays without affecting the gating logic.
* Modify LinkPreview to export shared atomics
* Implement MessageComposerUrlPreviewView
* Create UrlPreviewFetcher utility function
* Modify view models
* Implement in composer
* Support running tests in dom-less vitest environment
* Add a playwright test
* hide another one
* fmt
* cleanup
* test rte too
* fixup
* Add back docstring
* cleanup
* off by one
* remove description check
* Cleanup hacks
* Remove another hack
* cleanup
* one more
* fixup window here too
* whoops type
* Rename to be cleaeer
* Trim URLs first
* fix bug
* Add a module API for overriding the composer preview.
* tests + cleanup
* fixup comment
* revert accidental change
* fixup
* happy tests
* cleanup
* Update npm non-major dependencies
* Hold back oxfmt due to postcss support being broken
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
Virtuoso's rangeChanged was forwarded to updateVisibleRooms unmapped:
- In grouped mode the range is in entry space (one slot per section
header), while updateVisibleRooms slices the rooms-only array. The
retained window was shifted down by the number of headers above it,
so the view models of the top rendered rooms were disposed and
recreated on every range change.
- Virtuoso's endIndex is inclusive but slice() is end-exclusive, so
the boundary row's view model was disposed and recreated on nearly
every range change.
* Take client creating functionality out of MatrixClientPeg
Because all sorts of things import MatrixClientPeg and this means
they pull in all manner of things related to creating a client, when
all they need is to get the current one (and specifically it fixes
the import cycle that means I can't add my test).
* Remove fake indexeddb
as it seems like the tests didn't actually see the fake indexeddb before
(somehow) but now do, and are failing because they have that but no postmessage.
It feels like the right solution is for these tests to not need indexeddb.
* Don't mock a refresh token
The tests don't mock out enough for the token refreshing setup to work,
it wa somehow always ending up as null previously and now wasn't, at which
point it broke, so just make it actually unset.
* Move formatter instatiation to lazy
rather than eagerly at parse time, as this apparently shifted one
test to hit this import cycle instead.
* Tests for room name generator
* Migrate autocomplete tests to vitest
* Migrate utils/beacon tests to vitest
* Migrate utils/device tests to vitest
* Migrate utils/crypto tests to vitest
* Migrate utils/localRoom tests to vitest
* Migrate notifications tests to vitest
* Fix types
* Make jest test happy
* Make sonar happier
as it seems like the tests didn't actually see the fake indexeddb before
(somehow) but now do, and are failing because they have that but no postmessage.
It feels like the right solution is for these tests to not need indexeddb.
RoomListItemViewModel rebuilt the "Move to section" submenu list via
getCustomSectionData() inside every snapshot rebuild - i.e. on every
notification, name, tag or call update of every live room item - even
though the available sections only change when the custom section
settings change. Each call rebuilds the record from settings and does
an O(spaces) existence check per section.
Cache the available sections (tag + name) in the view model and
rebuild them only from the settings watchers; per-room snapshots now
only derive the cheap isSelected flag. Also watch
RoomList.CustomSectionData so section renames propagate to the
submenu (previously only the order setting was watched).
* Device dehydration tests: use common util for recovery setup
We have a utility method for setting up the recovery key, so let's use it.
* Factor out shared method for creating encrypted rooms
* Playwright test for device dehydration
Add a playwright test to check that this stuff actually works.
* Factor out `verifyAfterLogin` as a separate function
* Playwright test for dehydrated devices with MAS
* Improve accessibility of playwright fixture documentation
Empirically. by pulling the type definitions for the playwright fixtures out to
a type alias, we get better documentation for those fixtures.
* Exclude playwright-common from coverage checks
* Device dehydration tests: use common util for recovery setup
We have a utility method for setting up the recovery key, so let's use it.
* Factor out shared method for creating encrypted rooms
* Playwright test for device dehydration
Add a playwright test to check that this stuff actually works.