Draft: Improvements to book manager page
Context
In #1369 we originally tackled not being able to open large chapter processed books.
We received information that chapter-processed books can have currently more than 35,000 chapters and in the future even more chapter records given more are added regularly. Some large chapter processed books we are aware of:
- Gene reviews (auto sorted TOC A-Z)
- LactMed: https://www.ncbi.nlm.nih.gov/books/NBK501922/ All LactMed files from OA subset: https://ftp.ncbi.nlm.nih.gov/pub/litarch/90/6c/ (auto sorted TOC A-Z)
- LiverTox: https://www.ncbi.nlm.nih.gov/books/NBK547852/ All LiverTox files from OA subset: https://ftp.ncbi.nlm.nih.gov/pub/litarch/29/31/ (auto sorted TOC A-Z)
- StatPearl: https://www.ncbi.nlm.nih.gov/books/NBK430685/ All StatPearls files from OA subset: https://ftp.ncbi.nlm.nih.gov/pub/litarch/3d/12/ (TOC will be supplied by user per #1434 (closed))
- PDQs: https://www.ncbi.nlm.nih.gov/books/NBK82221/ All PDQ files from OA subset: https://ftp.ncbi.nlm.nih.gov/pub/litarch/00/ec/ (Note each chapter can have more than 10-20 chapter published versions) (TOC will be supplied by user per #1434 (closed))
- DARE: https://www.ncbi.nlm.nih.gov/books/NBK285222/?term=all%5Bsb%5D (Files are not Open Access and available via FTP service) (need to be migrated but not updated)
Another concern is pmh_iqwig which has 1000 chapters and it has an intricate TOC where every disease has a part, so it has very many parts and has parts within parts, so there is a lot of drag and dropping required. (Could be handed by TOC will be supplied by user per #1434 (closed))
We did work in #1369 and !1082 (merged) to introduce better loading of the page and integrate search and filter to the page since ctrl F no longer worked. We also improved drag and drop (although it continues to be very difficult to use).
Proposal
There are various ways we could possibly improve the Book manager page, these are noted below with the caveat that any interesting possible solution needs extensive investigation.
Improvement 1
NCBI indicated that Drag and drop across the second-inner scroll bar is extremely difficult, and makes it hard to scroll within the second-inner scroll bar while dragging. For this we could improve drag and scroll at the same time, such that dragging an item downwards anywhere on the page will scroll the second-inner scroll bar down within the section (example 'Body') that you're in.
Improvement 2
Introduce an 'Advanced TOC handling' button that opens a second view in the Book manager page. In this view we flat-load components' names without all the last-published and other rich data that increases the load and handling time on components. No actions besides drag and drop to reorder TOCs would be possible in this view, but reordering components will be faster here. This doesn't necessarily have to replace drag and drop on the central Book manager page, which might still be useful to have there for smaller books.
Improvement 3
3.1. Introduce 'Move component up 1' and 'Move component down 1' buttons on book manager components to move them 1 space up or down in the TOC 3.2 Introduce 'Move component up 10' and 'Move component down 10' buttons on book manager components to move them 10 spaces up or down in the TOC
Improvement 4
- Remove double scroll bars (to get rid of the second-inner scroll bars)
- Then search would need to be totally redone based on the back end not the database (because the kind lazy-loading required would not load the elements in the front end, currently we load all the elements to some degree in the front end)
- Drag and drop doesn't work on the book manager page once that kind of lazy loading is introduced, so TOC handling would need to be separated out as in Improvement 2 section
For each of these options (which are not all necessarily mutually exclusive) further investigation and experimentation would be needed to determine their viability, and given that we need to future proof for 35,000+ chapters, a solution can't be rushed and this would need significant dedicated time to recreate large books and test various options within them.
Design
[Include sketch or wireframes of the UI changes necessary for this feature]
Implementation (if applicable)
[A description of the steps to implement the feature.]
Alternative approaches (if applicable)
[Include any alternatives to meet this use case.]