Skip to content

More initializers, and updated playground application - #11

Merged
0xWDG merged 3 commits into
mainfrom
initializers-playground-improvements
Oct 6, 2025
Merged

More initializers, and updated playground application#11
0xWDG merged 3 commits into
mainfrom
initializers-playground-improvements

Conversation

@0xWDG

@0xWDG 0xWDG commented Oct 6, 2025

Copy link
Copy Markdown
Owner

No description provided.

@0xWDG
0xWDG requested a review from Copilot October 6, 2025 17:31
@0xWDG 0xWDG self-assigned this Oct 6, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds more initialization options for the DynamicUI struct and updates the playground application to showcase the framework across multiple platforms.

  • Adds new @Binding-based initializers for DynamicUI that provide a more SwiftUI-native approach to handling component state changes
  • Refactors existing views to use a new binding-based component handling mechanism instead of callback functions
  • Expands the playground application to support watchOS alongside existing platforms

Reviewed Changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

File Description
Sources/DynamicUI/DynamicUI.swift Adds new binding-based initializers and maintains legacy callback support through a bridge
Sources/DynamicUI/Views/*.swift Updates all dynamic view components to use the new binding-based component assignment
README.md Documents the new API with examples and adds legacy usage section
Playground/* Adds watchOS target and updates existing playground to use new binding-based API

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread Sources/DynamicUI/DynamicUI.swift Outdated
from: json
)
}
self.error = nil

Copilot AI Oct 6, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting error to nil should happen before the JSON parsing attempt to ensure proper error state initialization. Currently, if parsing fails, the error is set but if it succeeds, the error is cleared - this creates a dependency on the order of operations.

Copilot uses AI. Check for mistakes.
Comment thread README.md Outdated
0xWDG and others added 2 commits October 6, 2025 18:33
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@0xWDG
0xWDG requested a review from Copilot October 6, 2025 17:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@0xWDG
0xWDG merged commit 43ef244 into main Oct 6, 2025
5 checks passed
@0xWDG
0xWDG deleted the initializers-playground-improvements branch October 6, 2025 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants