Major overhaul: builder DSL, expanded views, and comprehensive tests#3
Merged
Conversation
- Bump to iOS 17+ / macOS 14+ / Swift 5.9, Kingfisher 8.x - Fix bugs: copy-paste errors in ViewFactory, nil defaults for ViewProperties, failable Color hex init - Add 8 new view types: Button, NavigationStack, NavigationLink, Toggle, TextField, Color, Grid, GridRow - Add 10+ new modifiers: backgroundColor, cornerRadius, clipShape, opacity, shadow, rotation, blur, grayscale, maxWidth/maxHeight, accessibility - Add action callback system (onAction) for interactive elements - Add @resultBuilder DSL for building JSON from Swift code (reverse conversion) - Add convenience init(jsonString:), structured error handling with descriptive messages, recursion depth limit - Enrich example app with 7 sample screens including live JSON editor with syntax highlighting - Add 49 unit tests across 5 test files - Update CI to run tests, update README with full API reference Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove unused View+Extensions.swift (embedInAnyView) - Add @unchecked Sendable to ViewMaterial, ViewProperties, Values - Make all model properties public for external consumers - Make ViewMaterial.CodingKeys public - Use https for picsum.photos URLs in example - Add SwiftUI-to-JSON parser sample to example app Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- ErrorHandlingTests: malformed JSON, type mismatches, edge cases, deep nesting, unicode, special characters - DepthLimitTests: max depth constant, depth parameter, very deep nesting safety, action callback threading - NodeModifierTests: all 18 modifier methods, deep chaining, overwriting, edge cases (zero/negative values) - NodeTypeTests: all container and leaf node types, interactive nodes, alignment/spacing, default values - JSONExportTests: single/multi root, pretty print, sorted keys, complex nested round-trip, modifier preservation - ViewFactoryTests: all 21 view type builders, modifier application, nil type handling, interactive views with callbacks Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add 6 macOS screenshots: Basic, Styling, Interactive, SwiftUI-to-JSON editor, Live JSON editor, Builder DSL round-trip - Rewrite README with badges, feature highlights, screenshot gallery, organized property tables, DSL reference, and error handling docs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add comprehensive CHANGELOG documenting all breaking changes, new features, fixes, and improvements in 1.0.0 - Add .swiftpm/ to .gitignore and remove from tracking Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Overview
This is a significant release (v1.0.0) with major improvements to the library's architecture, features, and test coverage.
Key Changes
New Features
NodeBuilder,NodeModifiers,NodeTypes)JSONExport)StatefulViews)Architecture Improvements
ViewFactoryandModifierFactoryfor better extensibilityJSONDrivenUIErrorJSONDataViewwith better state managementTesting & Documentation
Project Maintenance