Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve resizing interactions in the new room list #4865

Merged
merged 5 commits into from
Jul 1, 2020

Conversation

turt2live
Copy link
Member

@turt2live turt2live commented Jul 1, 2020

Fixes element-hq/element-web#14266
Fixes element-hq/element-web#14136
For element-hq/element-web#13635

This is reviewable commit-by-commit (recommended).

There's 4 distinct changes here (sorry, this is easier than 4 PRs stacked on top of each other):

  • Increasing the default number of rooms shown per design's request.
  • Adding a function to reset layouts (useful for debugging, designed to fix the next two issues).
  • Fix when 'show more' would be present.
  • Raise the resizer box factor to match the latest designs (current implementation).

For element-hq/element-web#14265

Intended to be accessed via `mx_RoomListStore2.resetLayout()`
For example, if you only have 3/10 rooms required for the default then resize smaller, we should have a 'show more' button.

This works by changing the rendering to be slightly more efficient and only looping over what is seen (renderVisibleTiles(), using this.numTiles in place of tiles.length) and using a new setVisibleTilesWithin() function on the layout. Previously resizing the 3/10 case would be setting visibleTiles to ~8 instead of ~1 like it should (because the getter returns a default).
Fixes element-hq/element-web#14136

The resizer handle wasn't being considered in this. 78% is both verified through mathematics and playing with it manually.
@turt2live turt2live requested a review from a team July 1, 2020 01:23
Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

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

I think it probably makes sense! 😅 I'd have to read more context to be sure, but we can always iterate if something's wrong.

src/components/views/rooms/RoomSublist2.tsx Show resolved Hide resolved
@turt2live turt2live merged commit 2cd6fae into develop Jul 1, 2020
@turt2live turt2live deleted the travis/room-list/default-vis branch July 1, 2020 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New room list: Raise default rooms to 10 4px cutoff on new room list is still present
2 participants