feat: Emeroteca section — periodicals browsing gated on server capability - #34
Merged
Conversation
…lity New read-only section for the emeroteca bundled plugin (Pinakes 0.7.77+ with the periodicals mobile bridge). Follows the Book Club pattern for optional server-side plugins end to end: - PeriodicalsApi (separate Retrofit interface) + defensive @serializable DTOs; PeriodicalsRepository with probeAvailability() (2xx→on, 404→off, other→last known) and instance-switch guard - periodicalsAvailable flag in FeatureStore (default false — the entry point stays hidden until the authenticated probe confirms), probe run in parallel with the book-club one inside refreshHealth() - Screens: mastheads list (debounced search, type filter chips, cursor load-more with dedup) → masthead detail (logo, ISSN, publisher, holdings, volume years) → issues of a year (cover, number, date, status badge) → issue detail (large cover, spoglio table of contents, "Open PDF" only when the server exposes a public pdf_url) - Entry point in Profile next to Book Club (Newspaper icon), nested nav graph with the standard slide-in transitions - 57 new i18n keys in all four locales (en/it/fr/de), appended in identical order - PeriodicalsUiStateTest: 12 pure-function tests (page merge dedup, type filter toggle, status→badge mapping, pdf gating) Verified: testDebugUnitTest 145/145, lintDebug clean, assembleDebug and assembleRelease (R8) build — existing keep rules already cover the new @serializable DTOs and Retrofit interface.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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
Read-only Emeroteca section for instances running Pinakes 0.7.77+ with the periodicals mobile bridge (fabiodalez-dev/Pinakes#411). The app follows the Book Club pattern for optional server-side plugins end to end.
How it works
periodicalsAvailableflag inFeatureStore(defaultfalse— the entry point stays hidden until confirmed). An authenticated probe ofGET /api/v1/periodicals/healthruns inrefreshHealth()in parallel with the book-club probe: 2xx → on, 404 → off, other errors keep the last known value; instance-switch guard included.periodicals→periodicals/{id}→periodicals/years/{yearId}/{year}→periodicals/issues/{id}with the standard slide-in transitions.pdf_url).PeriodicalsApiRetrofit interface + defensive@SerializableDTOs (nullable + defaults),PeriodicalsRepositoryvia the sharedapiCall/ApiResultplumbing.generateI18nRes.Tests & checks
PeriodicalsUiStateTest: 12 pure-function tests (page merge without duplicates incl. boundary overlap, type filter toggle, status→badge mapping, pdf gating) — ViewModels are exercised only through their pure state functions, per project convention../gradlew testDebugUnitTest→ 145/145 green./gradlew lintDebug→ 0 errors (no new warnings)./gradlew assembleDebugandassembleRelease(R8) → build; existing keep rules already cover the new@SerializableDTOs and Retrofit interface.Notes
versionCode/versionNamebump here: that happens with the release build as usual.