Skip to content

Feat: Auto output directory naming and removed confirmation pop-up#800

Open
Chapoly1305 wants to merge 2 commits intotorakiki:masterfrom
Chapoly1305:auto-folder-name
Open

Feat: Auto output directory naming and removed confirmation pop-up#800
Chapoly1305 wants to merge 2 commits intotorakiki:masterfrom
Chapoly1305:auto-folder-name

Conversation

@Chapoly1305
Copy link

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.

Screenshot 2025-11-13 at 1 26 05 PM

Tested on macOS.

Key changes:

Output Directory Handling and API:

  • Added a new SetOutputDirectoryRequest record in org.pdfsam.model.ui to encapsulate requests for setting output directories, including support for fallback behavior and utility methods for generating directory names based on input files.
  • Updated SingleSelectionPane to broadcast a fallback output directory request when a PDF is loaded, ensuring downstream components can respond appropriately. [1] [2]

UI/UX Enhancements:

  • Enhanced BrowsableOutputDirectoryField to display an info label when the specified output directory does not exist, informing the user that the folder will be created. [1] [2]
  • The info label is now added to the DestinationPane UI when using a BrowsableOutputDirectoryField.

Robustness and Consistency:

  • Modified BrowsableOutputDirectoryField to automatically create the output directory if it does not exist, and to handle errors gracefully with user feedback.
  • Updated tool modules (SplitTool, SplitByBookmarksTool, SplitBySizeTool) to instantiate BrowsableOutputDirectoryField with 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.

@Chapoly1305 Chapoly1305 changed the title Auto folder name Feat: Auto output directory naming and removed confirmation pop-up Nov 13, 2025
@torakiki torakiki self-requested a review November 14, 2025 08:07
@torakiki torakiki self-assigned this Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants