Skip to content

fix: observation title truncated#1890

Merged
cimigree merged 1 commit into
developfrom
fix/observation-item-list
May 20, 2026
Merged

fix: observation title truncated#1890
cimigree merged 1 commit into
developfrom
fix/observation-item-list

Conversation

@cimigree

@cimigree cimigree commented May 7, 2026

Copy link
Copy Markdown
Contributor

closes #1873
Changes
Removes fixed height from observation list so also have to remove getItemLayout optimization.


The reason we had fixed height was so that we could use this https://reactnative.dev/docs/flatlist#getitemlayout.
getItemLayout matters most when users scroll quickly through large lists — without it, FlatList has to measure every item lazily as it comes into view, which can cause blank frames and weirdness on fast scrolls.
So this is what it had looked like for some with large fonts:


image

However, even if we picked a super large magic number for height to allow for the most narrow of phones and the largest text (so we would have fixed height list items and could use getItemLayout) that doesn't seem like it would be optimal behavior. For most people the observation item would be too big. And even if we made it really big, for some it would still be too small.

So, instead, I opted to get rid of the getItemLayout feature and instead use a minHeight of 80 pixels. Now the height of each list item is variable depending on the content.

Please let me know if you would rather go a different way.


image

@cimigree
cimigree requested a review from ErikSin May 7, 2026 20:48

@ErikSin ErikSin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good!

@cimigree
cimigree merged commit 0504a3c into develop May 20, 2026
11 checks passed
@cimigree
cimigree deleted the fix/observation-item-list branch May 20, 2026 18:01
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.

Large size font/ Observation title truncated

2 participants