refactor(swift): Introduce DataContext type - #2247
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces DataContext and FunctionHandler to manage scope and binding resolution during rendering, refactoring SurfaceViewModel to delegate dynamic value evaluation to this new context. It also updates the FunctionImplementation protocol to accept DataContext in its evaluate method and adds corresponding unit tests. The review feedback suggests optimizing dictionary resolution in DataContext to preserve key order using OrderedDictionary directly, and removing an unused Combine import.
pinieb
force-pushed
the
swift-data-context
branch
from
August 12, 2026 23:01
255e80b to
6373cee
Compare
…nto swift-data-context
pinieb
marked this pull request as ready for review
August 12, 2026 23:02
pinieb
force-pushed
the
swift-data-context
branch
from
August 13, 2026 21:35
80ec7c6 to
6596afd
Compare
jacobsimionato
approved these changes
Aug 17, 2026
Collaborator
|
I mailed two small follow-up fixes: |
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.
Description
To bring the Swift renderer into closer alignment with the blueprints and to prepare for function support, this change introduces the
DataContexttype and updates theFunctionImplementationprotocol to take aDataContextas a parameter to itsevaluate()function.