* Initial Reconciler using visitor pattern
* Preliminary static HTML renderer using the new reconciler
* Add environment
* Initial DOM renderer
* Nearly-working and simplified reconciler
* Working reconciler for HTML/DOM renderers
* Rename files, and split code across files
* Add some documentation and refinements
* Remove GraphRendererTests
* Initial layout engine (only implemented for the TestRenderer)
* Layout engine for the DOM renderer
* Refined layout pass
* Revise positioning and restoration of position styles on .update
* Re-add Optional.body for StackReconciler-based renderers
* Add text measurement
* Add spacing to StackLayout
* Add benchmarks to compare the stack/fiber reconcilers
* Fix some issues created for the StackReconciler, and add update benchmarks
* Add BenchmarkState.measure to only calculate the time to update
* Fix hang in update shallow benchmark
* Fix build errors
* Address build issues
* Remove File.swift headers
* Rename Element -> FiberElement and Element.Data -> FiberElement.Content
* Add doc comment explaining unowned usage
* Add doc comments explaining implicitly unwrapped optionals
* Attempt to use Swift instead of JS for applying mutations
* Fix issue with not applying updates to DOMFiberElement
* Add comment explaining manual implementation of Hashable for PropertyInfo
* Fix linter issues
* Remove dynamicMember label from subscript
* Re-enable carton test
* Attempt GTK fix
* Add option to disable layout in the FiberReconciler
* Re-enable TokamakDemo with StackReconciler
* Restore CI config
* Restore CI config
* Add file headers and cleanup structure
* Add 'px' to font-size in test outputs
* Remove extra newlines
* Keep track of 'elementChildren' so children are positioned in the correct order
* Use a ViewVisitor to pass the correct View type to the proposeSize function
* Add support for view modifiers
* Add frame modifier to demonstrate modifiers
* Fix TestRenderer
* Remove unused property
* Fix doc comment
* Fix linter issues and refactor slightly
* Fix benchmark builds
* Attempt to fix benchmarks
* Fix sibling layout issues
* Restore original demo
* Address review comments
* Remove maxAxis and fitAxis properties
* Use switch instead of ternary operators
* Add more documentation to layout steps
* Resolve reconciler issue due to alternate child not being cleared/released
* Apply suggestions from code review
Co-authored-by: Max Desiatov <max@desiatov.com>
* Reuse Text resolution code.
* Add more documentation
* Fix typo
* Use structs for LayoutComputers
* Update AlignmentID demo
* Fix weird formatting
Co-authored-by: Max Desiatov <max@desiatov.com>
Had to drop support for Swift 5.4/5.5 and macOS 5.6 jobs, see https://github.com/TokamakUI/Tokamak/pull/475#issuecomment-1092662828 for more details.
Linux builds and `codecov` job were updated to use nightly Swift, which have crashes reproducible in 5.6.0 release fixed.
Also applied a few formatting changes with the latest SwiftFormat.
* Make actual use of `rootEnvironment` passed into functions, falling back to `.defaultEnvironment`
* Add `.merge(_:)`/`.merging(_:)` to `EnvironmentValues`
* Merge `.defaultEnvironment` with `rootEnvironment`
* Add `@_spi(TokamakCore)` protection for `EnvironmentValues.merge(_:)`/`.merging(_:)`
Most of the changes are related to the use of OpenCombineShim (available in upstream OpenCombine now) instead of CombineShim. But there is also a new test added during the investigation of #367, where an app is rendered end-to end, which is a good way to expand our test suite I think.
* Use immediate scheduler in TestRenderer
This allows running our test suite on WASI too, which doesn't have Dispatch and also can't wait on XCTest expectations. Previously none of our tests (especially runtime reflection tests) ran on WASI.
* Run `carton test` and `carton bundle` in separate jobs
* Bump year in the `LICENSE` file
* Add reconciler stress tests for elaborate testing
* Move default App implementation to TestRenderer
* Use OpenCombineShim instead of CombineShim
Both of these issues are fixes to `CustomStringConvertible` implementations that either directly or indirectly called themselves via `String(describing:)`.
This based off the `buttonstyles` branch by @Outcue.
Initially it didn't work because mounted host views didn't propagate their environment on updates. This is now fixed by adding `updateEnvironment` function on `MountedElement` base class and calling it in the initializer. Manual environment updates are no longer needed in `makeMounted...` factory functions. `makeMountedApp` is no longer needed at all and `MountedApp` initializer can be used directly then.
We can't run our basic reconciler tests in a WASI environment yet because `XCTestExpectation` is not available on WASI as it relies on the presence of `Dispatch`. We can run these tests on macOS though, and even on Linux in the future when Swift 5.3 is available for Linux on GitHub Actions.
My current OpenCombine fork doesn't build on macOS and it was much easier to add a new `CombineShim` module that uses native Combine there.
* Text styles and Environment setup for View font
* Text modifiers and demo
* Format Source files
* Fix font-size and add font-family when no Font is specified
* Add TextStyle
* PR fixes
* Format files
* Add note about Text modifiers