Travis Ralston
da05cac1b6
Listen for our own membership changes on notification states
...
Fixes https://github.com/vector-im/riot-web/issues/14798 (part 1)
When we transition from invite to not-invite we need to ensure we clear the invite notification state.
2020-07-30 14:33:38 -06:00
Travis Ralston
80d072171f
Merge remote-tracking branch 'origin/develop' into travis/echo/audit
2020-07-30 13:12:20 -06:00
David Baker
aaf0c7d269
Put back code
...
with comment hopefully explaining why it's necessary
2020-07-30 19:46:27 +01:00
David Baker
9d247321f5
Fix crash on logging in again after soft logout
...
Fixes https://github.com/vector-im/riot-web/issues/14834
2020-07-30 18:52:47 +01:00
Travis Ralston
968fbd5cba
Merge branch 'develop' into travis/echo/audit
2020-07-30 10:18:30 -06:00
Travis Ralston
fca6def588
Rename and document what local echo is
2020-07-30 09:15:19 -06:00
Travis Ralston
19fa08aafa
Fix RightPanelStore imports
2020-07-30 08:53:54 -06:00
Travis Ralston
9bbb7a5310
Merge branch 'develop' into travis/settings/ts
2020-07-30 08:51:42 -06:00
Jorik Schellekens
b1f8fe40d6
Merge pull request #5036 from swapnilraj/swapnilraj/right-panel-ts
...
Convert right_panel to TS
2020-07-30 13:37:01 +01:00
Bruno Windels
bb685cd37a
change message priority
2020-07-30 10:33:36 +02:00
Travis Ralston
e3765ea8c5
Appease the linters
2020-07-29 20:47:32 -06:00
Travis Ralston
c5574219bb
Implement dialog for resending local echo transactions
2020-07-29 20:36:04 -06:00
Travis Ralston
14b0def143
Fix echo handling and show a barebones toast on error
...
The EchoTransaction was wrongly assuming that it knew better than the caller for when the success condition was met, so the echo marking has been left an exercise for the caller. In this case, we mark when we finally receive the sync with the updated rules.
We also have to cancel previous transactions otherwise if the user mashes buttons we could forever show the toast, and that would be bad.
2020-07-29 19:11:24 -06:00
Travis Ralston
8f1af4be14
Add local echo capabilities for rooms
...
The structure here might need some documentation and work, but overall the idea is that all calls pass through a CachedEcho instance, which are self-updating.
2020-07-29 16:53:26 -06:00
Travis Ralston
75f53e4118
Ensure AsyncStoreWithClient can start mid-lifecycle
...
In some cases we're likely to miss the PREPARED sync, so just handle ourselves as ready if we have a client set.
2020-07-29 16:52:20 -06:00
Travis Ralston
14757cacd5
Introduce a concept of "non-urgent" toasts
...
This is somewhat expected to be temporary.
2020-07-29 12:43:35 -06:00
Bruno Windels
d8baad31da
provide nicer error for no known servers error when accepting an invite
2020-07-29 16:51:37 +02:00
Travis Ralston
1f7f40736b
Fix imports for SettingLevel to point at new file
2020-07-28 11:53:43 -06:00
Travis Ralston
900c234434
Internalize notification state handling for lists
...
This reduces the update cost of rooms changing, and fixes a bug where when a sublist became filtered it would change the notification count of the sublist.
This does change the expected usage of the state store to ensuring that only one place updates the rooms on the list states, which is currently the room list store. Ideally the state store could listen to the room list store to update itself, however due to a complicated require() loop it is not possible.
2020-07-27 17:33:27 -06:00
Travis Ralston
b91026fa89
Ensure CustomRoomTagStore doesn't fire useless updates
...
This could in theory cause double rendering of the room list under some conditions.
2020-07-27 17:18:01 -06:00
Travis Ralston
a15aae4daf
Apply a throttle to filter condition updates
2020-07-27 16:35:48 -06:00
Travis Ralston
42498d32cc
Move community filtering into the sublist
...
This is a step towards the room list not having to concern itself with the search parameters.
2020-07-27 16:35:48 -06:00
Travis Ralston
fd15fc3984
Ensure message previews update when needed
...
In 9969b01c5f
we stopped updating the sublist whenever we felt like it, which indirectly froze message previews for room tiles (badges, unread state, etc were unaffected because that is managed by a different store). To fix this, we simply have to listen for changes and perform an update.
2020-07-23 22:24:07 -06:00
Travis Ralston
c22cb6c325
Short-circuit room list store dispatch handling if not ready
...
We were taking 0.2ms to handle the registration of a timer per event during startup, even before the app is visible to the user. These timers would be short-circuited too, leading to a bunch of wasted time.
0.2ms isn't a lot of time, but multiplied by thousands of events at startup it's pretty significant.
On my account this reduces the full page spinner time from ~50 seconds to just over 20 seconds.
2020-07-22 13:35:41 -06:00
Travis Ralston
f27afc6ff8
Fix message previews not updating on their own
2020-07-22 12:43:10 -06:00
Travis Ralston
0ef6696c0a
Don't re-freeze AsyncStore's state all the time
2020-07-22 10:52:45 -06:00
Travis Ralston
d593d24aea
Switch to an internal Map for previews
...
This means we're abusing the AsyncStoreWithClient to get access to a lifecycle, but overall that seems like a minor crime compared to the time spend abusing the store's state as a map.
With thousands of rooms shown, we can save on average 743ms per preview. The new preview time is 0.12ms on average.
2020-07-22 10:50:54 -06:00
Travis Ralston
67fd6e6122
Merge pull request #5034 from matrix-org/travis/fix-perf
...
Mixed bag of performance improvements: ScrollPanel and notifications
2020-07-22 08:24:04 -06:00
Travis Ralston
61c5b4f9bf
deunderscore
2020-07-22 08:23:47 -06:00
Swapnil Raj
2c8b5b49ed
lint
2020-07-22 15:14:50 +05:30
Swapnil Raj
1d3635e1c8
Replaced string actions with their corresponding types
2020-07-22 15:14:50 +05:30
Swapnil Raj
344185a375
Translate right panel stuff to ts
...
Add actions for right panel
2020-07-22 15:14:50 +05:30
Michael Telatynski
6bb9be56cd
Merge pull request #5025 from matrix-org/t3chguy/room-list/14662
...
Update message previews
2020-07-22 10:03:30 +01:00
Travis Ralston
cd77434a69
Appease the linter
2020-07-21 20:59:33 -06:00
Travis Ralston
c9da1e1874
Remove even more tags from the notification state fetching for a room
2020-07-21 20:58:59 -06:00
Travis Ralston
dd16ec070c
Replace countRoomsWithNotif with a dedicated NotificationState
...
Fixes https://github.com/vector-im/riot-web/issues/14694
Instead of spending 10-1000ms in a function iterating over a whole lot of room events, we can use our cached state from the Notification State Store.
This commit sets up a structure that could be applied to communities in the TagPanel too, as that could probably use a similar optimization.
This reduces the updateStatusIndicator() time to just 4ms on average.
2020-07-21 20:24:44 -06:00
Travis Ralston
6a29cd33c1
Remove tag specificity from notification states
...
We don't need this complexity now that we aren't doing per-tag logic.
2020-07-21 19:59:17 -06:00
Travis Ralston
6a38833a2b
Ensure incremental updates to the ImportanceAlgorithm trigger A-Z order
...
Fixes https://github.com/vector-im/riot-web/issues/14475
Background: Sticky rooms are actually a pair of lies to the underlying algorithm as a combination of REMOVE_ROOM/NEW_ROOM calls so they don't get considered as needing to be sorted. When a room is added under the importance algorithm, it is expected that the category it is being added to will be re-sorted to account for the change, however we weren't doing that since we optimized the NewRoom path to be a splice operation.
2020-07-21 14:12:58 -06:00
Michael Telatynski
95854a2f67
Merge branches 'develop' and 't3chguy/room-list/13981' of github.com:matrix-org/matrix-react-sdk into t3chguy/room-list/13981
...
Conflicts:
src/@types/global.d.ts
2020-07-21 17:56:30 +01:00
Jorik Schellekens
a06cc77411
Remove unused imports
2020-07-21 15:34:00 +01:00
Jorik Schellekens
501e0c29ca
Merge remote-tracking branch 'origin' into joriks/eslint-config
2020-07-21 15:32:50 +01:00
Jorik Schellekens
be5db851ca
Revert unsafe rename and use boolean coercion
2020-07-21 10:29:05 +01:00
Michael Telatynski
a69560d0de
add comment
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-21 10:22:03 +01:00
Michael Telatynski
0db66313e2
Add more causes to blank out active room
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-21 10:20:30 +01:00
Michael Telatynski
9aff56afcc
add more types
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-21 10:15:05 +01:00
Michael Telatynski
8cacf1ff97
Convert RoomViewStore and ActiveRoomObserver to typescript
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-21 10:14:12 +01:00
Michael Telatynski
193a0d89af
Prefix message previews for emotes with a *
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-21 09:31:22 +01:00
Michael Telatynski
eb0e9ecab4
Remove message previews for state events
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-21 09:28:27 +01:00
Travis Ralston
a0b2859436
Support custom tags in the room list again
...
Fixes https://github.com/vector-im/riot-web/issues/14091
Design needs work, however this is behind labs anyways. This re-implements the behaviour of the old room list.
The implementation ended up being a lot easier due to early confusion with what the TagOrderStore and TagPanel take care of. Turns out they don't deal with tags, but groups. As such, we don't need to do anything with filtering (though we keep some sanity checks in place for safety), and just have to wire up the CustomRoomTagPanel and CustomRoomTagStore.
2020-07-20 16:51:16 -06:00
Jorik Schellekens
6433e163f7
Use variable name instead of _
2020-07-20 20:55:35 +01:00
Jorik Schellekens
4ba1f91a2b
Fix lint issues in new code
2020-07-20 20:43:55 +01:00
Jorik Schellekens
c3ffbdbdbc
Fix naming format errors
2020-07-20 20:02:21 +01:00
Jorik Schellekens
b3fa855bd8
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into joriks/eslint-config
2020-07-20 16:22:32 +01:00
Michael Telatynski
29defa3e57
Tag Watcher don't create new filter if not needed, confuses references
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-20 14:36:12 +01:00
Travis Ralston
2dfd636a9e
Appease the linter
2020-07-17 16:28:49 -06:00
Travis Ralston
7fc5ba50c8
Update references to issues
2020-07-17 16:22:33 -06:00
Travis Ralston
a4f7f666cf
Remove useless TagSpecificNotificationState
...
FTUE Notifications won't be needing this.
2020-07-17 16:20:19 -06:00
Travis Ralston
1cce6e2e32
Enable new room list store forever
2020-07-17 15:14:58 -06:00
Travis Ralston
2b15ba21dd
Rename RoomListStore file
2020-07-17 15:11:34 -06:00
Travis Ralston
209a5d2220
Rename RoomListStore2 class name
...
We use `RoomListStore` as a singleton, and don't want the ugly `2` at the end of the actual store instance, so here we rename it to something half-decent.
2020-07-17 15:10:30 -06:00
Travis Ralston
1f9c07861e
Remove the old room list store
2020-07-17 14:27:45 -06:00
Travis Ralston
62b58e18e9
Remove the temporary room list store proxy
2020-07-17 14:25:56 -06:00
Travis Ralston
1810711380
Dismantle usage of the proxy store class
2020-07-17 14:25:09 -06:00
Travis Ralston
06336a88b3
Remove setting for old room list
2020-07-17 14:06:30 -06:00
Travis Ralston
c29da883db
Convert room list log setting to a real setting
...
To debug https://github.com/vector-im/riot-web/issues/14554 and https://github.com/vector-im/riot-web/issues/14508
2020-07-16 14:43:43 -06:00
Michael Telatynski
725fa7df9b
Merge pull request #4997 from matrix-org/t3chguy/fix/14526
...
Fix filtering by community not showing DM rooms with community members
2020-07-16 12:41:50 +01:00
Michael Telatynski
b1d57ca13e
Merge pull request #4996 from matrix-org/t3chguy/room-list/14491
...
Fix enter in new room list filter breaking things
2020-07-16 12:41:39 +01:00
Michael Telatynski
3498922882
Fix filtering by community not showing DM rooms with community members
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-16 09:13:23 +01:00
Michael Telatynski
2f959a974a
Fix enter in new room list filter breaking things
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-16 06:31:06 +01:00
Michael Telatynski
0097ba24a4
When removing a filter condition, try recalculate in case it wasn't the last one
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-16 05:52:39 +01:00
Travis Ralston
945dab6b1f
Revert "Turn previews on for DMs and ensure they get rendered"
...
This reverts commit b19ae3ac93
.
2020-07-14 13:36:28 -06:00
Travis Ralston
f6b9d44e4b
Invert logging
2020-07-14 13:18:06 -06:00
Travis Ralston
b19ae3ac93
Turn previews on for DMs and ensure they get rendered
2020-07-14 12:49:29 -06:00
Travis Ralston
d74e803fa9
Remove potential source of room duplication issues
...
This is an estimated fix as the problem cannot be easily identified. We don't appear to need these lines, unlike what the comment implies.
2020-07-14 12:40:48 -06:00
Travis Ralston
e955feb12d
Revert "Merge pull request #4972 from matrix-org/travis/room-list/prelaunch/3-remove-debug"
...
This reverts commit e1b34acdc8
.
2020-07-14 12:02:40 -06:00
Travis Ralston
e1b34acdc8
Merge pull request #4972 from matrix-org/travis/room-list/prelaunch/3-remove-debug
...
Remove debug logging from new room list
2020-07-14 09:56:17 -06:00
J. Ryan Stinnett
f16962bb41
Merge pull request #4970 from matrix-org/travis/room-list/prelaunch/1-cleanup
...
Clean up TODOs, comments, and imports in the new room list
2020-07-14 09:38:30 +01:00
Travis Ralston
6632db01cf
Remove debug logging from new room list
...
Fixes https://github.com/vector-im/riot-web/issues/14408
Yes, all the issue references are wrong :(
2020-07-13 20:34:05 -06:00
Travis Ralston
4a8a59c578
Make EffectiveMembership utils generic
...
Fixes https://github.com/vector-im/riot-web/issues/14460
Just have to move them to utils.
2020-07-13 20:29:46 -06:00
Travis Ralston
bdb136e24e
Clean up TODOs, comments, and imports in the new room list
...
Fixes https://github.com/vector-im/riot-web/issues/14412
2020-07-13 20:25:02 -06:00
Travis Ralston
80cf2839d9
Ensure breadcrumbs don't keep turning themselves back on
...
Fixes https://github.com/vector-im/riot-web/issues/14452
2020-07-13 18:46:17 -06:00
Travis Ralston
19500cf96a
Allow the tests to force a MatrixClient
2020-07-13 13:24:02 -06:00
Travis Ralston
eb78b1b328
Export the matrix client from the store
2020-07-13 13:18:01 -06:00
Travis Ralston
a8829f09d0
Ensure RoomListStore2 gets reset when the client becomes invalidated
...
Fixes https://github.com/vector-im/riot-web/issues/14384
We also make use of the new AsyncStore type to handle this more safely.
2020-07-13 13:15:44 -06:00
Travis Ralston
1f57b85b30
Merge pull request #4962 from matrix-org/travis/room-list/leave-fix
...
Ensure tag changes (leaving rooms) causes rooms to move between lists
2020-07-13 12:44:23 -06:00
Travis Ralston
d2c7a55fa0
Ensure tag changes (leaving rooms) causes rooms to move between lists
...
Fixes https://github.com/vector-im/riot-web/issues/14442
Turns out that we are so good at moving a room that when it flows through as a TIMELINE update the algorithm no-ops and does nothing, so don't do that.
2020-07-13 12:00:56 -06:00
Travis Ralston
40ab3e23c6
Add a null guard on the client
2020-07-13 10:09:46 -06:00
Travis Ralston
9a3744ebb2
Fix default sorting mechanics for new room list
...
Fixes https://github.com/vector-im/riot-web/issues/14445
2020-07-13 09:54:15 -06:00
Travis Ralston
0908e813fb
Merge branch 'develop' into travis/room-list/enable
2020-07-12 22:50:27 -06:00
Travis Ralston
1c52c2777e
Merge pull request #4949 from matrix-org/travis/room-list/mute-floats
...
Convert ImportanceAlgorithm over to using NotificationColor instead
2020-07-12 11:00:18 -06:00
Travis Ralston
31f1fbd962
Merge pull request #4951 from matrix-org/travis/room-list/fix-sublist-menu
...
Internalize algorithm updates in the new room list store
2020-07-11 12:15:53 -06:00
Travis Ralston
b924dcc6ad
Merge pull request #4950 from matrix-org/travis/room-list/cleanup-resizing
...
Remove now-dead code from sublist resizing
2020-07-11 12:11:51 -06:00
Travis Ralston
0e49c4343c
Internalize algorithm updates in the new room list store
...
Fixes https://github.com/vector-im/riot-web/issues/14411
The act of setting/changing the algorithm was causing the update function to be marked, meaning we wouldn't trigger an update until something else happened later. To get around this, and still support internal functions spamming calls without multiple updates, we simply move the guts to an internalized function and make the public interface do a trigger.
2020-07-10 21:59:12 -06:00
Travis Ralston
c153232575
Merge branch 'develop' into travis/room-list/enable
2020-07-10 21:33:35 -06:00
Travis Ralston
cfc39dc4a9
Remove now-dead code from sublist resizing
2020-07-10 16:10:05 -06:00
Travis Ralston
3062d14a78
Convert ImportanceAlgorithm over to using NotificationColor instead
...
Fixes https://github.com/vector-im/riot-web/issues/14362 implicitly
By re-using constructs we already have, we don't need to invent code which figures it out.
2020-07-10 16:07:40 -06:00
Travis Ralston
87120c6c26
Ensure triggered updates get fired for filters in the new room list
...
Fixes https://github.com/vector-im/riot-web/issues/14404
2020-07-10 15:58:39 -06:00
Travis Ralston
bb6d46f926
When the algorithm changes, re-add the filter listener
2020-07-10 15:57:05 -06:00
Travis Ralston
bdb641279a
Merge branch 'develop' into travis/room-list/enable
2020-07-10 11:11:25 -06:00
Travis Ralston
9e76a2cebf
Handle off-cycle filtering updates in the new room list
2020-07-10 11:07:47 -06:00