This repository was archived by the owner on Sep 11, 2024. It is now read-only.
Introduce sticky rooms to the new room list #4720
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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):

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.