Commit graph

289 commits

Author SHA1 Message Date
Travis Ralston
b741b76797 Handle joins/leaves safely 2019-02-13 14:08:19 -07:00
Travis Ralston
b6c1b50fd9 Early support for improved room algorithm
This changes the approach from regenerating every time there's a change to incrementally fixing the room lists. Additionally, this forces the pin options on for people and implements the sticky room behaviour.

Known bugs include newly joined rooms, invites, etc not sorting correctly.
2019-02-13 13:01:03 -07:00
Bruno Windels
e8533beafb guard custom tags with feature flag 2019-02-07 18:07:30 +00:00
Bruno Windels
c0b9d99385 only import throttle fn 2019-02-07 16:03:12 +00:00
Bruno Windels
35d9c02ecd throttle custom tags updating in LLP 2019-02-07 15:28:22 +00:00
Bruno Windels
d2ac434545 no need to update tags when app is booting, wait till sync 2019-02-07 14:41:39 +00:00
Bruno Windels
64bb6d2b1f dont remove tags prop from state on logout as we assume its always there 2019-02-07 14:41:19 +00:00
Bruno Windels
8eb1f15ed4 do more explicit check 2019-02-07 12:18:52 +00:00
Bruno Windels
62cdf40a39 dont assume a user has joined all the rooms in a community 2019-02-07 12:11:16 +00:00
Bruno Windels
87ddb8a453
Merge pull request #2575 from matrix-org/bwindels/customtags
Bring back custom tags, also badges on communities
2019-02-07 11:37:17 +00:00
Bruno Windels
52aab2be98 preserve outer this with arrow function 2019-02-07 11:12:34 +00:00
Bruno Windels
7b23fa7a4f implement PR feedback 2019-02-07 10:49:23 +00:00
Bruno Windels
a222ee33df calculate badges for communities in TagOrderStore 2019-02-06 14:29:40 +00:00
Bruno Windels
77db3ca883 calculate badge count for tags as well 2019-02-06 11:02:12 +00:00
Bruno Windels
137ff984c7 rather unsophisticated attempt at trimming common prefixes for avatar 2019-02-05 19:12:34 +00:00
Bruno Windels
579309c2e3 store for custom tags to share state between tag panel & room list 2019-02-05 17:37:25 +00:00
Bruno Windels
3265fe394d don't filter out custom tags anymore 2019-02-05 17:35:05 +00:00
Travis Ralston
eac50aa800 Remove old user and room settings
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.
2019-02-04 13:40:21 -07:00
Travis Ralston
728748c9cd Disable old settings, making tabbed settings the default
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.
2019-02-01 10:29:13 -07:00
Travis Ralston
243feb9b13 Early tab structure and profile changes (name/avatar/topic) 2019-01-28 13:54:56 -07:00
Travis Ralston
535d42684f Initial structure for new room settings 2019-01-25 13:09:44 -07:00
J. Ryan Stinnett
29be3ee4b5 Rename login directory to auth 2019-01-21 17:45:55 -06:00
Bruno Windels
8c30d05eb8 Revert "Merge pull request #2348 from matrix-org/bwindels/roomgridview-experimental"
This reverts commit ece5cb1fcc, reversing
changes made to 64a3d2521c.
2019-01-17 10:29:37 +01:00
Bruno Windels
ece5cb1fcc
Merge pull request #2348 from matrix-org/bwindels/roomgridview-experimental
Tiled room UI
2019-01-09 17:25:08 +00:00
Bruno Windels
254427461d fix PR feedback 2019-01-09 12:48:13 +01:00
Travis Ralston
66cd8475b5 Don't reset cached room list values when they are falsey
`unread` and `unread-muted` store booleans in the cache, and can easily be `false`. Without this patch, both of those cached types would be cleared from the object where a later call to `getRoomState` would try and re-populate them. `getRoomState` is supposed to use the cache where possible to avoid making the more expensive calls required to calculate those booleans.

On my account in a test environment, this brings the `generateRoomLists` execution time down from ~250ms to just ~30ms. 

This still does not solve the whole issue, but should solve the more common case of performance woes for people.
2019-01-07 17:46:32 -07:00
Bruno Windels
aedc220b62 fix (some) lint warnings 2019-01-07 16:33:23 +01:00
Bruno Windels
290dc9d8fb Merge branch 'experimental' into bwindels/roomgridview-experimental 2019-01-07 14:17:57 +01:00
Travis Ralston
8017f0a4a1 Merge remote-tracking branch 'origin/experimental' into travis/develop-for-real 2019-01-03 16:00:23 -07:00
David Baker
f928be6f59 Revert "Merge pull request #2395 from matrix-org/dbkr/merge_develop_experimental"
This reverts commit ad47144355.
2019-01-03 15:37:03 -07:00
David Baker
7d161de35b Partial merge of develop to experimental
Does not include #2336 as the file has been moved out from underneath it:
will do this separately
2019-01-03 15:02:58 +00:00
Bruno Windels
532fb6ea78 update comment as well 2018-12-17 13:58:36 +01:00
Bruno Windels
4fffb55cc5 ignore any unknown tags 2018-12-17 13:52:32 +01:00
Bruno Windels
7b6c863377 fix lint 2018-12-14 15:53:52 +01:00
Bruno Windels
04bb13bb7b emit join error over own dispatcher, meh 2018-12-13 13:02:35 +01:00
Bruno Windels
368ef9e8e8 hack so we don't revert to single room view when viewing grid 2018-12-13 13:02:35 +01:00
Bruno Windels
9a24249fb5 emit focus_composer after updating the active room in GroupGridView
also change the active room from there so RoomView is oblivious
to grid view stuff
2018-12-13 13:01:59 +01:00
Bruno Windels
fbfbefe4fe also forward actions from room dispatcher to global one
avoiding replay if the action would be forwarded back to
the same room dispatcher

also some fixing & renaming in OpenRoomsStore
2018-12-13 13:01:59 +01:00
Bruno Windels
cf0f75cad4 allow changing active room in grid by clicking it 2018-12-13 13:01:59 +01:00
Bruno Windels
6ec6303b97 support opening all rooms of a group in OpenRoomsStore
using new view_group_grid action
2018-12-13 13:01:59 +01:00
Bruno Windels
d7924ad1a8 less ambigious name for local dispatcher 2018-12-13 13:01:59 +01:00
Bruno Windels
f95b26179f make copy of initial state, as there can be multiple instances now 2018-12-13 13:01:59 +01:00
Bruno Windels
869c81eb90 cram OpenRoomsStore between RoomViewStore and dispatcher
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.
2018-12-13 12:59:18 +01:00
David Baker
d7319d7e4f
Merge pull request #2330 from matrix-org/travis/fix-pinned-rooms
Fix pinning of rooms without badges
2018-12-07 17:44:36 +00:00
Travis Ralston
216fc6412a Fix pinning of rooms without badges
Fixes https://github.com/vector-im/riot-web/issues/7723

This adds consideration for rooms that are "mentions only" (or "unread-muted" as internally referenced).
2018-12-05 13:52:27 -07:00
Travis Ralston
c46bae59b2
Merge branch 'develop' into travis/cors-on-join 2018-12-05 11:30:19 -07:00
Travis Ralston
7e817f4aa9
Add a helpful comment 2018-12-05 11:29:53 -07:00
J. Ryan Stinnett
5fc25fd6ba Only mark group as failed to load for summary
Currently, any error in the `GroupStore`s several requests can cause the whole
`GroupView` component to hide and be mark the group as failed to load.

Since it is known that group members may fail to load in some cases, let's only
show failed to load for the whole group when the summary fails.

This also strengthens the `GroupView` test by ensuring we wait for multiple
updates for checking results.

Signed-off-by: J. Ryan Stinnett <jryans@gmail.com>
2018-12-04 18:32:16 -06:00
Travis Ralston
2b027b716f Suppress CORS errors in the 'failed to join room' dialog
This isn't pretty, but it does address https://github.com/vector-im/riot-web/issues/7526

Tested with Chrome and Firefox to ensure the message is stable enough to parse.
2018-11-27 14:23:28 -07:00
Travis Ralston
f9d5c11d8d Regenerate the room list when m.fully_read is issued
Not doing so results in the RoomListStore tracking stale data when the user reads messages on another device. The visual effect of this is rooms being incorrectly pinned in places they shouldn't be, such as the top of the list. This also fixes another visual bug where rooms don't move down once their timelines are read. This second issue is mot prominent when multiple rooms have been pinned to the top, and the middle one is read ahead of the others - it'll stick around until some other condition decides to wipe the room's cached state.

Fixes https://github.com/vector-im/riot-web/issues/7653
2018-11-04 19:47:24 -07:00