thunder
thunder copied to clipboard
Improvements to feed page and app bars
Pull Request Description
This PR applies some improvements to the feed page to reduce a few sources of potential jank. In particular:
- The
showAppBarTitlelogic has been moved fromFeedPageto its respective app bar widgets (FeedPageAppBarandAccountPageAppBar). This change ensures thatsetStatecalls are handled within the app bar widgets and prevents unnecessary rebuilds of the entireFeedPagewhenshowAppBarTitleupdates. - A new widget was created
FeedEndIndicatorto display the appropriate element at the end of the feed (e.g., a loading icon or an "end of feed" message). While this change doesn't directly impact performance, it improves the experience when attempting to perform profiling on Thunder.
For some context on FeedEndIndicator:
- Previously, a loading indicator was always displayed at the end of the feed if additional items could be fetched from the API. This made it difficult to profile the app and detect jank frames as the loading animation constantly created new frames, causing any jank frames to disappear from the profiling tools.
- To improve profiling, I've adjusted the logic so that the loading indicator only appears when the user scrolls near the end of the feed. This prevents unnecessary frame generation and makes it easier to analyze and diagnose jank frames.
Issue Being Fixed
Issue Number: N/A
Screenshots / Recordings
Checklist
- [ ] If a new package was added, did you ensure it uses an appropriate license and is actively maintained?
- [ ] Did you use localized strings (and added appropriate descriptions) where applicable?
- [ ] Did you add
semanticLabels where applicable for accessibility?