feat: Complete Settings UI improvements (PR #4/8) - Tab navigation and tags editor#72
Merged
Conversation
Apply shared KeyValueEditor component to both Settings > Environment and Terminal Details > Environment tabs for consistent UI and behavior. Changes: - Settings Environment tab: Replace inline form with KeyValueEditor - Terminal Details Environment tab: Replace inline editor with KeyValueEditor - Both tabs now use identical shared component with full-width inputs - Consistent styling with Form .formStyle(.grouped) - Proper state synchronization between KeyValueItem and EnvironmentVariable Addresses feedback #4, #7, #8, #9, #11 from implementation plan Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Split KeyValueEditor into focused components (KeyValueList + KeyValueAddForm) for better UX with separate sections for viewing and adding items. Changes: - Split KeyValueEditor.swift into 3 components: * KeyValueList - display existing items with delete * KeyValueAddForm - add new items with validation * KeyValueEditor - legacy wrapper (deprecated) - SettingsEnvironmentView improvements: * Use split components in separate sections * Add proper error handling with user-visible alerts * Fix encryption key status race condition * Remove nested Form wrapper - CardEditorEnvironmentTab improvements: * Use split components in separate sections * Add secret visibility toggle for inherited globals * Add proper error handling with alerts * Store secret values in memory for display - Add localized section headers: * "Global Environment Variables" * "Add Environment Variable" (Settings) * "Add Environment Variable" (Terminal Details) Fixes: - Secrets not being added (silent error swallowing with try?) - Encryption key status not updating after operations - Secret values not viewable in Terminal Details inherited list Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…editor This PR completes the Settings UI improvement series by: 1. Fix "Edit Global Settings" button to properly open Settings window - Replace problematic sheet/NSWindow approaches with SettingsLink - Add SettingsCoordinator for tab pre-selection - Settings now opens with Environment tab selected when accessed from Terminal Details 2. Replace custom tags editor with KeyValueEditor components - Use KeyValueList for displaying tags - Use KeyValueAddForm for adding new tags - Consistent UX with Environment variables editor - Remove obsolete state variables (newTagKey, newTagValue) 3. Complete localization for "Add Tag" string across all 40 languages Technical changes: - Created SettingsCoordinator singleton for Settings navigation coordination - Updated SettingsView to observe coordinator and respond to tab requests - Updated CardEditorEnvironmentTab to use SettingsLink with simultaneousGesture - Updated CardEditorView metadata tab to use KeyValueEditor pattern - Added sectionAddTag localization key in all 40 language files All tests passing (521 tests, 0 failures) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
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.
Summary
This PR completes the Settings UI improvement series by fixing the "Edit Global Settings" button and replacing the custom tags editor with KeyValueEditor components.
Changes
1. Fix "Edit Global Settings" Button
SettingsLinkSettingsCoordinatorsingleton for tab pre-selection2. Replace Tags Editor with KeyValueEditor
KeyValueListcomponent for displaying tagsKeyValueAddFormcomponent for adding new tagsnewTagKey,newTagValue)3. Complete Localization
editor.section.add.tag) across all 40 languagesTechnical Details
Files Created
Sources/TermQ/ViewModels/SettingsCoordinator.swift- Coordinates Settings navigationFiles Modified
Sources/TermQ/Views/CardEditorEnvironmentTab.swift- Use SettingsLink with tab coordinationSources/TermQ/Views/CardEditorView.swift- Replace custom tags UI with KeyValueEditorSources/TermQ/Views/SettingsView.swift- Observe coordinator for tab requestsSources/TermQ/Utilities/Strings.swift- Add sectionAddTag constantSources/TermQ/Resources/*/Localizable.strings(40 files) - Add translationsTesting
Manual Testing Completed ✅
Automated Testing ✅
make checkpasses (build, lint, format-check, test)Code Quality
Addresses Feedback Items
From parent plan (
.claude/plans/settings-ui-improvements-implementation.md):Related PRs
This is PR #4 of 8 in the Settings UI improvements series:
🤖 Generated with Claude Code