Add named signature-setting presets (+ XDG-aware config location)#360
Open
Add named signature-setting presets (+ XDG-aware config location)#360
Conversation
Resolves conflict in BasicSignerOptions.java: keeps the new loadFromStore(store, includeMainConfigOnly) refactor from this branch and applies master's DEFVAL_APPEND / DEFVAL_STOREPWD explicit-default fallbacks on top. Migrates two BasicSignerOptionsTest tests added on master to use PropertyStoreFactory.mainConfig() now that the PropertyProvider singleton is gone. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Adds named signature-setting presets to the JavaFX UI and moves per-user config to a platform-native location.
Closes #252 (config-file location). Presets had no dedicated issue — requested by a user who regularly switches between several signing configurations.
What's new
~/.JSignPdfinto:$XDG_CONFIG_HOME/jsignpdf/(fallback~/.config/jsignpdf/)%APPDATA%\JSignPdf\~/Library/Application Support/JSignPdf/JSIGNPDF_CONFIG_DIRenv var.~/.JSignPdfexists, it's copied to<cfg>/config.properties. The legacy file is left in place so downgrades keep working.Internals
PropertyProviderlost its singleton;PropertyStoreFactoryhands out the cached main-config store and fresh preset stores (preset-<epoch-ms>.propertieswith collision retry).BasicSignerOptionsgotloadFromPreset/storeToPresetalongside the existingloadOptions/storeOptions, gated by a shared flag so the main-config path and preset path don't drift.VisibleSignatureCoordinatorcentralises placement ↔ signing-VM sync (previously duplicated inline in two controller methods) so the visible-signature rectangle survives the save → load round-trip.PropertyStoreFactory.resetAll().Docs
design-doc/3.0.0-presets-feature.md.Test plan
mvn test— 160/160 pass (106 existing + 54 new acrossConfigLocationResolver,PropertyStoreFactoryReset,PresetManager,PresetValidation,VisibleSignatureCoordinator).~/.JSignPdf): new config dir created, combo shows No presets saved.~/.JSignPdf→ new<cfg>/config.propertiesappears, legacy file untouched.