- Changed selectedPages, draggedPage, dropTarget, and movingPage props from string to number type.
- Updated event handlers and state management to reflect the use of page numbers.
- Enhanced logging for better debugging during thumbnail generation and worker communication.
refactor: Simplify FileContext by removing mergedDocuments state and related actions
- Removed mergedDocuments from FileContextState and associated actions in the reducer.
- Updated selectedPageIds to selectedPageNumbers for consistency in page selection handling.
fix: Improve thumbnail generation service logging and error handling
- Added detailed logging for thumbnail generation progress and worker job management.
- Implemented better error handling for worker timeouts and main thread fallbacks.
style: Clean up FileGrid component for better readability and maintainability
- Adjusted formatting and spacing in the FileGrid component for improved code clarity.
Major performance improvements and UX enhancements:
PERFORMANCE FIXES:
- Add merged document caching in FileContext to prevent re-processing on view switches
- Implement hash-based cache fallback for File object identity preservation
- Add pagination for large documents (>200 pages) to prevent DOM overload
- Convert synchronous operations to async chunked processing
- Optimize effect dependencies to prevent unnecessary re-renders
- Remove aggressive cleanup on view switches that destroyed caches
UI/UX IMPROVEMENTS:
- Add immediate visual feedback with loading spinners in view switching buttons
- Implement skeleton loaders for smooth transitions during processing
- Add progress indicators with real-time percentages
- Defer heavy operations using requestAnimationFrame to allow UI updates
- Create reusable SkeletonLoader component for consistent loading states
CACHE SYSTEM:
- Move processed file cache management to FileContext for persistence
- Add stable cache key generation based on file combinations
- Implement smart cache invalidation only when files are actually removed
- Preserve thumbnails and page data across view switches
BUG FIXES:
- Fix infinite loop errors caused by circular hook dependencies
- Resolve File object recreation breaking Map lookups
- Fix thumbnail loading issues in PageEditor
- Prevent UI thread blocking during PDF merging operations
TECHNICAL DEBT:
- Centralize memory management in FileContext
- Add proper cleanup for removed files while preserving active caches
- Implement async/await patterns for better error handling
- Add performance debugging with console timing
Result: PageEditor now loads instantly when returning to cached files,
large documents render smoothly with pagination, and view switching
provides immediate feedback even during heavy operations.
### Description of Changes
This Pull Request was automatically generated to synchronize updates to
translation files and documentation. Below are the details of the
changes made:
#### **1. Synchronization of Translation Files**
- Updated translation files (`messages_*.properties`) to reflect changes
in the reference file `messages_en_GB.properties`.
- Ensured consistency and synchronization across all supported language
files.
- Highlighted any missing or incomplete translations.
#### **2. Update README.md**
- Generated the translation progress table in `README.md`.
- Added a summary of the current translation status for all supported
languages.
- Included up-to-date statistics on translation coverage.
#### **Why these changes are necessary**
- Keeps translation files aligned with the latest reference updates.
- Ensures the documentation reflects the current translation progress.
---
Auto-generated by [create-pull-request][1].
[1]: https://github.com/peter-evans/create-pull-request
Co-authored-by: stirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com>