Skip to content

refact: screenshot settings folder - #572

Merged
florent37 merged 10 commits into
mainfrom
refact-screenshot-settings-folder
Oct 16, 2026
Merged

florent37 merged 10 commits into
mainfrom
refact-screenshot-settings-folder

Conversation

@florent37

@florent37 florent37 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Refactor screenshot & screen recording workflows and add configurable document storage support in Settings.
Users can now customize the destination folder for screenshots, screen records, and exported files via a dedicated General tab in Settings, falling back to ~/Documents/Flocon by default.

🚀 Key Changes

1. Configurable Flocon Documents Directory

  • Custom Location: Added support for configuring a custom FloconDocuments folder path instead of a hardcoded path.
  • Default Fallback: Automatically defaults to ~/Documents/Flocon if no custom path has been specified.
  • Persistence: Saved across sessions using SettingsRepository & SettingsDataSourcePrefs (flocon_documents_path key).
  • Domain Integration: Updated GetFloconDocumentPathUseCase to retrieve the configured path from SettingsRepository.

2. Native Folder Picker in Settings UI

  • Added a new General settings tab in SettingsScreen.
  • Displayed the current folder path in a styled text field with:
    • Pick... button on the right: opens a native folder selection dialog (FolderPicker, using native macOS FileDialog for directory mode and JFileChooser fallback on other platforms).
    • Save: explicitly saves manual path input.
    • Reset to default: reverts path back to ~/Documents/Flocon.
    • Open Folder: opens the folder directly in Finder / File Explorer.

3. Screenshot & Screen Recording Refactoring

  • Extracted and centralized screenshot and video recording logic into dedicated domain use cases (TakeScreenshotUseCase, StartRecordingVideoUseCase, StopRecordingVideoUseCase).
  • Connected screenshot / recording outputs and top bar actions to GetFloconDocumentPathUseCase.

🧪 Testing

  • Unit Tests: Added GetFloconDocumentPathUseCaseTest verifying fallback to default path when unset/blank and properly returning user-configured paths.
  • Directory Picker: Verified native directory picker opens and correctly sets the absolute directory path.
  • Persistence: Verified custom directory is retained across app restarts.
  • Screenshot / Record: Captured screenshots and confirmed files are saved into <FloconDocuments>/Screenshot.

@florent37
florent37 changed the base branch from main to refact-screenshot October 15, 2026 12:50
@florent37 florent37 self-assigned this Oct 15, 2026
Base automatically changed from refact-screenshot to main October 15, 2026 13:22
@florent37
florent37 enabled auto-merge (squash) October 15, 2026 14:56
Florent Champigny added 2 commits October 16, 2026 10:25
Comment thread FloconDesktop/gradle/libs.versions.toml Outdated
@florent37
florent37 merged commit e37dda2 into main Oct 16, 2026
1 check passed
@florent37
florent37 deleted the refact-screenshot-settings-folder branch October 16, 2026 12:40
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