Skip to content

Conversation

melonamin
Copy link
Member

@melonamin melonamin commented Jun 8, 2025

Add Configuration Editor UI and Improve Settings Organization

Summary

This PR introduces a dedicated Configuration Editor tab in the Settings window and reorganizes the configuration-related UI elements
for better user experience. The editor provides a visual interface for managing SwiftKey's YAML configuration with real-time
validation, undo/redo support, and import/export capabilities.

Changes

🎨 UI Reorganization

  • Moved configuration file management from General tab to dedicated Configuration Editor tab

    • Removed configuration file section from GeneralSettingsView (lines 37-117)
    • Relocated all config-related UI elements to ConfigEditorSettingsView
  • Improved Configuration Editor layout

    • Moved action buttons from header to bottom toolbar for better accessibility
    • Placed configuration file path display at the bottom with "Change" button nearby
    • Added "Modified" indicator to tree view header (right-aligned) for clear change tracking
    • Reduced excessive bottom padding for more compact UI

🔧 Code Improvements

  • Fixed ConfigManager dependency injection

    • Implemented wrapper view pattern in ConfigEditorSettingsView and ConfigEditorView to properly inject ConfigManager into
      @StateObject
    • Fixed preview providers to use ConfigManager.create() without parameters
  • Eliminated code duplication

    • Extracted importConfiguration logic to ConfigEditorViewModel to eliminate duplication between views
    • Created shared findItem extension on [MenuItem] array in AppModel.swift
    • Updated MenuTreeView and ValidationIssuesView to use the shared extension

.
Signed-off-by: Alex Mazanov <[email protected]>
.
Signed-off-by: Alex Mazanov <[email protected]>
.
Signed-off-by: Alex Mazanov <[email protected]>
.
Signed-off-by: Alex Mazanov <[email protected]>
.
Signed-off-by: Alex Mazanov <[email protected]>
.
Signed-off-by: Alex Mazanov <[email protected]>
@melonamin melonamin changed the title Configuration UI Add Configuration Editor UI and Improve Settings Organization Jun 9, 2025
Signed-off-by: Alex Mazanov <[email protected]>
@melonamin melonamin merged commit 2c227d5 into main Jun 9, 2025
8 checks passed
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