Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Introduce sticky rooms to the new room list #4720

Merged
merged 4 commits into from
Jun 8, 2020

Conversation

turt2live
Copy link
Member

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 element-hq/element-web#13635

Gif of this in action (going up and down the list to show stability, showing rooms not moving when the selected room receives messages, and showing it doesn't jump around when the list around it shifts a bit):
sticky-room mp4

The design in the gif is not representative of what this will actually look like. The branch which has all this CSS/layout is not yet merged/published and is only used to make the gif slightly more attractive looking. The changes themselves are purely under the hood and do not need to be pretty.

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 element-hq/element-web#13635
@turt2live turt2live requested a review from a team June 6, 2020 00:47
Copy link
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks 🐉 otherwise

src/stores/room-list/algorithms/list-ordering/Algorithm.ts Outdated Show resolved Hide resolved
@turt2live turt2live requested a review from t3chguy June 7, 2020 19:08
@turt2live turt2live merged commit 19a7297 into develop Jun 8, 2020
@turt2live turt2live deleted the travis/room-list/sticky branch June 8, 2020 01:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants