This adds very basic cache (literally just a `Map` for now) to store room alias
to room ID mappings. The improves the perceived performance of Riot when
switching rooms via browser navigation (back / forward), as we no longer try to
resolve the room alias every time.
The cache is only in memory, so reloading manually or as part of the clear cache
process will start afresh.
Fixes https://github.com/vector-im/riot-web/issues/10020
Fixes https://github.com/vector-im/riot-web/issues/10235
CSS and copy are left as an exercise for a later iteration.
Login page handling is left for https://github.com/vector-im/riot-web/issues/10236
This implementation reuses as much of the Lifecycle flow as it can without causing problems. Most importantly, it requires https://github.com/matrix-org/matrix-js-sdk/pull/975 to be able to detect a soft logout and react to it. When it comes time to starting/stopping the Lifecycle, additional parameters are provided so that the auxiliary services can (re)start themselves without the client starting to sync.
Stop the settings dialogs from requiring special styles on the
mx_Dialog which required passing in a classname from anywhere the
settings dialogs were opened (although this still requires
static=true). Some of the things have now been adopted for all dialogs
(border-radius), others have been moved to within the dialog content.
This takes out the old user and room settings, replacing the paths with the new dialog editions. The labs setting has been removed in order to support this change.
In addition to removing the old components outright, some older components which were only used by the settings pages have been removed. The exception is the ColorSettings component as it has a high chance of sticking around in the future.
Styles that were shared by the settings components have been broken out to dedicated sections, making it easier to remove the old styles entirely.
Some stability testing of the app has been performed to ensure the app still works, however given the scope of this change there is a possibility of some broken functionality.
This is intentionally not removing the labs flag or other supporting structures of the old settings to make a revert as easy as possible in the event that needs to happen. All of the cruft left behind (TempTab, temp styles, labs flag, old components, etc) will be removed in the very near future.
the idea is that it will keep a RoomViewStore for every
room on the screen, and also keep track of which one is
the current one.
For now, it just replicates the existing functionality of
having just 1 room on the screen.
Since the RoomViewStore just has access to a local dispatcher
and not the global anymore, all dispatching of actions
needs to be moved to the OpenRoomsStore, so room alias resolving,
event forwarding, ... is moved there.
* Show a spinner while we wait for widgets to be deleted
* Hide widgets while they're pending deletion
* Don't put another jitsi widget into the room if there's already
one pending
- implement generic dispatch to close user/room/group settings
- use dispatch to allow clicks on disabled left/right/middle panel to
close settings
A much more maintainable approach would be to use dedicate routing
instead of doing different things depending on what page of the app is
currently being viewed. At the very least we could make the concept of a
settings page generic.
After accepting a 3pid invite.
Rather than clear the joining flag when the join request completes,
leave it so the RoomView can see that we're expecting the user to
be joined in the various stages that might go through (waiting for
join request, waiting for room object, waiting for 'joined' member
event). The problem in this case was that we had to wait a bit for
the last one, and there was no bit of state to represent it.
This hopefully also makes the logic somewhat simpler.
Fixes https://github.com/vector-im/riot-web/issues/5041
After creating a room, display the activity spinner while we wait
for the room to come down the event stream.
This was the intention before but I can't see how it would have
worked: we were setting the 'joining' flag, but then resetting it
by claiming we were already joined in the view_room dispatch.
* Send 'joining' instead of 'joined' in view_room dispatch, which
will set the corresponding joining flag (ie. to indicate we've
sent a request to join the room). Remove the 'joined' flag.
* Reset 'joining' to false otherwise on a view_room dispatch to
prevent it from leaking between rooms (this may have been the
intention of the `if (payload.joined) newState.joining = false`?
Fixes https://github.com/vector-im/riot-web/issues/4701
When clicking on rooms from the room directory. When RoomViewStore
resolved the room alias, it threw away the out-of-band data in the
process. This must have been broken as part of the ILAG /
RoomViewStore stuff.
to keep the place we're scrolled to in rooms. This mainly eleimates
the extra, superfluous onRoomViewStoreUpdate callback that
happened when the previous room saved back its scroll state.
Moving the scroll state to a separate store means we can have this
not emit events because nothing needs to know when the scroll state
changes.
I thought about adding separate dispatches to prevent confusion but if anyone adds anything that listens to existing dispatches, they really ought to be grep-ing the world for said dispatch actions.