Commit Graph

3575 Commits

Author SHA1 Message Date
Reece
83b8c9be09 feat: Enhance PDF splitting functionality and operation history tracking
- Improved the useEnhancedProcessedFiles hook to only update processed files when content changes.
- Added preview functionality for split PDF files in the HomePage component.
- Implemented a new PDFExportService with enhanced error handling and file validation.
- Updated Split tool to generate and display thumbnails for split PDF files.
- Introduced a comprehensive FileOperationHistory component to track and display file operations.
- Enhanced file context types to support new operation types and history management.
- Created a ZipFileService for validating and extracting PDF files from ZIP archives.
2025-07-10 17:51:50 +01:00
Reece
c7dce8a68f Split reimplementation 2025-07-10 01:48:13 +01:00
Reece
666c15fabd Remove url params for now. small refactor 2025-07-09 19:46:44 +01:00
Reece
33420c7e80 Implement navigation warning modal and unsaved changes management 2025-07-08 16:00:25 +01:00
Reece
9b63bffb36 refactor: Update PageThumbnail component to use page numbers instead of IDs for drag-and-drop functionality and selection management
- 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.
2025-07-08 00:02:48 +01:00
Reece
2f9c88b000 Optimize PageEditor performance and fix view switching issues
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.
2025-07-04 11:17:10 +01:00
Reece
759055a96d Page editor tweaks 2025-07-01 16:07:36 +01:00
Reece
35820e8a24 Replace filemanager with recent files system 2025-06-27 21:32:20 +01:00
Reece
61699a08a5 Clean up of thumbnail generation 2025-06-27 20:30:47 +01:00
Reece
3730429153 Optimising pageeditor 2025-06-27 18:11:23 +01:00
Reece
42abe83385 File management overhaul 2025-06-27 14:06:16 +01:00
Reece
09758ea2b8 Cache lazy loaded pages in viewer 2025-06-26 13:46:12 +01:00
Reece
ffe5b9577b Page editor fixes and improvements and restructuring 2025-06-24 23:31:21 +01:00
Reece
2f90220b7b File handling fixes 2025-06-24 20:25:03 +01:00
Reece
25e9db2570 Clean up 2025-06-20 23:00:26 +01:00
Reece
cbc5616a39 Translations for file management 2025-06-20 21:46:37 +01:00
Reece
215bb86a8e Bug fixing, file management changes 2025-06-20 20:22:18 +01:00
Reece
3ebf75ae6f File editor groundwork and refactor work 2025-06-20 17:51:24 +01:00
Reece
9c410865f9 Big refactor 2025-06-19 22:41:05 +01:00
Reece
868969192b Refactor 2025-06-19 19:47:44 +01:00
Reece
d981968e0f Page editor redesign 2025-06-18 18:12:15 +01:00
Reece
ae508730c3 Added quick access bar consolodated sidebars 2025-06-18 14:16:39 +01:00
Reece
bf6a74210f Remove repeated tailwind imports causing issues 2025-06-18 13:36:24 +01:00
Reece
e7995a0256 Page editor updates 2025-06-16 19:57:50 +01:00
Reece
7fc850b138 Update Page editor styling 2025-06-16 15:11:00 +01:00
Reece
ac3da9b7c2 Developer guide updates and claude.md 2025-06-14 22:03:46 +01:00
Reece
5298cb1607 Ground work for page editor 2025-06-10 11:19:54 +01:00
Reece
41efd80dd5 RAINBOW MODE!!!! 2025-06-09 18:38:06 +01:00
Reece
342345cbb9 Fix viewer positioning error 2025-06-09 18:37:47 +01:00
Reece
6bf41a4cbe Remove Claude.md from gitignore 2025-06-09 10:53:32 +01:00
Reece
1e0949ff2b Css fixes, Tailwind forward 2025-06-08 13:45:45 +01:00
Reece
b1584151ba Css overhaul 2025-06-06 17:20:06 +01:00
Reece
0c76bf2c8b Homepage refactor 2025-06-05 21:59:18 +01:00
Reece
7dd79aa2a1 Fix url params and fix vite 2025-06-04 23:02:53 +01:00
Reece
61eac67dc1 Claude.md in gitignore 2025-06-04 19:06:07 +01:00
Reece
16f150a203 IndexxedDb refactored 2025-06-04 19:04:56 +01:00
Reece
a3c4f1a305 IndexedDb integration 2025-06-04 19:04:18 +01:00
Reece
0650a6a877 Remove License file 2025-06-03 13:19:16 +01:00
Reece
09f05ac8d0 React translations 2025-05-29 17:26:32 +01:00
Reece
5f862f55d9 Restore theme toggle 2025-05-28 22:18:19 +01:00
Reece
15761ae743 Remove CRA and use Vite instead 2025-05-28 21:43:02 +01:00
Reece
d216811317 - Viewer overhaul
-Dark mode toggle
-URL params improvements
-app.js set up fix
- UI clean up
2025-05-27 19:28:03 +01:00
Reece
41c82b15da TSX rewrite and query strings initial set up 2025-05-21 21:47:44 +01:00
Reece
5f7a4e1664 Merge branch 'Stirling-2.0' of https://github.com/reecebrowne/Stirling-PDF into Stirling-2.0 2025-05-19 13:14:58 +01:00
Reece Browne
b5e7995554 File management groundwork 2025-05-15 23:12:39 +01:00
Reece Browne
f789533c83 Mantine overhaul 2025-05-15 20:07:33 +01:00
Reece Browne
d669964975 Basic homepage with compress and split 2025-05-13 23:32:54 +01:00
Ludy
091484fc1d
Standardize Quoted Path Syntax in Thymeleaf th:href for Consistent Link Resolution (#3515)
# Description of Changes

Please provide a summary of the changes, including:

- **What was changed**  
1. In `DeveloperGuide.md`, updated the example `<a>` tag to use
`th:href="@{'/new-feature'}"` instead of `th:href="@{/new-feature}"`.
2. In `adminSettings.html`, replaced the static `href="/usage"` with a
Thymeleaf attribute `th:href="@{'/usage'}"` to ensure proper URL
resolution.

- **Why the change was made**  
Consistently quoting paths in `th:href` improves readability and avoids
potential parsing inconsistencies in Thymeleaf templates when resolving
URLs at runtime.

---

## Checklist

### General

- [ ] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md)
(if applicable)
- [ ] I have performed a self-review of my own code
- [ ] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing)
for more details.
2025-05-12 10:37:07 +01:00
Shad CT
a595a950ab
updated the languages list (#3510)
# Description of Changes

Please provide a summary of the changes, including:

- What was changed
- Why the change was made
- Any challenges encountered

Closes #(issue_number)

---

## Checklist

### General

- [ ] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [ ] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md)
(if applicable)
- [ ] I have performed a self-review of my own code
- [ ] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing)
for more details.
2025-05-12 10:36:33 +01:00
stirlingbot[bot]
cd775661ab
🤖 format everything with pre-commit by <stirlingbot> (#3514)
Auto-generated by [create-pull-request][1] with **stirlingbot**

[1]: https://github.com/peter-evans/create-pull-request

Signed-off-by: stirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com>
Co-authored-by: stirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com>
2025-05-12 09:01:28 +01:00