Unify path handling to consistenly use JSON Pointer#2346
Open
lucas-koehler wants to merge 7 commits intomasterfrom
Open
Unify path handling to consistenly use JSON Pointer#2346lucas-koehler wants to merge 7 commits intomasterfrom
lucas-koehler wants to merge 7 commits intomasterfrom
Conversation
✅ Deploy Preview for jsonforms-examples ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
e68d3ef to
484bec7
Compare
f20ee31 to
aef686f
Compare
aef686f to
426da2c
Compare
426da2c to
99a4590
Compare
- Rework Paths.compose to accept a JSON pointer and a variable number of unencoded segments to add - Add unit tests for Path.compose - Increase usage of Paths.compose across renderers - Remove obsolete leading slashes of segments - Allow handing in numbers (indices) to path composition - improve migration guide
99a4590 to
33d669b
Compare
sdirix
reviewed
Feb 12, 2025
| export const transformPathToI18nPrefix = (path: string): string => { | ||
| return ( | ||
| path | ||
| toLodashPath(path) |
Member
There was a problem hiding this comment.
First filter array segments, then convert to lodash path
|
|
||
| if (isEmpty(segments)) { | ||
| return path ?? ''; | ||
| export const toLodashSegments = (jsonPointer: string): string[] => { |
Member
There was a problem hiding this comment.
maybe rename to remove the lodash part?
24c8cb2 to
d86047e
Compare
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.
Unify path handling to use JSON Pointer as path format consistently. No longer use lodash paths (dot separated paths) to resolve data.
Besides unifying pointer usage, this reworks the
Paths.composeutil to accept one base json pointer and an arbitrary number of segments to append. These can also be number now that are automatically converted.closes #2153
supersedes #2168