-
Notifications
You must be signed in to change notification settings - Fork 75
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
chore: Retrieving help texts from nb.json instead of JSON schemas #14420
chore: Retrieving help texts from nb.json instead of JSON schemas #14420
Conversation
📝 WalkthroughWalkthroughThis pull request involves systematic modifications across multiple frontend components, primarily focusing on removing Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #14420 +/- ##
=======================================
Coverage 95.64% 95.64%
=======================================
Files 1874 1874
Lines 24354 24359 +5
Branches 2800 2800
=======================================
+ Hits 23294 23299 +5
Misses 799 799
Partials 261 261 ☔ View full report in Codecov by Sentry. |
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
frontend/packages/ux-editor/src/components/config/editModal/EditNumberValue.tsx (1)
34-34
: Consider improving type safety when converting propertyKey to string.While the implementation is correct, the type conversion of
propertyKey
to string could be made more explicit:- helpText={componentPropertyHelpText(String(propertyKey))} + helpText={componentPropertyHelpText(propertyKey.toString())}This makes the intention clearer and is more idiomatic in TypeScript.
Also applies to: 51-51
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
frontend/language/src/nb.json
(1 hunks)frontend/packages/ux-editor/src/components/Properties/DataModelBindings.tsx
(0 hunks)frontend/packages/ux-editor/src/components/config/FormComponentConfig.tsx
(1 hunks)frontend/packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditBinding/EditBinding.test.tsx
(0 hunks)frontend/packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditBinding/EditBinding.tsx
(0 hunks)frontend/packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditBinding/SelectDataFieldBinding.tsx
(3 hunks)frontend/packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditDataModelBinding.test.tsx
(0 hunks)frontend/packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditDataModelBinding.tsx
(0 hunks)frontend/packages/ux-editor/src/components/config/editModal/EditNumberValue.tsx
(3 hunks)frontend/packages/ux-editor/src/components/config/editModal/EditStringValue.tsx
(3 hunks)
💤 Files with no reviewable changes (5)
- frontend/packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditDataModelBinding.test.tsx
- frontend/packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditDataModelBinding.tsx
- frontend/packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditBinding/EditBinding.test.tsx
- frontend/packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditBinding/EditBinding.tsx
- frontend/packages/ux-editor/src/components/Properties/DataModelBindings.tsx
✅ Files skipped from review due to trivial changes (1)
- frontend/language/src/nb.json
🔇 Additional comments (5)
frontend/packages/ux-editor/src/components/config/editModal/EditDataModelBinding/EditBinding/SelectDataFieldBinding.tsx (2)
13-13
: LGTM: Hook import added correctly.The import of
useComponentPropertyHelpText
hook is properly placed with other hook imports.
37-37
: LGTM: Help text retrieval migrated to use the new hook.The migration from static
helpText
prop to dynamic retrieval usinguseComponentPropertyHelpText
is implemented correctly. The hook is properly initialized and used with the correct key formatdata_model_bindings.${bindingKey}
.Also applies to: 60-60
frontend/packages/ux-editor/src/components/config/editModal/EditStringValue.tsx (1)
9-9
: LGTM: String value editing component updated to use the new help text system.The changes correctly implement the new help text retrieval system:
- Hook import added
- Hook properly initialized
- Help text dynamically retrieved using the property key
Also applies to: 29-29, 45-45
frontend/packages/ux-editor/src/components/config/FormComponentConfig.tsx (1)
48-48
: LGTM: Properties destructuring simplified.The removal of
validFileEndings
from destructuring is consistent with the migration to the new help text system.frontend/packages/ux-editor/src/components/config/editModal/EditNumberValue.tsx (1)
9-13
: LGTM: Hook imports properly organized.The imports are correctly grouped and organized.
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.
LGTM 👍 🚀
Description
Retrieving help texts from nb.json instead of JSON schemas
Related Issue(s)
?
helptext buttons where needed onUtforming
page #13983Verification
Documentation
Summary by CodeRabbit
New Features
preselectedOptionIndex
in Norwegian language fileRefactor
helpText
prop from multiple components related to data model bindings and property editinguseComponentPropertyHelpText
hook to dynamically generate help textDocumentation