Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for preferences, @StateObject, @EnvironmentObject, and custom DynamicProperty types #501

Merged
merged 28 commits into from Jul 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
170eedf
Pass preferences up the Fiber tree
carson-katri Jun 28, 2022
2d1ae67
Merge branch 'main' of github.com:TokamakUI/Tokamak into fiber/dynami…
carson-katri Jun 28, 2022
f88a382
Working preferences (except for backgroundPreferenceValue)
carson-katri Jun 29, 2022
5dee211
Initial StateObject support
carson-katri Jun 29, 2022
f4b7b00
Fix layout caching bug
carson-katri Jun 29, 2022
60e9fc0
Support StateObject/EnvironmentObject/custom DynamicProperty
carson-katri Jun 29, 2022
03573fc
Add doc comments for bindProperties and updateDynamicProperties
carson-katri Jun 29, 2022
823f8b3
Use immediate scheduling in static HTML and test renderers
carson-katri Jun 29, 2022
04ed169
Add preferences test
carson-katri Jun 29, 2022
819b9cf
Add state tests and improve testing API
carson-katri Jun 30, 2022
510584c
Attempt to fix tests
carson-katri Jun 30, 2022
44a61d6
Fix preference tests
carson-katri Jun 30, 2022
e6a6e19
Attempt to fix tests when Dispatch is unavailable
carson-katri Jun 30, 2022
aa5ed1e
#if out on os(WASI)
carson-katri Jun 30, 2022
59c4cf9
Add check for WASI to test
carson-katri Jun 30, 2022
5c6a380
Add check for WASI to TestViewProxy
carson-katri Jun 30, 2022
392fd1b
#if out of import Dispatch when os == WASI
carson-katri Jun 30, 2022
812f3e0
Remove all Dispatch code
carson-katri Jun 30, 2022
041f050
Remove address from debugDescription
carson-katri Jun 30, 2022
28e6583
Move TestViewProxy to TokamakTestRenderer
carson-katri Jun 30, 2022
f2720fa
Add memory address to Fiber.debugDescription
carson-katri Jun 30, 2022
6ed1903
Fix copyright year
carson-katri Jun 30, 2022
71d8e0f
Add several missing types to Core.swift
carson-katri Jun 30, 2022
d36bfca
Add missing LayoutValueKey to Core.swift
carson-katri Jul 2, 2022
ca10bc2
Fix issues with view trait propagation
carson-katri Jul 2, 2022
9dfa827
Enable App/SceneStorage in DOMFiberRenderer
carson-katri Jul 4, 2022
46f5db4
Address review comments
carson-katri Jul 5, 2022
11c7a98
Revise preference implementation
carson-katri Jul 5, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -17,12 +17,13 @@

extension FiberReconciler.Fiber: CustomDebugStringConvertible {
public var debugDescription: String {
let memoryAddress = String(format: "%010p", unsafeBitCast(self, to: Int.self))
if case let .view(view, _) = content,
let text = view as? Text
{
return "Text(\"\(text.storage.rawText)\")"
return "Text(\"\(text.storage.rawText)\") (\(memoryAddress))"
}
return typeInfo?.name ?? "Unknown"
return "\(typeInfo?.name ?? "Unknown") (\(memoryAddress))"
}

private func flush(level: Int = 0) -> String {
Expand Down