Skip to content

feat: separate auto-export settings and redesign settings window#54

Merged
amemya merged 2 commits into
mainfrom
feat/separate-auto-export-settings
Jun 12, 2026
Merged

feat: separate auto-export settings and redesign settings window#54
amemya merged 2 commits into
mainfrom
feat/separate-auto-export-settings

Conversation

@amemya

@amemya amemya commented Jun 10, 2026

Copy link
Copy Markdown
Owner
  • Extract UI components (FrameSettingsPanel, MetadataSettingsPanel, ToggleInput)
  • Add "Save as Auto-Export Default" button to main view, removing automatic background saving
  • Redesign Settings window with a tabbed sidebar and increase initial size to 800x600
  • Add EXIF override capability for Digital profiles with OverrideExif toggle
  • Improve settings type safety, fix CSS variable typos, and clean up inline styles
  • Add toast notification for saving settings

resolved #31

- Extract UI components (FrameSettingsPanel, MetadataSettingsPanel, ToggleInput)
- Add "Save as Auto-Export Default" button to main view, removing automatic background saving
- Redesign Settings window with a tabbed sidebar and increase initial size to 800x600
- Add EXIF override capability for Digital profiles with `OverrideExif` toggle
- Improve settings type safety, fix CSS variable typos, and clean up inline styles
- Add toast notification for saving settings
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b0eab388-dc47-4886-9598-bfa7db51b00c

📥 Commits

Reviewing files that changed from the base of the PR and between 80aad2a and f739517.

📒 Files selected for processing (1)
  • frontend/src/SettingsWindow.tsx

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • 設定をタブ式(一般/フレーム/メタデータ)に再設計し、フレーム・メタデータ用の専用パネルと切替入力を追加
    • メタデータ表示/非表示の個別切替と「Save as Auto-Export Default」保存機能を追加
    • メタデータ項目(カメラ/レンズ/焦点距離/絞り/シャッタースピード/ISO/フィルム等)を拡張
  • UI/UX Improvements

    • 設定ウィンドウを大きく(800×600)して操作性向上
    • ボタンホバー色やナビボタンのスタイル、トースト表示アニメーションを調整

Walkthrough

フロントエンドでEXIF型・可視性ヘルパーと再利用可能UIを導入し、設定ウィンドウをパネル化してSettings保存フローと「Save as Auto-Export Default」を追加。バックエンドのSettings構造もEXIF項目とOverrideExifで拡張しました。

Changes

メタデータ設定UIと自動書き出しデフォルト保存

Layer / File(s) Summary
型定義と設定データモデル
frontend/src/types.ts, settings.go
ExifDataMetadataVisibilityVISIBILITY_KEYSsettingsKey/toVisibility/applyVisibilityを追加。Go側Settingsにカメラ/レンズ/露出/フィルム関連フィールドとOverrideExifを拡張。
ToggleInput再利用コンポーネント
frontend/src/components/ToggleInput.tsx
表示切替ボタン(Eyeアイコン)と条件付きテキスト入力を持つToggleInputを追加。アクセシビリティ属性とhiddenクラス付与を含む。
フレーム・メタデータ設定パネル
frontend/src/components/FrameSettingsPanel.tsx, frontend/src/components/MetadataSettingsPanel.tsx
FrameSettingsPanelはアスペクト比(custom時にW/H入力)・向き・縦アラインメント・区切りを管理。MetadataSettingsPanelはプロファイル(digital/film)に応じたToggleInput群とデフォルト優先のEXIF上書きオプションを条件表示。
SettingsWindow再実装
frontend/src/SettingsWindow.tsx
設定をサイドバー+タブ(general/frame/metadata)で表示。各パネルのstateを組み直してapplyVisibility適用後にAppAPI.SaveSettingsで保存、成功時にsettings_saved発行とトースト表示。
App.tsx抽出と自動書き出しデフォルト保存
frontend/src/App.tsx
EXIF型/可視性ヘルパーとパネルコンポーネントをimportに切替。process_fileでのEXIF上書き選定をoverrideExif/pick()で統一。handleSaveAutoExportDefaultを追加しUI状態をSettingsに保存。サイドバーに該当ボタン追加。
スタイルと設定ウィンドウサイジング
app.go, frontend/src/App.css
設定ウィンドウサイズを600x500から800x600に変更。--bg-button-hoverCSS変数追加、トーストキーフレーム差し替え、.nav-btnの基本/hover/activeスタイルを追加。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • amemya/ExifFrame#53: OpenSettingsWindowのウィンドウオプション変更と設定ウィンドウUI整備で直接関係します.
  • amemya/ExifFrame#33: profile/visibility と EXIF 表示制御の実装で類似箇所を拡張しています.
  • amemya/ExifFrame#20: フレームのアスペクト比・向きUIを分離した過去の実装と同一領域の変更です.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PRタイトルは、自動書き出し設定の分離と設定ウィンドウの再設計という主要な変更内容を明確に要約している。
Description check ✅ Passed PR説明は、コンポーネント抽出、「Save as Auto-Export Default」ボタンの追加、設定ウィンドウの再設計、OverrideExif機能、CSS改善、トースト通知など、変更内容と関連している。
Linked Issues check ✅ Passed PR#54は#31の要件を完全に満たしており、自動書き出し設定と手動設定を分離し、「Save as Auto-Export Default」ボタンで自動設定を管理できるようになった。
Out of Scope Changes check ✅ Passed 全ての変更は#31の要件(自動書き出し設定の分離)に関連しており、UIコンポーネント抽出、設定管理の改善、ウィンドウ再設計など、スコープ内の変更である。

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/separate-auto-export-settings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/src/components/MetadataSettingsPanel.tsx`:
- Around line 50-65: The JSX in MetadataSettingsPanel uses many inline style
objects for the wrapper div, label, input and small elements (condition under
profile==='digital' && isDefaultMode && setOverrideExif and props
overrideExif/setOverrideExif); extract those inline styles into semantic CSS
classes (e.g., .metadata-panel, .metadata-label, .metadata-checkbox,
.metadata-help), add a corresponding .css or .module.css file, import it into
MetadataSettingsPanel.tsx, replace the style={...} props with className
attributes, and remove the inline style objects to keep markup clean and
reusable.

In `@frontend/src/SettingsWindow.tsx`:
- Line 10: SettingsWindow.tsx defines TOAST_DURATION_MS = 2500 while App.tsx
uses TOAST_DURATION_MS = 3000; pick a single duration and make both modules use
that same value (either by updating one constant to match the other or by
extracting a shared exported constant from a central module and importing it
into both SettingsWindow.tsx and App.tsx) so TOAST_DURATION_MS is consistent
across the app.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b958e769-8b43-48b3-9382-cd69a7aa8d4b

📥 Commits

Reviewing files that changed from the base of the PR and between e7ec176 and 80aad2a.

📒 Files selected for processing (9)
  • app.go
  • frontend/src/App.css
  • frontend/src/App.tsx
  • frontend/src/SettingsWindow.tsx
  • frontend/src/components/FrameSettingsPanel.tsx
  • frontend/src/components/MetadataSettingsPanel.tsx
  • frontend/src/components/ToggleInput.tsx
  • frontend/src/types.ts
  • settings.go

Comment thread frontend/src/components/MetadataSettingsPanel.tsx
Comment thread frontend/src/SettingsWindow.tsx Outdated
@amemya amemya merged commit c92f013 into main Jun 12, 2026
1 check passed
@amemya amemya deleted the feat/separate-auto-export-settings branch June 12, 2026 01:53
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.

自動書き出し用の設定の分離

1 participant