* Switch to importing TypedEventEmitter from main js-sdk export
* Switch to importing js-sdk/matrix in cypress
* Remove duplicated imports
* Fix lint:js-fix to run prettier last otherwise ESLint --fix may cause a mess
* Add lint rule
* Switch to importing models/Room from main js-sdk export
* Switch to importing models/room-state & models/room-member from main js-sdk export
* Fix cypress-axe import
* Fix more imports
* Fix cypress-axe import
* Fix bad merge
* Switch to importing TypedEventEmitter from main js-sdk export
* Switch to importing js-sdk/matrix in cypress
* Remove duplicated imports
* Fix lint:js-fix to run prettier last otherwise ESLint --fix may cause a mess
* Add lint rule
* Switch to importing models/Room from main js-sdk export
* Fix cypress-axe import
* Fix more imports
* Fix cypress-axe import
* Fix duplicated lint rule
* Switch to importing TypedEventEmitter from main js-sdk export
* Switch to importing js-sdk/matrix in cypress
* Remove duplicated imports
* Fix lint:js-fix to run prettier last otherwise ESLint --fix may cause a mess
* Add lint rule
* Fix cypress-axe import
* Fix cypress-axe import
* utils to persist clientId and issuer after oidc authentication
* add dep oidc-client-ts
* persist issuer and clientId after successful oidc auth
* add OidcClientStore
* comments and tidy
* format
* autoapprove Element Call oidc requests
Signed-off-by: Timo K <toger5@hotmail.de>
* update comment
Signed-off-by: Timo K <toger5@hotmail.de>
* add tests for oidc element-call
Signed-off-by: Timo K <toger5@hotmail.de>
* fix ES lint
Signed-off-by: Timo K <toger5@hotmail.de>
---------
Signed-off-by: Timo K <toger5@hotmail.de>
* Pass device id to widget
Implement the [comment in MSC 3819](https://github.com/matrix-org/matrix-spec-proposals/pull/3819#discussion_r1099833846) which requests passing a device id to a widget.
This is based on the previous work in the matrix-widget-api: https://github.com/matrix-org/matrix-widget-api/pull/78
Signed-off-by: Oliver Sand <oliver.sand@nordeck.net>
* Include all data that is shared in the permissions screen
* Update matrix-widget-api to version 1.4.0
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
* Fix type and test
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
---------
Signed-off-by: Oliver Sand <oliver.sand@nordeck.net>
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
Co-authored-by: Dominik Henneke <dominik.henneke@nordeck.net>
* muted-to-the-bottom POC
* split muted rooms in natural algorithm
* add previous event to account data dispatch
* add muted to notification state
* sort muted rooms to the bottom
* only split muted rooms when sorting is RECENT
* remove debugs
* use RoomNotifState better
* add default notifications test util
* test getChangedOverrideRoomPushRules
* remove file
* test roomudpate in roomliststore
* unit test ImportanceAlgorithm
* strict fixes
* test recent x importance with muted rooms
* unit test NaturalAlgorithm
* test naturalalgorithm with muted rooms
* strict fixes
* comments
* add push rules test utility
* strict fixes
* more strict
* tidy comment
* document previousevent on account data dispatch event
* simplify (?) room mute rule utilities, comments
* remove debug
* Add an action to search for users in the user directory according to MSC3973
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
* Fix linter errors
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
* Update the matrix-widget-api package to version 1.3.0
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
* Improve the test
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
---------
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
* Support dynamic room predecessors in WidgetLayoutStore
* Improve TS correctness in WidgetLayoutStore
* Test to cover onNotReady to quieten SonarCloud
---------
Co-authored-by: Janne Mareike Koschinski <janne@kuschku.de>
* Tests for BreadcrumbsStore.meetsRoomRequirements
* Tests for appending rooms to BreadcrumbsStore
* Support dynamic room predecessors in BreadcrumbsStore
* Tests for RoomNotificationStateStore emitting events
* Support dynamic room predecessors in RoomNotificationStateStore
* Remove unused arguments from emit call.
UPDATE_STATUS_INDICATOR is used in:
* SpacePanel
* MatrixChat
* RoomHeaderButtons
but these arguments are not used in any of those places. Remove them so
when I refactor I don't have to make up values for them.
* Fix broken test (wrong expected args to emit)
UPDATE_STATUS_INDICATOR is used in:
* SpacePanel
* MatrixChat
* RoomHeaderButtons
but these arguments are not used in any of those places. Remove them so
when I refactor I don't have to make up values for them.
* Update the RoomNotificationStore whenever the predecessor labs flag changes
* Fix type errors
* Fix other tests that trigger our new watcher
* Provide a more detailed error message than "No known servers"
Signed-off-by: Aaron Raimist <aaron@raim.ist>
* Fix PR since file was refactored
Signed-off-by: Aaron Raimist <aaron@raim.ist>
* Fix formatting
Signed-off-by: Aaron Raimist <aaron@raim.ist>
* lint
Signed-off-by: Aaron Raimist <aaron@raim.ist>
* Update src/stores/RoomViewStore.tsx
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Add example identifiers and a more detailed explanation
Signed-off-by: Aaron Raimist <aaron@raim.ist>
* Lint
Signed-off-by: Aaron Raimist <aaron@raim.ist>
* Lint
Signed-off-by: Aaron Raimist <aaron@raim.ist>
* Revert back to original wording (except s/alias/address)
Alias was a better name imo but Element calls them addresses now so changed to be consistent.
Signed-off-by: Aaron Raimist <aaron@raim.ist>
* Prettier
Signed-off-by: Aaron Raimist <aaron@raim.ist>
* Fix ts error
* Add snapshot test
* Check the Modal props
* Add test case to reach quality gate
---------
Signed-off-by: Aaron Raimist <aaron@raim.ist>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Florian Duros <florianduros@element.io>
* Add tests for unread notification facilities
Add some tests to guarantee some consistency in `useUnreadNotifications` and
`RoomNotificationState`.
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
* Add RoomNotifs#determineUnreadState
Intended as a singular replacement for the divergent implementations before.
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
* Unify room unread state determination
Have both the class-based facility and the hook use the new unified logic in
`RoomNotifs#determineUnreadState`.
Addresses https://github.com/vector-im/element-web/issues/24229
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
---------
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* sliding sync: add lazy-loading member support
Also swap to `$ME` constants when referring to our own member event.
* Hook into existing LL logic when showing the MemberList
* Linting
* Use consts in js sdk not react sdk
* Add jest tests
* linting
* Store the room in the test
* Fix up getRoom impl
* Add MemberListStore
* Use the right context in MemberList tests
* Fix RightPanel-test
* Always return members even if we lazy load
* Add MemberListStore tests
* Additional tests
* Add support for include_old_rooms and by_notification_level
* Include subspaces when apply spaces filter
* Remove stray is_tombstoned
* tests: add SlidingRoomListStore jest tests; update proxy version in cypress
* Add additional tests
* Additional tests
* Linting
* Update test/stores/room-list/SlidingRoomListStore-test.ts
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Add Stores and StoresContext and use it in MatrixChat and RoomView
Added a new kind of class:
- Add God object `Stores` which will hold refs to all known stores and the `MatrixClient`. This object is NOT a singleton.
- Add `StoresContext` to hold onto a ref of `Stores` for use inside components.
`StoresContext` is created via:
- Create `Stores` in `MatrixChat`, assigning the `MatrixClient` when we have one set. Currently sets the RVS to `RoomViewStore.instance`.
- Wrap `MatrixChat`s `render()` function in a `StoresContext.Provider` so it can be used anywhere.
`StoresContext` is currently only used in `RoomView` via the following changes:
- Remove the HOC, which redundantly set `mxClient` as a prop. We don't need this as `RoomView` was using the client from `this.context`.
- Change the type of context accepted from `MatrixClientContext` to `StoresContext`.
- Modify alllll the places where `this.context` is used to interact with the client and suffix `.client`.
- Modify places where we use `RoomViewStore.instance` and replace them with `this.context.roomViewStore`.
This makes `RoomView` use a non-global instance of RVS.
* Linting
* SDKContext and make client an optional constructor arg
* Move SDKContext to /src/contexts
* Inject all RVS deps
* Linting
* Remove reset calls; deep copy the INITIAL_STATE to avoid test pollution
* DI singletons used in RoomView; DI them in RoomView-test too
* Initial RoomViewStore.instance after all files are imported to avoid cyclical deps
* Lazily init stores to allow for circular dependencies
Rather than stores accepting a list of other stores in their constructors,
which doesn't work when A needs B and B needs A, make new-style stores simply
accept Stores. When a store needs another store, they access it via `Stores`
which then lazily constructs that store if it needs it. This breaks the
circular dependency at constructor time, without needing to introduce
wiring diagrams or any complex DI framework.
* Delete RoomViewStore.instance
Replaced with Stores.instance.roomViewStore
* Linting
* Move OverridableStores to test/TestStores
* Rejig how eager stores get made; don't automatically do it else tests break
* Linting
* Linting and review comments
* Fix new code to use Stores.instance
* s/Stores/SdkContextClass/g
* Update docs
* Remove unused imports
* Update src/stores/RoomViewStore.tsx
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove empty c'tor to make sonar happy
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Update our cancel icon
The cancel icon we're using in the app has drifted out of sync with the ones used in our designs. We also had two identical-looking icons, so this consolidates them into one.
I've simultaneously updated our chevron icons, since in the case of the 'jump to unread' timeline button, it became clear that the weight of the new close icon did not match the thinner chevron.
* Don't squish bottom/top-aligned tooltips near the edge of the screen
* Close the timeline panel when returning to the fullscreen timeline view
* Add layout switching capabilities to ElementCall
* Bring the room header in line with the group call designs
* Bring the PiP header in line with the group call designs
* Fix lints
* Clarify tooltip CSS calculations
* Test PipView
* Expand RoomHeader test coverage
* Test PipView more