Content-Length: 287860 | pFad | http://github.com/angular/angular/pull/60791

9A refactor: use relative FieldPathNodes by mmalerba · Pull Request #60791 · angular/angular · GitHub
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

refactor: use relative FieldPathNodes #60791

Open
wants to merge 6 commits into
base: prototype/signal-forms
Choose a base branch
from

Conversation

mmalerba
Copy link
Contributor

@mmalerba mmalerba commented Apr 8, 2025

Switch apply behavior to create a brand new root path whenever a new schema is applied. This effectively changes our FieldPathNode concept from an absolute path to a relative path.

To record how the relative path nodes are connected, introduce a rootPaths map to each logic node, and when we apply, copy all roots from the sub-schema to the root of the current schema. This results in the top-level schema having a mapping to all roots under it, allowing it to construct the full absolute path.

Switch `apply` behavior to create a brand new root path whenever a new
schema is applied. This effectively changes our `FieldPathNode` concept
from an absolute path to a relative path.

To record how the relative path nodes are connected, introduce a
`rootPaths` map to each logic node, and when we `apply`, copy all roots
from the sub-schema to the root of the current schema. This results in
the top-level schema having a mapping to all roots under it, allowing it
to construct the full absolute path.

Note: this breaks the current resolve logic, resolve needs to be
rewritten to understand the new path structure.
Adds a method to merge one logic node into another. This allows them to
be built up separaterly and then joined, instead of always applying
rules to the same logic instance.
@mmalerba mmalerba marked this pull request as ready for review April 12, 2025 20:58
@pullapprove pullapprove bot requested a review from AndrewKushnir April 12, 2025 20:58
@mmalerba mmalerba requested review from kirjs and alxhub and removed request for AndrewKushnir April 12, 2025 20:58
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








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/angular/angular/pull/60791

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy