* Start to implement intents for DM calls.
* Refactor and fix intent bugs
* Do not default skipLobby in Element Web
* Remove hacks
* cleanup
* Don't template skipLobby or returnToLobby but inject as required
* Revert "Don't template skipLobby or returnToLobby but inject as required"
This reverts commit 35569f35bb.
* lint
* Fix test
* lint
* Use other intents
* Ensure we test all intents
* lint
* cleanup
* Fix room check
* Update imports
* update test
* Fix RoomViewStore test
* Fix room joining over federation not specifying vias or using aliases
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Be consistent with viaServers
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Simplify modules
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Only consider canAskToJoin on 403 as per spec
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove unused helper which I only just added =(
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Previously we were watching for changes to the room state to know when you become connected to a call. However, the room state might not change if you had a stuck membership event prior to re-joining the call. It's going to be more reliable to watch for the 'join' action that Element Call sends, and use that to track the connection state.
* Move Room List to ListView
- Also remove Space/Enter handing from keyboard navigation we can just leave the default behaviour of those keys and handle via onClick
* Update rooms when the primary filter changes
Otherwise when changing spaces, the filter does not reset until the next update to the RVS is made.
* Fix stickyRow/scrollIntoView when switiching space or changing filters
- Also remove the rest of space/enter keyboard handling use
* Remove the rest of space/enter keyboard handling use
* Remove useCombinedRef and add @radix-ui/react-compose-refs as we already depend on it
- Also remove eact-virtualized dep
* Update RoomList unit test
* Update snapshots and unit tests
* Fix e2e tests
* Remove react-virtualized from tests
* Fix e2e flake
* Update more screenshots
* Fix e2e test case where were should scroll to the top when the active room is no longer in the list
* Move from gitpkg to package-patch
* Update to latest react virtuoso release/api.
Also pass spaceId to the room list and scroll the activeIndex into view when spaceId or primaryFilter change.
* Use listbox/option roles to improve ScreenReader experience
* Change onKeyDown e.stopPropogation to cover context menu
* lint
* Remove unneeded exposure of the listView ref
Also move scrollIntoViewOnChange to useCallback
* Update unit test and snapshot
* Fix e2e tests and update screenshots
* Fix unit test and snapshot
* Update more unit tests
* Fix keyboard shortcuts and e2e test
* Fix another e2e and unit test
* lint
* Improve the naming for RoomResult and the documentation on it's fields meaning.
Also update the login in RoomList to check for any change in filters, this is a bit more future proof for when we introduce multi select than using activePrimaryFilter.
* Put back and fix landmark tests
* Fix test import
* Add comment regarding context object getting rendered.
* onKeyDown should be optional
* Use SpaceKey type on RoomResult
* lint
* Add labs option for "share history on invite"
* Set `acceptSharedHistory` when joining a room
* set `shareEncryptedHistory` when sending an invite
* Update src/i18n/strings/en_EN.json
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Allow Element Call to send call notifications
Currently Element Web is responsible for sending the call notification event, but this is planned to be changed soon. As of the upcoming Element Call 0.14.0 release, it will request the capability to send call notifications itself, and we should auto-approve this capability.
* Add reaction capability missing from test
Element Call does in fact request this one.
The latest mobile designs for Element Call have it displaying the room name in an "app bar". So the Element Call widget will soon start requesting the capability to learn the room name, and Element Web should auto-approve this capability.
* Dispatch an action when room is forgotten
* Dispatch an action when room is forgotten
* Remove room on action
* Add test
* Write test for matrixchat
* Add payload info to comment
This widget driver method was mistakenly filtering all state events out of the responses to read_events fromWidget actions. This was a hold-over from back when read_events had two different behaviors depending on whether you specified a state_key (i.e. before the introduction of the update_state action).
* Switch from defer to PromiseWithResolvers
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add modernizr check
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>
* Write failing playwright test
Basically when someone changes their name, any old tombstoned rooms that
were previously hidden would suddenly show up in the list.
* Split addRoom into two methods
- `reInsertRoom` that re-inserts a room that is already known by the skiplist.
- `addNewRoom` to add new rooms
The idea is that sometimes you only want to re-insert to noop, eg: when
you get an event in an old room that was upgraded.
* Use new methods in the RLS
Only use `addNewRoom` when absolutely necessary. Most events should
instead use `reInsertRoom` which will noop when the room isn't already
known by the skiplist.
* Fix broken tests
* Add new test
* Fix playwright test
* add loading state to view model and spinner to room list vieqw
* Update snapshots and add loading test
* avoid nested ternary operator
* Add room list skeleton loading state
* Fix loading logic
- Create RoomListStoreV3Event as to not conflict with loading event definition in Create RoomListStoreEvent.
- Add a loaded event
- Use it to determine loaded state in useFilteredRooms rather than the update event which gets fired in other cases.
* Fix isLoadingRooms logic
* update snapshots and fix test
* Forcing an empty commit to fix PR
* Fix _components.pcss order
* Fix test that wasn't doing anything
* fix tests
* Remove room when new membership is leave
It doesn't really matter what the previous membership was.
* Fix test
* Remove on join/invite only
* Exclude kicked rooms from being removed
* 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
* Sort muted rooms to the bottom of the room list
* Re-insert room on mute/unmute
* Write tests
* Fix broken playwright test
Muted rooms are at the bottom, so we need to scroll.
* 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>
* Unread filter should match rooms marked as unread
* Re-insert room into skip list on account data
So that filters are re-calculated when rooms are marked as unread.
* Write test
* feat(notification state): add clearer methods, documentation and deprecation
* test(room notification state): add tests for new attributes
* doc: more explicit documentation for `hasUnreadCount`
* doc: add link to `RoomNotificationState.isMention` in `hasMentions` doc
* refactor: change `isSilent` to `hasAnyNotificationOrActivity`
* refactor: add `invited` to `determineUnreadState` and use it in `NotificationState` & `RoomNotificationState`
* test: update `RoomNotificationState` test to use `invited`
* test: update other tests to add `invited`
* refactor: remove count check in `isNotification`
* 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>
* Add `type` property to Sorter
So that we can uniquely identify any given sorting algorithm.
* Add a getter for the active sort algorithm
* Define a setting to store the sorting algorithm
* Add a method to resort the list of rooms
- Just one method where you specify the sorting algorithm by type.
- Persist the new sorting algorithm using SettingsStore.
* On startup, use preferred sorter
* Add tests
* Implement the favourite filter
* Make the room node capable of dealing with filters
- Holds data to indicate which filters apply
- Provides method to check if a given set of filters apply to this node
- Provides a method to recalculate which filters apply
* Wire up the filtering mechanism in skip list
* Use filters in the store
* Remove else
* Use a set instead of map
* Avoid destroying calls until they are hidden from the UI
We often want calls to exist even when no more participants are left in the MatrixRTC session. So, we should avoid destroying calls as long as they're being presented in the UI; this means that the user has an intent to either join the call or continue looking at an error screen, and we shouldn't interrupt that interaction.
The RoomViewStore is now what takes care of creating and destroying calls, rather than the CallView. In general it seems kinda impossible to safely create and destroy model objects from React lifecycle hooks, so moving this responsibility to a store seemed appropriate and resolves existing issues with calls in React strict mode.
* Wait for a close action before closing a call
This creates a distinction between the user hanging up and the widget being ready to close, which is useful for allowing Element Call to show error screens when disconnected from the call, for example.
* Don't expect a 'close' action in video rooms
These use the returnToLobby option and are expected to remain visible when the user leaves the call.
* Add method to await space store setup
Otherwise, the room list store will get incorrect information about
spaces and thus will produce an incorrect roomlist.
* Implement a way to filter by active space
Implement a way to filter by active space
* Fix broken jest tests
* Fix typo
* Rename `isReady` to `storeReadyPromise`
* Fix mock in test
* Update the store on action
* Add more tests
* Add newlines between case blocks
* Make code more readable
- Make if/else more consistent
- Add comment on findAndAddRoom()
* Add more tests
* Remove redundant code
On a timeline action, we return early if payload.room is falsy.
So then why do we need to retry fetching the room?
I think this can be removed but will ask others if there's some
conext I'm missing.
* Fix test
* Remove more redundant code
* Add more tests
* Explain intention in comment
* Emit only once even when adding multiple rooms
* Add missing tsdoc
* Implement enough of the new store to get a list of rooms
* Make it possible to swap sorting algorithm
* Don't attach to window object
We don't want the store to be created if the labs flag is off
* Remove the store class
Probably best to include this PR with the minimal vm implmentation
* Create a new room list store that wraps around the skip list
* Create a minimal view model
* Fix CI
* Add some basic tests for the store
* Write more tests
* Add some jsdoc comments
* Add more documentation
* Add more docs
* Implement a skip list for storing rooms
This data structure stores rooms in a given sorted order and allows for
very fast insertions and deletions.
* Export function to get last timestamp of room
* Write tests for the skip list
* Implement enough of the new store to get a list of rooms
* Make it possible to swap sorting algorithm
* Fix comment
* Don't attach to window object
We don't want the store to be created if the labs flag is off
* Remove the store class
Probably best to include this PR with the minimal vm implmentation
* feat(new room list)!: hide Favourites and People meta spaces when the new room list is enabled
* test(space store): add testcase for new labs flag
* feat(quick settings): hide pin to sidebar and more options and add extra margin
* Construct history on setCard
So that back buttons are always shown in the right panel
* Check card state to ensure operation is atomic
* Fix tests
* Fix lint
* Remove null case
* Fix broken test
* Make themed widgets reflect the effective theme
So that widgets such as Element Call will show up in the right theme even if the app is set to match the system theme.
* Remove debug log line
* Switch OIDC primarily to new `/auth_metadata` API
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Simplify the world
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>
* Add commercial licence and update config files
* Update license in headers
* Revert "Update license in headers"
This reverts commit 7ed7949485.
* Update only spdx id
* Remove LicenseRef- from package.json
LicenseRef- no longer allowed in npm v3 package.json
This fixes the warning in the logs and failing build check.
* Factor out crypto setup process into a store
To make components pure and avoid react 18 dev mode problems due
to components making requests when mounted.
* fix test
* test for the store
* Add comment