Feat: Auto output directory naming and removed confirmation pop-up#800
Open
Chapoly1305 wants to merge 2 commits intotorakiki:masterfrom
Open
Feat: Auto output directory naming and removed confirmation pop-up#800Chapoly1305 wants to merge 2 commits intotorakiki:masterfrom
Chapoly1305 wants to merge 2 commits intotorakiki:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces improvements to the handling of output directories in the PDFsam application, focusing on better user experience and robustness when specifying or creating output folders. The main enhancements include a new request class for setting output directories, improved UI feedback when a directory will be created, automatic directory creation if it does not exist, and consistent handling across multiple tools.
As illustrated, when target directory is not existing, a green hint will be given. At run, no more pop-up will be given, improving continuous user experience.
Tested on macOS.
Key changes:
Output Directory Handling and API:
SetOutputDirectoryRequestrecord inorg.pdfsam.model.uito encapsulate requests for setting output directories, including support for fallback behavior and utility methods for generating directory names based on input files.SingleSelectionPaneto broadcast a fallback output directory request when a PDF is loaded, ensuring downstream components can respond appropriately. [1] [2]UI/UX Enhancements:
BrowsableOutputDirectoryFieldto display an info label when the specified output directory does not exist, informing the user that the folder will be created. [1] [2]DestinationPaneUI when using aBrowsableOutputDirectoryField.Robustness and Consistency:
BrowsableOutputDirectoryFieldto automatically create the output directory if it does not exist, and to handle errors gracefully with user feedback.SplitTool,SplitByBookmarksTool,SplitBySizeTool) to instantiateBrowsableOutputDirectoryFieldwith the tool ID for consistent event handling and tool binding. [1] [2] [3]These changes collectively improve the reliability and user-friendliness of output directory selection across the application.