-
-
Notifications
You must be signed in to change notification settings - Fork 188
feat: Implement batch organizing functionality for library pages #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Added BatchOrganizeDialog component for selecting and moving pages between collections. - Introduced BatchOrganizeSetting component to filter and initiate batch moves. - Created BatchOrganizeController to handle API requests for filtering and moving pages. - Developed BatchOrganizeService to manage business logic for batch operations. - Implemented DTOs for batch filtering and moving requests/responses. - Enhanced PageRepository with batch update methods for collection management. - Updated PageService to handle library save status changes and timestamps. - Added pagination and selection features for improved user experience in batch operations.
…ith tooltip support
🤖 Augment PR SummarySummary: This PR prepares the v0.5.5 release by adding batch organizing tools for the library, improving timestamp UX, and refining export/file naming. Changes:
Technical Notes: Batch operations support pagination + “select all” semantics, and backend move logic uses bulk updates (CriteriaUpdate / repository update queries) with optional collected-time remapping. 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| public BatchFilterResult filterPages(BatchFilterQuery query) { | ||
| Specification<Page> spec = buildSpecification(query); | ||
| int page = query.getPage() != null ? query.getPage() : 0; | ||
| int size = query.getSize() != null ? query.getSize() : DEFAULT_PAGE_SIZE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| } | ||
|
|
||
| private BatchMoveResult batchMoveByFilter(BatchMoveRequest request) { | ||
| BatchFilterQuery query = request.getFilterQuery(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| .predicate(StringUtils.isNotBlank(query.getAuthor()), buildAuthorSpec(query.getAuthor())) | ||
| // Date range filter (always use createdAt) | ||
| .ge(StringUtils.isNotBlank(query.getStartDate()), "createdAt", convertDateToInstant(query.getStartDate(), 0)) | ||
| .lt(StringUtils.isNotBlank(query.getEndDate()), "createdAt", convertDateToInstant(query.getEndDate(), 1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The date predicates call convertDateToInstant(...), which returns null on parse failure; the underlying GeSpecification/LtSpecification don’t handle null compares and will throw at runtime. Consider only adding the createdAt bounds when parsing succeeds (or validate startDate/endDate upfront).
🤖 Was this useful? React with 👍 or 👎
| const data = await filterPages({ ...filterQuery, page: currentPage, size: PAGE_SIZE }); | ||
| setResult(data); | ||
| } catch (error) { | ||
| console.error("Failed to load pages:", error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| /** | ||
| * How to set the collectedAt timestamp. | ||
| * Values: KEEP (keep original), UPDATE_NOW (set to current time), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…ling and pagination validation
What's Changed
New Features
Commits
Full Changelog: v0.5.4...dev