Native InnerTube video search, search redesign, and a shared adaptive grid - #1063
Merged
Merged
Conversation
…he way youtube lays them out
…helf room to breathe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Moves video search off NewPipeExtractor onto the native InnerTube client — 13 requests per page down to 1 — and rebuilds the search surface on Material 3 with a grid layout shared with Home and Channels.
Data and parsing
innertube/pages/channel/promoted toinnertube/pages/renderer/, since search and channel parse the same renderers.ChannelItem→FeedItem,ChannelSection→FeedShelf, and so on.innertube/pages/search/:SearchResultsPage,SearchPageParser,SearchSuggestionsPage. Structural JSON parsing against a renderer registry, not typed DTOs.YouTubeSearchParamsgeneralised into a protobufparamsbuilder, so every filter and sort is applied server-side rather than by fetching more and filtering locally.SearchPagingSourcefolds the creator's "Latest from" strip into the channel card it belongs to, dedupes across pages, and drops blocked creators.Filters that are dead server-side are not offered: sort-by-date and sort-by-rating return the same result set as relevance (verified by diffing live responses), so only Relevance and View count ship.
UI
SearchScreen1790 → 242 lines; components split intoui/components/search/.rememberMediaArtworkTint, with the latest-uploads shelf attached to it and a responsive action row.FeedGridLayoutgainscardWidth; rows the grid cannot fill now take a full-width thumbnail-left card each, sized to one grid column so they line up with the cards above. List mode is one full-width column at every size.Shared components gained parameters whose defaults preserve existing behaviour, so no other call site changes visually:
CompactVideoCard(thumbnailWidth),FlowSubscribeButton(size, tint),MediaArtworkTint.raised.Also
FlowNeuroEngine's blocked set.ViewHistory.touchHistoryEntryoverwriting a recorded duration with0, which silently dropped a video from the watch-progress map.Testing
129 tests across 15 classes, including 17 real captured InnerTube responses as fixtures.
All green. Verified on a phone in portrait and landscape; not verified on tablet hardware.
Layout is covered as pure logic rather than by rendering:
VideoCardFullWidthandCompactVideoCardcallhiltViewModel()unconditionally and there is no Hilt test infrastructure insrc/test, so rendering a video card there throws.