-
Notifications
You must be signed in to change notification settings - Fork 86
chore: set default datamodel felt #17055
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
base: main
Are you sure you want to change the base?
The head ref may contain hidden characters: "17048-default-innhold-p\u00E5-datamodellfelt"
Conversation
WalkthroughWhen a component mounts with a selected data type but no binding.field, the first available data model field is auto-selected and persisted via a new saveBinding flow; tests and Playwright helpers were updated to await and assert this asynchronous auto-selection and add post-condition checks. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant EditBinding as EditBinding.tsx
participant SelectField as SelectDataFieldBinding.tsx
participant DataModel as Data Model
User->>EditBinding: mount with dataTypeToUse (no binding.field)
activate EditBinding
EditBinding->>EditBinding: useEffect -> handleAutoSave checks
EditBinding->>DataModel: getDataModelFields(dataTypeToUse)
DataModel-->>EditBinding: field list
EditBinding->>EditBinding: saveBinding(firstField)
note right of EditBinding `#DDFFDD`: compute derived fields\ntrigger onSuccess update
deactivate EditBinding
EditBinding->>SelectField: provide updated binding
activate SelectField
SelectField->>SelectField: derive selectedDataField (current || first)
SelectField->>User: render auto-selected field
deactivate SelectField
User->>SelectField: optionally change selection
SelectField->>EditBinding: handleDataModelFieldChange(newField)
EditBinding->>EditBinding: saveBinding(newField)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17055 +/- ##
========================================
Coverage 96.19% 96.19%
========================================
Files 2447 2395 -52
Lines 30790 30468 -322
Branches 3544 3514 -30
========================================
- Hits 29618 29310 -308
+ Misses 864 851 -13
+ Partials 308 307 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
We need to set a default data model filed when the user select a data model to prevent the error message in preview.
CLOSES: #17048
Solution
Screen.Recording.2025-11-26.at.12.53.04.mov
---
Verification
Summary by CodeRabbit
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.