Skip to content

Major overhaul: builder DSL, expanded views, and comprehensive tests#3

Merged
EnesKaraosman merged 5 commits into
mainfrom
claude/confident-moser
Apr 11, 2026
Merged

Major overhaul: builder DSL, expanded views, and comprehensive tests#3
EnesKaraosman merged 5 commits into
mainfrom
claude/confident-moser

Conversation

@EnesKaraosman
Copy link
Copy Markdown
Owner

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

  • Builder DSL: New fluent API for constructing UI declaratively (NodeBuilder, NodeModifiers, NodeTypes)
  • JSON Export: Convert SwiftUI views back to JSON (JSONExport)
  • Stateful Views: Support for interactive UI components (StatefulViews)
  • Expanded View Types: Added numerous new view types and modifiers

Architecture Improvements

  • Refactored ViewFactory and ModifierFactory for better extensibility
  • Improved error handling with JSONDrivenUIError
  • Enhanced JSONDataView with better state management
  • Cleaned up dead code and prepared for Swift 6 compatibility

Testing & Documentation

  • Expanded test suite from 49 to 160+ tests covering:
    • Builder functionality
    • Color extensions
    • Depth limits
    • Error handling
    • Node modifiers and types
    • View factory operations
    • Decoding/serialization
  • Updated README with examples and screenshots
  • Added comprehensive CHANGELOG

Project Maintenance

  • Updated GitHub Actions workflow
  • Updated package dependencies
  • Cleaned up workspace configuration files
  • Added example samples demonstrating new features

EnesKaraosman and others added 5 commits April 11, 2026 07:43
- 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>
@EnesKaraosman EnesKaraosman merged commit 074e0d2 into main Apr 11, 2026
1 check passed
@EnesKaraosman EnesKaraosman deleted the claude/confident-moser branch April 11, 2026 05:28
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