Commit Graph

67 Commits (5f51ba15920ee15533b497b84d643e19a36892fa)

Author SHA1 Message Date
Michael Telatynski 08c47ac473
Fix changing space sometimes bouncing to the wrong space (#7910) 2022-03-01 08:33:29 +00:00
Kerry 130bd6aa63
manage voicerecording state when deleting or sending a voice message (#7896)
* manage voicerecording state when deleting or sending a voice message

Signed-off-by: Kerry Archibald <kerrya@element.io>

* comment

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-02-24 18:54:06 +01:00
Kerry 5e76d988ca
convert test-utils to typescript (#7877)
* move js utils into directory

Signed-off-by: Kerry Archibald <kerrya@element.io>

* typescripterize js test-utils

Signed-off-by: Kerry Archibald <kerrya@element.io>

* move test utils to directory

Signed-off-by: Kerry Archibald <kerrya@element.io>

* move remaining mock functions to directory

Signed-off-by: Kerry Archibald <kerrya@element.io>

* update imports

Signed-off-by: Kerry Archibald <kerrya@element.io>

* missed copyright

Signed-off-by: Kerry Archibald <kerrya@element.io>

* type wait for update

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-02-23 11:21:11 +00:00
Kerry 5b8d440406
type Actions (#7862)
* type ViewHomPage action

Signed-off-by: Kerry Archibald <kerrya@element.io>

* type spacestore actions

Signed-off-by: Kerry Archibald <kerrya@element.io>

* lint

Signed-off-by: Kerry Archibald <kerrya@element.io>

* add action types

Signed-off-by: Kerry Archibald <kerrya@element.io>

* use new action types in stores

Signed-off-by: Kerry Archibald <kerrya@element.io>

* remove debug change

Signed-off-by: Kerry Archibald <kerrya@element.io>

* stricter keyboard shortcut types

Signed-off-by: Kerry Archibald <kerrya@element.io>

* action comments

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-02-22 10:04:27 +00:00
Kerry 08a0c6f86c
Don't aggregate rooms and users in SpaceStore (#7723)
* add direct child maps

* track rooms, users and space children in flat hierarchy in spacestore

Signed-off-by: Kerry Archibald <kerrya@element.io>

* update spacefiltercondition to use new spacestore

* remove unused code

Signed-off-by: Kerry Archibald <kerrya@element.io>

* typos

Signed-off-by: Kerry Archibald <kerrya@element.io>

* only build flattened rooms set once per space when updating notifs

* copyright

Signed-off-by: Kerry Archibald <kerrya@element.io>

* remove unnecessary currying

Signed-off-by: Kerry Archibald <kerrya@element.io>

* rename SpaceStore spaceFilteredRooms => roomsIdsBySpace, spaceFilteredUsers => userIdsBySpace

Signed-off-by: Kerry Archibald <kerrya@element.io>

* cache aggregates rooms and users by space

Signed-off-by: Kerry Archibald <kerrya@element.io>

* emit events recursively up parent spaces on changes

Signed-off-by: Kerry Archibald <kerrya@element.io>

* exclude meta spaces from aggregate cache

Signed-off-by: Kerry Archibald <kerrya@element.io>

* stray log

* fix emit on member update

Signed-off-by: Kerry Archibald <kerrya@element.io>

* call order

Signed-off-by: Kerry Archibald <kerrya@element.io>

* extend existing getKnownParents fn

Signed-off-by: Kerry Archibald <kerrya@element.io>

* refine types and comments

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-02-17 21:24:05 +01:00
Michael Telatynski 658590e5bc
More posthog tracking around joining rooms and room search (#7807) 2022-02-17 18:03:27 +00:00
David Baker 3be74d38d6
Fix src/lib import (#7825) 2022-02-17 10:06:19 +00:00
David Baker 01b00bf3fe
Add test for RoomNotificationState (#7820)
Regression test for https://github.com/vector-im/element-web/issues/20859
2022-02-17 09:18:37 +00:00
J. Ryan Stinnett 0dc1355441
Fix right panel data flow (#7811) 2022-02-16 11:19:28 +00:00
Michael Telatynski cfa6e266cd
Wire up new fields on the ViewRoom posthog event and more interactions (#7787) 2022-02-14 19:31:13 +00:00
Kerry f7a3027e50
runAllTimers -> runOnlyPendingTimers in SpaceStore-test (#7634)
* runAllTimers -> runOnlyPendingTimers in SpaceStore-test

Signed-off-by: Kerry Archibald <kerrya@element.io>

* runAllTimers for switch to first valid space when selected metaspace is disabled

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-01-26 11:38:07 +01:00
Michael Telatynski 8ddd677c35
De-labs Metaspaces (#7613) 2022-01-25 12:33:17 +00:00
Travis Ralston 65987e6b72
Move all polls processing to events-sdk & prep for stable polls (#7517)
* Move all polls processing to events-sdk

This makes polls support the full range of extensible events (both parsing and generation).

* Appease the linter

* Fix & update tests

* Update events-sdk for polls bugfix

* Update events-sdk for typechecking

* Add missing type cast

* Update per review
2022-01-17 10:06:30 -07:00
Michael Telatynski ec6c1b8272
Fix RoomViewStore forgetting some details of a view room call (#7512) 2022-01-12 13:12:28 -07:00
J. Ryan Stinnett 6199c337ea
Fix spacing errors (#7484) 2022-01-10 12:57:20 +00:00
Michael Telatynski 39c4b78371
Space preferences for whether or not you see DMs in a Space (#7250) 2021-12-17 09:26:32 +00:00
Andy Balaam 43839adec0
Use constants from js-sdk in polls code (#7381) 2021-12-15 14:26:26 +00:00
Andy Balaam fc96af5014
Show poll question in message preview (#7320) 2021-12-10 12:17:26 +00:00
Aaron Raimist 2e8a93834b Auto fix
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-12-09 09:10:23 +00:00
Michael Telatynski 3b9e39ffca
When accepting DM from People metaspace don't switch to Home (#7272) 2021-12-03 11:17:51 +00:00
Renan Cleyson ae0dba4e87
Add `view_room` to `Action` enum (#7203)
* Add ViewRoom action to Action enum

Signed-off-by: Renan <renancleyson.f@gmail.com>

* Change view_room occurrences to Action.ViewRoom

Signed-off-by: Renan <renancleyson.f@gmail.com>

* Add missing Action import
2021-11-25 21:49:43 +01:00
Timo 556cfc7ed8
Add maximise widget functionality (#7098)
Co-authored-by: J. Ryan Stinnett <jryans@gmail.com>
2021-11-16 15:43:18 +01:00
Michael Telatynski 5ad3261cb2
Implement more meta-spaces (#7077) 2021-11-11 13:07:41 +00:00
Michael Telatynski be0fa6da7b
Fix removing a room from a Space and interaction with `m.space.parent` (#6944) 2021-10-25 14:06:00 +01:00
Michael Telatynski 82ad85a974 Mock usage of getRoomUpgradeHistory in SpaceStore tests 2021-10-08 10:30:46 +01:00
Michael Telatynski 911ca07da4 Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/fix/18088 2021-09-08 15:28:58 +01:00
Michael Telatynski c915288044 Respect m.space.parent relations if they hold valid permissions 2021-09-06 14:34:06 +01:00
Michael Telatynski a688e5b8b3 Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/fix/18088
 Conflicts:
	src/components/structures/LoggedInView.tsx
	src/stores/SpaceStore.tsx
2021-09-06 11:41:09 +01:00
Michael Telatynski bbd420096b don't bother awaiting SpaceStore::setActiveSpace as it is no longer async 2021-08-31 17:03:43 +01:00
Michael Telatynski da110855f0 delint and remove groups-specific tests and setups 2021-08-11 15:36:35 +01:00
Michael Telatynski 3c436c9617 update setting naming to match style 2021-07-30 12:20:02 +01:00
Michael Telatynski 776435f620 Switch all-rooms toggle for spaces to non-feature settings key 2021-07-27 21:17:24 +01:00
Michael Telatynski 0a9d3302ba Fix home vs all rooms requiring app reload and change default to `home`
Consolidate ALL_ROOMS and HOME_SPACE storage
Fix behaviour when recalled room is no longer part of the target space
Improve tests
2021-07-27 21:11:47 +01:00
Michael Telatynski ec173e74e6 Test & Refactor SpaceWatcher to allow all rooms/home change without needing reload 2021-07-27 20:15:40 +01:00
Michael Telatynski 755007cbee Conclude labs flags and write more tests 2021-07-27 14:39:14 +01:00
Michael Telatynski de42a00ca4 Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/fix/17686
 Conflicts:
	src/components/views/avatars/RoomAvatar.tsx
	test/stores/SpaceStore-test.ts
	test/test-utils.js
2021-07-19 16:47:31 +01:00
Michael Telatynski 316b21408d Fix tests 2021-07-15 10:59:52 +01:00
Michael Telatynski 04c923bd75 fix tests by including client field on the Room stub and stubbing getJoinedMemberCount 2021-07-06 11:35:56 +01:00
J. Ryan Stinnett ae0a8b8da4 Auto-fix lint errors 2021-06-29 13:11:58 +01:00
Michael Telatynski 9e20e5dfc4 mock new settings in tests 2021-06-16 09:14:07 +01:00
David Baker 31604c13c0 Lint the typescript tests
Turns out we hadn't told eslint to lint .ts in tests/

Also fix all the lint errors, including removing a use of assert that
had randomly crept in.
2021-06-04 16:52:50 +01:00
Michael Telatynski 90fa738734 Fix that one final pesky test 2021-05-07 11:22:10 +01:00
Michael Telatynski f0e61e6286 short circuit automatic switch to related space behaviour and fix tests 2021-05-07 11:08:18 +01:00
Michael Telatynski 9d9dce7a91 update orphan room behaviour test to expect new home space behaviour 2021-05-07 10:48:55 +01:00
Michael Telatynski 203425c8de Test and fix space store wrongly treating room invites as space invites 2021-04-26 08:37:45 +01:00
Michael Telatynski 47c12a7d23 Add tests for rooms moving around the SpaceStore 2021-04-25 09:24:00 +01:00
Michael Telatynski 98851f8e64 Text space switching behaviour and fix invalid space edge case 2021-04-24 11:32:55 +01:00
Michael Telatynski f85d3643ee Test and fix subspace invite receipt behaviour 2021-04-24 11:31:52 +01:00
Michael Telatynski dd2a1d063a Write tests for spaces context switching behavious 2021-04-23 16:14:55 +01:00
Michael Telatynski 4446022327 Add automatic space switching tests 2021-04-23 14:45:22 +01:00