Commit graph

510 commits

Author SHA1 Message Date
Travis Ralston
b857c9d199
Merge pull request #4786 from matrix-org/travis/room-list/show-n-reliability
Fix show less/more button occluding the list automatically
2020-06-18 07:46:13 -06:00
Travis Ralston
8db67743f7 Improve room switching in the new room list
For https://github.com/vector-im/riot-web/issues/14034

One of the largest issues with room switching was that we'd regenerate the entire list when the sticky room changes, which is obviously detrimental on larger accounts (and even some medium accounts). To work through this, we simply handle the NewRoom and RoomRemoved causes (used by the sticky room handling) as splices rather than in-place updates.

Overall this leads to a smoother experience as it means we're doing far less calculations and can even opt out of an update if it isn't required, such as a RoomRemoved cause being fired twice - the second one can result in an update not being required, saving render time.

This commit also includes a fix for handling update causes on the sticky room, as the room list loves to print errors when this happens. We don't need to handle any updates because once the sticky room changes it'll get re-added through NewRoom, causing the underlying algorithm to slot it in where needed, effectively handling all the missed updates.
2020-06-17 22:42:01 -06:00
Travis Ralston
245181cf80 Fix show less/more button occluding the list automatically
When the user would click 'show more' they would be presented with a 'show less' button that occluded the last room. 

Similarly, if they resized the list so that all their rooms would be shown and refreshed the page, they would find their last room covered by the button.

This changes the handling so that showAllClick() sets the height to numTiles + button padding, and adjusts the height calculations on render to deal with relative tiles.

This also removes the conditional padding of the resize handle, as we always occupy the 4px of space. It was leading to rooms getting trimmed slightly by the show N button.
2020-06-17 22:09:59 -06:00
Travis Ralston
d2831ffb0c
Merge pull request #4758 from matrix-org/travis/room-list/sticky
Sticky and collapsing headers for new room list
2020-06-17 08:28:38 -06:00
Travis Ralston
07f13f2ece
Merge pull request #4767 from matrix-org/travis/room-list/tombstone
Handle/hide old rooms in the room list
2020-06-17 08:24:27 -06:00
Travis Ralston
3bdf3be3f4
Merge pull request #4769 from matrix-org/travis/room-list/fuzzy-filter
Match fuzzy filtering a bit more reliably in the new room list
2020-06-17 07:15:36 -06:00
Travis Ralston
17f1fdaf6d Include the sticky room when filtering in the new room list
Fixes https://github.com/vector-im/riot-web/issues/14050
2020-06-16 10:59:42 -06:00
Travis Ralston
bc0281ebdd Match fuzzy filtering a bit more reliably in the new room list
Fixes https://github.com/vector-im/riot-web/issues/14054
2020-06-16 08:36:10 -06:00
Travis Ralston
4a74baf99d
Merge pull request #4768 from matrix-org/travis/room-list/better-filter
Match new room list's text search to old room list
2020-06-15 20:28:31 -06:00
Travis Ralston
f8828014f1 Match new room list's text search to old room list
Fixes https://github.com/vector-im/riot-web/issues/14042
2020-06-15 20:19:16 -06:00
Travis Ralston
776e63c0d8 Handle/hide old rooms in the room list
Fixes https://github.com/vector-im/riot-web/issues/14003
2020-06-15 20:11:06 -06:00
Travis Ralston
e9afb4b86e Fix ordering of recent rooms in the new room list
Fixes https://github.com/vector-im/riot-web/issues/14009
2020-06-15 20:04:32 -06:00
Travis Ralston
4186070489 Support list collapsing and jumping
Fixes https://github.com/vector-im/riot-web/issues/14036
2020-06-15 19:47:43 -06:00
David Baker
8ebae4c3b6
Merge pull request #4686 from matrix-org/dbkr/recovery_keys_over_passphrases
Use recovery keys over passphrases
2020-06-15 11:30:30 +01:00
Travis Ralston
6de6d94f7c Fix return type 2020-06-12 08:40:08 -06:00
Travis Ralston
6b54c3a492 Throw if the update cause is unsupported 2020-06-12 08:39:59 -06:00
Travis Ralston
fd029e8e80 Dumb down list algorithms in favour of smarter tags
This commit is a bit involved, as it factors the tag specific handling out of `/list-ordering` (and moves the `Algorithm` class one higher as a result), leaving it in the `Algorithm`. The algorithms for list ordering now only know how to handle a single tag, and this is managed by the `Algorithm` class - which is also no longer the base class for the list ordering. The list ordering algorithms now inherit from a generic `OrderingAlgorithm` base class which handles some rudimentary things.

Overall the logic hasn't changed much: the tag-specific stuff has been moved into the `Algorithm`, and the list ordering algorithms essentially just removed the iteration on tags. The `RoomListStore2` still shovels a bunch of information over to the `Algorithm`, which can lead to an awkward code flow however this commit is meant to keep the number of surfaces touched to a minimum.

The RoomListStore has also gained the ability to set per-list (tag) ordering and sorting, which is required for the new room list. The assumption that it defaults from the account-level settings is not reviewed by design, yet. This decision is deferred.
2020-06-11 22:02:09 -06:00
Travis Ralston
52b26deb2e Move room list store docs to docs directory
This pulls it away from the code, but the code is sufficiently involved enough where it doesn't need another file near it.
2020-06-11 16:56:12 -06:00
Travis Ralston
966e2cad7e Update documentation for how this refactoring will go 2020-06-11 16:52:47 -06:00
Travis Ralston
853ae6d5bf misc code quality improvements 2020-06-10 18:56:21 -06:00
Travis Ralston
6ccb566587 Show message previews on the new room list tiles
They're heavily cached.
2020-06-10 18:37:59 -06:00
Travis Ralston
a3391d9a08 Merge branch 'develop' into travis/room-list/hover-state 2020-06-10 07:42:41 -06:00
Travis Ralston
78e1db9d30
Merge pull request #4741 from matrix-org/travis/room-list/resize-handle
Update resize handle for new designs in new room list
2020-06-10 07:40:34 -06:00
Travis Ralston
a4ea5b5902
Merge pull request #4740 from matrix-org/travis/room-list/stability-1
Improve general stability in the new room list
2020-06-10 07:40:07 -06:00
Travis Ralston
111394df6d Add hover states and basic context menu to new room list
The 'sort by' radio buttons are blocked by https://github.com/matrix-org/matrix-react-sdk/pull/4731 as it contains the styles needed.

The 'unread rooms' checkbox is intentionally not hooked up. This is a more complicated refactoring that needs to be done.

The message preview checkbox works, though the previews remain hardcoded in this change. The primary intent of this change is to have a good enough context menu and the hover states.

The hover states are as described in the design.
2020-06-09 21:12:49 -06:00
Travis Ralston
5f8b7187cf Update resize handle for new designs
The diff should have information on what this does and how it is supposed to work.
2020-06-09 19:48:31 -06:00
Travis Ralston
84174cc440 Remove 1 extra line 2020-06-09 15:30:03 -06:00
Travis Ralston
c360800631 Add token.remove() handling to room list temp proxy
Fixes https://github.com/vector-im/riot-web/issues/13930
2020-06-09 15:26:13 -06:00
Travis Ralston
db23aaad83 Destroy old CommunityFilterConditions when they aren't needed
Fixes https://github.com/vector-im/riot-web/issues/13971
2020-06-09 15:22:37 -06:00
Travis Ralston
b5f9c4ba8a Merge branch 'develop' into travis/room-list/breadcrumbs 2020-06-09 08:12:56 -06:00
Travis Ralston
9377fa513f Merge branch 'develop' into travis/room-list/breadcrumbs 2020-06-09 08:11:08 -06:00
Travis Ralston
eefc40e0f8 Use IDestroyable instead of IDisposable
For consistency within our project
2020-06-09 08:08:47 -06:00
Travis Ralston
3fcd5505b3 Support prioritized room list filters
This is to fix an issue where when using both the community filter panel and the search box it's an AND rather than further refining the results.

This makes the search box further refine the community filter panel results.
2020-06-08 21:38:56 -06:00
Travis Ralston
708c65cd96 Disable new breadcrumb store when old room list is in use 2020-06-08 19:08:18 -06:00
Travis Ralston
5083811deb Appease the tests 2020-06-08 18:26:43 -06:00
Travis Ralston
eff97e6c20 Fix the tests 2020-06-08 18:18:34 -06:00
Travis Ralston
0354bf9b6d Reimplement breadcrumbs for new room list
This all-new component handles breadcrumbs a bit more smoothly for the app by always listening to changes even if the component isn't present. This allows the breadcrumbs to remain up to date for when the user re-enables breadcrumbs.

The new behaviour is that we turn breadcrumbs on once the user has a room, and we don't turn it back off for them.

This also introduces a new animation which is more stable and not laggy, though instead of sliding the breadcrumbs pop. This might be undesirable - to be reviewed.
2020-06-08 17:11:58 -06:00
Travis Ralston
000c92a53f Merge branch 'develop' into travis/room-list/css-layout 2020-06-08 09:40:21 -06:00
Travis Ralston
760333a0ae Move function to a private function 2020-06-07 13:08:25 -06:00
Travis Ralston
a7fe7cb28d Merge remote-tracking branch 'origin/develop' into travis/room-list/sticky 2020-06-07 13:06:30 -06:00
Travis Ralston
9b928b5a5d Handle remaining cases for room updates in new room list
For https://github.com/vector-im/riot-web/issues/13635

This adds support for:
* Tag changes
* DM changes
* Marking our own rooms as read
* Our own membership changes

The remaining branch we didn't need was the alternate 'new room' branch, so it was removed.

This is not optimized - optimization is deferred.
2020-06-05 20:12:32 -06:00
Travis Ralston
0bb1eefdea Remove view_room listener as it isn't needed
We use the RoomViewStore
2020-06-05 19:47:15 -06:00
Travis Ralston
6548748d7c Introduce sticky rooms to the new room list
Originally this was intended to be done only in the importance algorithm, however it is clear that all algorithms will need to deal with this. As such, it has been put into the base class to deal with as we may override it in the future. 

This commit should be self-documenting enough to describe what is going on, though the major highlight is that the handling of the sticky room is done by lying to the underlying algorithm.

This has not been optimized for performance yet.

For https://github.com/vector-im/riot-web/issues/13635
2020-06-05 18:44:38 -06:00
Travis Ralston
ea6b0a60ab Merge branch 'develop' into travis/room-list/css-layout 2020-06-05 13:19:00 -06:00
Travis Ralston
e93a41c5fb Minor clarity 2020-06-05 13:14:44 -06:00
David Baker
b82a893a79 Merge remote-tracking branch 'origin/develop' into dbkr/recovery_keys_over_passphrases 2020-06-05 16:00:43 +01:00
Travis Ralston
0c15b2bdb6 Simple structuring of the room list itself
This covers the larger parts of the design, but doesn't deal with the nuances of hover states, badge sizing, etc.
2020-06-04 21:21:04 -06:00
Travis Ralston
83df79aab9 Try variable resizing 2020-06-04 09:19:03 -06:00
Travis Ralston
dbf996439b Wedge t3chguy's resizer prototype into the sublist 2020-06-03 21:17:51 -06:00
Travis Ralston
c07b5ebe9a Initial experiments with resizing of room lists 2020-06-03 21:17:18 -06:00