feat(manga): add Related button with AniList/MAL relations & recommendations - #1122
Open
VictorVow wants to merge 2 commits into
Open
feat(manga): add Related button with AniList/MAL relations & recommendations#1122VictorVow wants to merge 2 commits into
VictorVow wants to merge 2 commits into
Conversation
…dations Add a "Related" button next to Tracking on the manga details page that opens a modal with four rows: AniList relations & recommendations and MyAnimeList related entries & recommendations. Each row shows the tracker logo and a horizontally scrolling list of cover cards that link to the entry on the tracker site. Add a "Show related for each manga" toggle (default on) to Settings > Browse to control the button's visibility.
The mangaRelated query result is keyed only by mangaId, but the related data depends on which tracker binding (remote id) the manga resolves to. Binding or unbinding a tracker did not invalidate it, so reopening the Related modal showed stale results. Evict the cached mangaRelated field on tracker bind/unbind so it is refetched the next time the Related modal opens.
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.
What this does
Adds a "Related" button next to the "Tracking" button on the manga details page. It opens a modal with four rows of cover cards:
Each row is headed by the tracker's logo and shows a horizontally scrolling list of cover cards (relations also show the relation type, e.g. "Prequel"). Clicking a card opens that entry on the tracker's site in a new tab.
A new Settings → Browse → "Show related for each manga" toggle (default on, described as "Currently supported for: AniList, MyAnimeList") controls the button's visibility.
Rationale
Gives a quick way to discover related works and recommendations for a manga, sourced from the trackers the user already uses, without leaving the app.
Behaviour notes
mangaRelatedresult is evicted from the Apollo cache on tracker bind/unbind, so it refreshes when the binding (and therefore the resolved entry) changes.Depends on
mangaRelatedGraphQL query this PR consumes. This will not function until that is merged and released. The generated GraphQL types here were added for that query and can be regenerated withpnpm gql:codegenagainst a server built from the companion PR.Testing
tscclean,oxlint/oxfmtclean, i18n strings extracted.Visual changes
Adds the "Related" button to the details action row and a new modal; adds one toggle row under Settings → Browse.