feat: Import Configuration Feature (v1.2.0)#12
Merged
Conversation
added 4 commits
December 8, 2025 13:36
- Add ImportService for file selection with NSOpenPanel - Add FormatParser for JSON/Plist parsing with folder support - Add MockImportService for testing - Extend AppError with import-specific error types - Add importConfiguration() method to FavoritesViewModel - Add Import button to toolbar with ⌘I keyboard shortcut - Support recursive folder structure import - Auto-detect file format from extension - Replace all existing favorites on import Implements #8
- Add ImportJSONView with TextEditor for copy/paste JSON import - Split import into two methods: - importJSONString() for JSON copy/paste (⌘I) - importPlistFile() for Plist file selection (⌘⇧I) - Fix Plist parser to handle fragments without XML headers - Auto-wrap fragments in proper Plist structure - Support Intune export format (fragments) - Add parseJSONString() to FormatParser - Add Import JSON button to toolbar (⌘I) - Add Import Plist button to toolbar (⌘⇧I) - Refactor shared import logic into performImport() - Add sheet presentation for JSON import dialog Fixes Plist import issue with Intune exports Related to #8
- Change TextEditor from minHeight: 300 to fixed height: 250 - Reduce dialog height from 500 to 480 - Ensures buttons are fully visible and not cut off
- Add comprehensive CHANGELOG entry for v1.2.0 - Document JSON copy/paste import (⌘I) - Document Plist file import (⌘⇧I) - Explain Plist fragment support for Intune exports - Add import section to README with use cases - List all technical changes and new components - Update numbering in How To Use section Closes #8
9 tasks
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.
Import Configuration Feature (v1.2.0)
🎯 Overview
Implements Issue #8: Import existing JSON and Plist configuration files into the app.
This PR adds comprehensive import functionality with two distinct methods optimized for different use cases:
✨ Features
JSON Import (Copy/Paste)
ImportJSONViewwith TextEditor dialogPlist Import (File Selection)
General Import Features
🔧 Technical Implementation
New Files
ImportService.swift- NSOpenPanel file selection serviceFormatParser.swift- JSON/Plist parsing with fragment supportImportJSONView.swift- SwiftUI dialog for JSON pasteMockImportService.swift- Test mock for unit testingModified Files
AppError.swift- 3 new error types (fileReadFailed, importInvalidFormat, importUnsupportedFormat)FavoritesViewModel.swift- Import logic with two entry pointsContentView.swift- Two import buttons in toolbar with shortcutsArchitecture
🧪 Testing
Manual Testing Completed
Code Quality
📝 Documentation
🎨 UI/UX
Import JSON Dialog
Toolbar Buttons
doc.textSF Symbol (⌘I)doc.badge.arrow.upSF Symbol (⌘⇧I)📊 Statistics
🔗 Related
🚀 Next Steps
After merge:
Ready for review and merge! ✅