Repository navigation
Improve object selection and batch copying of covers and stories - #767
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a robust bulk-copying feature for cached sequences (covers and stories), including UI enhancements for managing and reordering remembered objects, dynamic validation for series years, and performance optimizations for homepage and series searches. The review feedback highlights several critical issues: a database integrity bug in apps/oi/views.py due to using a static hash for StoryCopyBatch keys, a failure to retrieve selected_covers during bulk cache removal in apps/select/views.py, a performance bottleneck in apps/gcd/views/search.py caused by evaluating querysets in memory, and a potential KeyError when sorting cache choices.
| return "Changeset" | ||
|
|
||
|
|
||
| class StoryCopyBatch(models.Model): |
There was a problem hiding this comment.
Why add a model for temp data that can be put into the cache ?
There was a problem hiding this comment.
You’re right; a new model was unnecessary here. Removed StoryCopyBatch and its migration in d981f3a and switched to the existing cache.
88bc43d to
cdee1a9
Compare
|
I see you are editing css, we use tailwind as a css framework, so no written css. |
| <p>This issue already has a cover. Copy as cover reprint (on interior page) at position {{ cover_position }}. The main cover stays in place.</p> | ||
| {% endif %} | ||
| {% endif %} | ||
| {% if bulk_copy %} |
There was a problem hiding this comment.
We use two-space indentation for html files.
|
Functionality looks good. The colors and stylings need to use the tailwind colors. |
|
select_object is also used for adding reprints, which with this change doesn't work anymore. |
|
Thanks, Jochen. Addressed in ea4d798 and 9a3feba:
|
|
The current fix keeps their templates separate, but both still use /select_object/, with the template chosen from the operation stored in the session. I think a dedicated URL and view for sequence copying would make the separation clearer, while reusing the existing search and cache helpers. /select_object/ would retain its original behavior for reprints and other selections. Would you prefer that approach for this PR? |
|
This is for sequences only, right ? We can make it under /select_multiple_sequences/ for the selection functionality, we might can use it for other purposes later. The left/right border/margin on the page is larger then one other pages, should be consistent. The text is smaller, I see a text-sm ? Should be consistent to other pages so that the user can consistently decide via zoom. Do we need to show the order column, or can we hide it ? "Order" also line breaks before r on my window, which can be prevented. The text on the buttons should all be capitalized, e.g. Copy Selected, again for consistency (not all buttons are made consistent, but all being edited should be made so) Specific reason for covers above stories ? So far we had first stories, with the idea that the more often used object is on top. Should be consistent on the two select screens. I am not sure about the red color for the clear-buttons. Don't think we have similar buttons so far ? |
|
Removed the non-standard changes while keeping the style 100% consistent:
|
|
Thanks for the update. On the confirmation page we so far show the sequence data. For me this is key to make sure that I got the right sequence, also the "Copy credits with credited/signed qualifiers" and "Copy characters" depends on the data of the sequence, which is now not accessible. I think we need to show this as before ? Since I know these question will come from the users: Do we want "Copy credits with credited/signed qualifiers" and "Copy characters" per sequence ? |
|
Ok. Updated in
|
Description
Redesigned
/select_object/to make selecting, ordering, and copying covers and stories simpler—with a compact interface and atomic batch operations.Features
Added a compact layout inspired by the keyword manager, with three collapsible search panels:
Added checkbox multi-selection with Select all / Clear selection controls per category.
Added drag-and-drop ordering with automatic persistence.
Kept selection counts, copy, bulk delete, and cancel within reach through a fixed action bar.
Removed per-row Delete buttons and moved category-wide and full cache clearing into a separate danger zone below the lists.
Added explicit primary-cover selection when copying multiple covers.
Fixes
0, followed by cover reprints and selected stories in the appropriate order.cache_sizeas a positive integer and preserved existing entries when changing its value.2025search limit with the current year.