feat(readarr): scroll and dismiss the edition details popup
Add EditionDetailsHandler, the single block popup opened from the editions table. It owns the arrow, Home and End scrolling over its ScrollableText body, and the Esc that pops the popup and clears the edition details modal. The handler is nested under BookDetailsHandler, which claims the block ahead of its own tables. It never sees the keypress that opens it, so it performs no build, and it dispatches no network events: the popup is assembled from an already loaded row. Scrolling is implemented rather than stubbed. The body is mostly the edition overview, which routinely overflows the popup, so empty scroll methods would leave the arrow keys dead on the longest text in the view.
This commit is contained in:
6 files changed
+577
-4
No files matched your search
@@ -14,7 +14,8 @@ mod tests {
|
||||
use crate::models::HorizontallyScrollableText;
|
||||
use crate::models::readarr_models::{Author, AuthorStatistics, AuthorStatus};
|
||||
use crate::models::servarr_data::readarr::readarr_data::{
|
||||
AUTHOR_DETAILS_BLOCKS, ActiveReadarrBlock, BOOK_DETAILS_BLOCKS, LIBRARY_BLOCKS,
|
||||
AUTHOR_DETAILS_BLOCKS, ActiveReadarrBlock, BOOK_DETAILS_BLOCKS, EDITION_DETAILS_BLOCKS,
|
||||
LIBRARY_BLOCKS,
|
||||
};
|
||||
use crate::test_handler_delegation;
|
||||
|
||||
@@ -894,6 +895,7 @@ mod tests {
|
||||
library_handler_blocks.extend(LIBRARY_BLOCKS);
|
||||
library_handler_blocks.extend(AUTHOR_DETAILS_BLOCKS);
|
||||
library_handler_blocks.extend(BOOK_DETAILS_BLOCKS);
|
||||
library_handler_blocks.extend(EDITION_DETAILS_BLOCKS);
|
||||
|
||||
ActiveReadarrBlock::iter().for_each(|readarr_block| {
|
||||
if library_handler_blocks.contains(&readarr_block) {
|
||||
|
||||
Reference in new issue
Block a user