11 Commits

Author SHA1 Message Date
Reece Browne
467d590a4f Remove incorrect nav 2025-08-20 20:35:01 +01:00
Reece Browne
7328cc6922 Update navigation on tools 2025-08-20 19:30:32 +01:00
Reece Browne
9552772587 has Merge branch 'V2' of https://github.com/Stirling-Tools/Stirling-PDF into feature/v2/file-handling-improvements 2025-08-19 13:13:36 +01:00
Reece Browne
9b14609236 feat: Introduce new file context management with hooks and lifecycle management
- Added new contexts for file state and actions to improve performance.
- Implemented unified file actions with a single `addFiles` helper for various file types.
- Created performant hooks for accessing file state and actions, including selection and management.
- Developed file selectors for efficient state access.
- Introduced a lifecycle manager for resource cleanup and memory management.
- Updated HomePage and tool components to utilize new navigation actions.
- Refactored file context types to streamline state management and remove legacy compatibility.
2025-08-18 21:00:19 +01:00
ConnorYoh
4c17c520d7
V2 results flow (#4196)
Better tool flow for reusability
Pinning 
Styling of tool flow
consumption of files after tooling

---------

Co-authored-by: Connor Yoh <connor@stirlingpdf.com>
Co-authored-by: James Brunton <jbrunton96@gmail.com>
2025-08-15 14:43:30 +01:00
Reece Browne
eb2444142f Merge remote-tracking branch 'origin/V2' into feature/v2/file-handling-improvements 2025-08-15 00:52:36 +01:00
James Brunton
ecf30d1028
Implement 'Add Password' and 'Change Permissions' tools in V2 (#4195)
# Description of Changes
Implement Add Password and Change Permissions tools in V2 (both in one
because Change Permissions is a fake endpoint which just calls Add
Password behind the scenes).

---------

Co-authored-by: James <james@crosscourtanalytics.com>
2025-08-14 14:27:23 +01:00
Reece Browne
f353d3404c Refactor file context and tool operations
- Updated `useToolOperation` to include file ID and operation parameters for better tracking.
- Enhanced `useToolResources` to utilize refs for blob URL cleanup, improving performance and reducing unnecessary state updates.
- Modified `ThumbnailGenerationService` to clarify worker setup and fallback mechanisms, removing excessive logging for cleaner output.
- Refactored tool components (Compress, Convert, OCR, Split) to use `useFileActions` for state management, ensuring consistency across tools.
- Expanded `FileContextState` and `FileContextActions` to support new file processing features and improved state management.
- Added new `FileContextSelectors` for efficient file access and state querying, minimizing re-renders in components.
2025-08-12 14:37:45 +01:00
Reece Browne
02f4f7abaf Refactor file management context and remove FileSelectionContext- Updated FileManagerContext to use useMemo for context value optimization.- Removed FileSelectionContext and integrated its functionality into FileContext.- Updated hooks and components to use new file context structure.- Refactored file handling logic to utilize stable file IDs for deduplication.- Adjusted UI state management for improved performance and clarity.- Updated theme variables for consistency in hover and selection states.- Ensured backward compatibility with legacy properties in FileContext. 2025-08-10 21:08:32 +01:00
EthanHealy01
9861332040
Feature/v2/tooltips (#4112)
# Description of Changes

- added tooltips to ocr and compress
- added the tooltip component which can be used either directly, or
through the toolstep component

---

## 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/devGuide/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/devGuide/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/devGuide/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/devGuide/DeveloperGuide.md#6-testing)
for more details.
2025-08-08 12:09:41 +01:00
EthanHealy01
8881f19b03
Tools/ocr/v2 (#4055)
# Description of Changes

- Added the OCR tool 
- Added language mappings file to map selected browser language -> OCR
language and OCR language codes -> english display values. TODO: Use the
translation function to translate the languages rather than mapping them
to english be default
- Added chevron icons to tool step to show expand and collapsed state
more visibly
- Added a re-usable dropdown picker with a footer component

---

## 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/devGuide/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/devGuide/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/devGuide/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/devGuide/DeveloperGuide.md#6-testing)
for more details.

---------

Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com>
2025-08-01 14:22:19 +01:00