-
Notifications
You must be signed in to change notification settings - Fork 373
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
WIP: change path to JSON pointer #2168
Conversation
✅ Deploy Preview for jsonforms-examples ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
9a40570
to
c2adb17
Compare
c2adb17
to
63934f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just some minor comments
packages/core/src/i18n/i18nUtil.ts
Outdated
@@ -159,7 +159,7 @@ export const deriveLabelForUISchemaElement = ( | |||
const i18nKeyPrefix = getI18nKeyPrefixBySchema(undefined, uischema); | |||
const i18nKey = | |||
typeof i18nKeyPrefix === 'string' | |||
? `${i18nKeyPrefix}.label` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we want to keep the dots, right?
packages/core/src/util/path.ts
Outdated
let p2 = path2; | ||
if (!isEmpty(path2) && !path2.startsWith('[') && !path2.startsWith('/')) { | ||
p2 = '/' + path2; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove the square brackets handling here. They are not a valid feature of JSON pointers.
packages/core/src/util/path.ts
Outdated
if (isEmpty(path1)) { | ||
return p2; | ||
} else if (isEmpty(path2)) { | ||
return p1; | ||
return path1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will path2
which is handed in never start with a /
already? The compose
should have a JSDoc clearly declaring in which format it expects the handed over paths. Looking at this code it seems the path2
is rather a path segment.
63934f5
to
caf7383
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please adapt migration document with a description of the breaking changes and how to fix them
8bd14c2
to
e9946ef
Compare
Superseded by rebased and extended PR #2346 . |
closes #2153