Add server-plugin-defined nav pages#1431
Open
matschi95 wants to merge 3 commits into
Open
Conversation
4c40a2f to
a8a1c51
Compare
damontecres
requested changes
May 31, 2026
Owner
damontecres
left a comment
There was a problem hiding this comment.
Needs some changes.
Plugin configuration changes don't fully propagate to the client without a logout / app restart.
client refreshes the navigation drawer and the home-page settings only on user switch
This is true, but I do want to add refreshing the user config and other server settings more often. But that change is probably out of scope for this PR though.
| Timber.w("fetchPage(%s) returned 404", id) | ||
| null | ||
| } else { | ||
| throw ApiClientException(res.code.toString() + " " + res.body.string()) |
Owner
There was a problem hiding this comment.
Use InvalidStatusException instead
Owner
|
Also, if we're going down the route of customizing the nav drawer, I'd like to make it possible to customize in-app as well. That would have be a new feature/PR. |
Adds a new server-plugin-driven concept of "custom pages" — admin declares pages in PagesConfig (id, title, icon, position, rows), each becomes a nav-drawer entry slotted in at one of: AfterHome, AfterFavorites, AfterDiscover, AfterLibraries, End. Pages within the same position keep their YAML order. Client fetches the page list at user switch and a single page's rows on demand via the new ServerPluginApi.fetchPages / fetchPage. Rows are rendered through the existing HomePageContent composable, so the visual experience (backdrop, header, focus handling) matches the home screen. To avoid re-fetching every time the user navigates to a page (the nav back stack pops and re-pushes the entry, recreating the ViewModel) a small CustomPageRowsCache singleton holds the latest fetched rows per (userId, pageId). The cache is cleared on user switch. The admin-supplied icon string is rendered in two ways: - http(s):// URL → loaded via Coil's AsyncImage (PNG / SVG / JPG) - any other name → looked up in a small Material Icons whitelist (Home, Star, Settings, ...) and rendered as an ImageVector Unknown / missing names fall back to a generic star icon.
a8a1c51 to
1d18e03
Compare
Author
|
I have implemented your requested changes. Do you want something more to be added to this specific PR? |
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.
Description
Plugin-PR damontecres/jellyfin-plugin-wholphin#5 adds the option to define additional pages for the navigation drawer. Wholphin uses these two new endpoints in following sequence:
/wholphin/pagesand imports these to the nav drawer layout/wholphin/pages/{id}with the corresponding idTo avoid re-fetching every time the user navigates to a page, a small CustomPageRowsCache singleton holds the latest fetched rows per (userId, pageId). The cache is cleared on user switch.
Known limitation:
Plugin configuration changes don't fully propagate to the client without a logout / app restart.
The Wholphin client refreshes the navigation drawer and the home-page settings only on user switch. Custom-page row contents are fetched fresh on every page open, so row changes within an existing page show up after a brief background refresh. But anything that affects the drawer or home-screen layout is cached in-memory until the user logs out:
This limitation should be fixed in a seperate PR after this one was merged.
Related issues
Testing
Tested via Android Emulator and following config:
Screenshots
My config adds two additional pages under the home entry. Trending Movies uses an URL, where as Trending Shows uses on of our supported Material Icons (Play).
AI or LLM usage
This PR was developed in pair with Claude (Anthropic). I understand the code and can explain every change made in the PR. Manual end-to-end testing was performed by me on an Android TV emulator.