feat(readarr): render the edition details popup

Draw the edition details popup over the book details view. The popup body is
the scrollable text the book details handler builds from the already loaded
edition row, so it needs no tabs and no network call.

The text styling is extracted into a named function so both branches are unit
tested, and the shared test fixture now holds the real field lines instead of a
placeholder, which exercises the scroll offset and the values that themselves
contain a colon.
This commit is contained in:
Dark-Alex-17 committed 2026-09-03 12:18:56 -06:00
1 parent b4c6994362
commit 280e691a94
16 files changed
+622 -6

No files matched your search

@@ -0,0 +1,50 @@
---
source: src/ui/readarr_ui/library/book_details_ui_tests.rs
expression: output
---
╭ Test Book Details ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Editions │ History │ File │ Manual Search │
│──────╭─────────────────────────────────────────────────── Edition Details ────────────────────────────────────────────────────╮─────│
│ For│Title: Test Edition │d │
│=> Har│Format: Hardcover │ │
│ │Language: English │ │
│ │Publisher: DAW Books │ │
│ │Page Count: 288 │ │
│ │Release Date: 2023-05-20 00:00:00 UTC │ │
│ │ISBN13: 9780756404079 │ │
│ │ASIN: B0043RSJ9S │ │
│ │Ratings: 4.5 (1000 votes) │ │
│ │Monitored: true │ │
│ │Overview: A test edition overview. │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,48 @@
---
source: src/ui/readarr_ui/library/edition_details_ui_tests.rs
expression: output
---
╭─────────────────────────────────────────────────── Edition Details ────────────────────────────────────────────────────╮
│Title: Test Edition │
│Format: Hardcover │
│Language: English │
│Publisher: DAW Books │
│Page Count: 288 │
│Release Date: 2023-05-20 00:00:00 UTC │
│ISBN13: 9780756404079 │
│ASIN: B0043RSJ9S │
│Ratings: 4.5 (1000 votes) │
│Monitored: true │
│Overview: A test edition overview. │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,48 @@
---
source: src/ui/readarr_ui/library/edition_details_ui_tests.rs
expression: output
---
╭─────────────────────────────────────────────────── Edition Details ────────────────────────────────────────────────────╮
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,48 @@
---
source: src/ui/readarr_ui/library/edition_details_ui_tests.rs
expression: output
---
╭─────────────────────────────────────────────────── Edition Details ────────────────────────────────────────────────────╮
│ │
│ │
│ Loading ... │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,48 @@
---
source: src/ui/readarr_ui/library/edition_details_ui_tests.rs
expression: output
---
╭─────────────────────────────────────────────────── Edition Details ────────────────────────────────────────────────────╮
│Language: English │
│Publisher: DAW Books │
│Page Count: 288 │
│Release Date: 2023-05-20 00:00:00 UTC │
│ISBN13: 9780756404079 │
│ASIN: B0043RSJ9S │
│Ratings: 4.5 (1000 votes) │
│Monitored: true │
│Overview: A test edition overview. │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,48 @@
---
source: src/ui/readarr_ui/library/edition_details_ui_tests.rs
expression: output
---
╭─────────────────────────────────────────────────── Edition Details ────────────────────────────────────────────────────╮
│Title: Test Edition │
│Format: Hardcover │
│Language: English │
│Publisher: DAW Books │
│Page Count: 288 │
│Release Date: 2023-05-20 00:00:00 UTC │
│ISBN13: 9780756404079 │
│ASIN: B0043RSJ9S │
│Ratings: 4.5 (1000 votes) │
│Monitored: true │
│Overview: A test edition overview. │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯