Fix Data model object setting page not loading#16308
Conversation
Greptile OverviewGreptile SummaryThis PR fixes a regression where the Data Model Object Settings page would fail to load. Root Cause: PR #16244 introduced a change that made Solution: The fix moves the Recoil state read back to
Changes:
Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant RT as RecordTableCellFieldContextLabelIdentifier
participant Recoil as Recoil State
participant FC as FieldContext.Provider
participant Hook as useChipFieldDisplay
participant Chip as ChipFieldDisplay
participant Settings as SettingsDataModelFieldPreview
Note over RT,Chip: Record Table Flow (with context)
RT->>Recoil: useRecoilComponentValue(shouldCompact...)
Recoil-->>RT: boolean
RT->>FC: value={{ isLabelIdentifierCompact: boolean }}
FC->>Hook: context value
Hook->>Chip: isLabelIdentifierCompact
Chip->>Chip: isLabelHidden={isLabelIdentifierCompact ?? false}
Note over Settings,Chip: Settings Page Flow (without context)
Settings->>FC: value={{ isLabelIdentifier: true }}
Note right of FC: isLabelIdentifierCompact not provided
FC->>Hook: context value
Hook->>Chip: isLabelIdentifierCompact = undefined
Chip->>Chip: isLabelHidden={undefined ?? false} = false
|
|
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:1684 This environment will automatically shut down when the PR is closed or after 5 hours. |
|
Hey @charlesBochet! After you've done the QA of your Pull Request, you can mark it as done here. Thank you! |
Regression introduced by https://github.com/twentyhq/twenty/pull/16244/files
Why:
ChipFieldDisplaycomponent is using arecoilComponentStateandContextStoreComponentContextis not provided on Settings pageThis fix
ChipFieldDisplaybut in the RecordIndex area where theContextStoreComponentContextis provided