-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Issue6335: RecordInlineCell tree refactor with RecordInlineCellContext #6537
Issue6335: RecordInlineCell tree refactor with RecordInlineCellContext #6537
Conversation
…context directly in RecordInlineCellValue
…ext in custom hook for the rules of hook
…d avoid if statement for null checking
…s using RecordInlineCellContext Provider
Log
|
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.
PR Summary
Refactored RecordInlineCell
components to use RecordInlineCellContext
for state management, eliminating prop drilling and improving maintainability.
- Added
RecordInlineCellContext.tsx
to manage state and props centrally. - Updated
packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCell.tsx
to use context values. - Modified
packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellContainer.tsx
to retrieve props from context. - Adjusted
packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellDisplayMode.tsx
to use context. - Refactored
packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellValue.tsx
to access context values.
6 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
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.
Nice, I just added some minor fixes.
Fixes #6335
This pull request is for issue #6335: Refactor RecordInlineCell tree with a Context to avoid props drilling. For the refactoring, this PR made changes as below:
Using RecordInlineCellContext, I believe the context goes to the top of the hierarchy and passed to the required layers without going through several layers. However, please let me know if I understood the issue incorrectly or it is not solved properly.
Thank you in advance for your review!