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

Fix extra room tiles being rendered on smaller sublists #4964

Merged
merged 1 commit into from
Jul 13, 2020

Conversation

turt2live
Copy link
Member

Fixes element-hq/element-web#14426
For element-hq/element-web#13635

The issue only applies to lists which won't have a 'show less' button, as the lists with the button would have the button's height considered when determining visible tiles. For lists that were under that (1-4 rooms), the show more button wasn't being considered and thus leading to the padding being added rather than subtracted, causing an extra tile to render.

By ensuring we include the padding for both show more and show less, we ensure that no extra tiles get rendered and that the cutoff semantics are still present.

Fixes element-hq/element-web#14426

The issue only applies to lists which won't have a 'show less' button, as the lists with the button would have the button's height considered when determining visible tiles. For lists that were under that (1-4 rooms), the show more button wasn't being considered and thus leading to the padding being added rather than subtracted, causing an extra tile to render.

By ensuring we include the padding for both show more and show less, we ensure that no extra tiles get rendered and that the cutoff semantics are still present.
@turt2live turt2live merged commit 2125293 into develop Jul 13, 2020
@turt2live turt2live deleted the travis/room-list/extra-tiles branch July 13, 2020 19:21
jryans pushed a commit that referenced this pull request Jul 15, 2020
a3a1e2e added the padding
to maxTilesPx which was confusing the calculation of whether we
should be showing the 'show more' button or the 'show less' button.

Hopefully this fixes the issue without undoing fixes from
#4964 or the
above commit by adding the padding in all cased in `get padding()`.
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.

New room list, sub lists have started rendering more room tiles than are actually visible
2 participants