Files
twenty/packages/twenty-front
Hansol Yang b6202fe98c Issue6335: RecordInlineCell tree refactor with RecordInlineCellContext (#6537)
Fixes [#6335](https://github.com/twentyhq/twenty/issues/6335)

This pull request is for issue
[#6335](https://github.com/twentyhq/twenty/issues/6335): Refactor
RecordInlineCell tree with a Context to avoid props drilling. For the
refactoring, this PR made changes as below:

- Created new script RecordInlineCellContext.tsx: Defining a context to
pass in useContext()
- Updated RecordInlineCell.tsx: Passing the necessary props as context
values, wrapping with RecordInlineCellContext.Provider
- Updated RecordInlineCellContainer.tsx: Passing the props to
RecordInlineContainer as RecordInlineCellContext
- Updated RecordInlineCellDisplayMode.tsx: retrieves values from
useRecordInlineCellContext instead of directly assigning them
- RecordInlineCellValue.tsx: Removed values passed through
<RecordInlineCellDisplayMode> as they are now retrieved through
useRecordInlineCellContext + Removed the null check for
RecordInlineCellContextProps.

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!

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-08-12 12:18:05 +02:00
..
2024-03-31 10:53:37 +02:00
2024-07-29 13:03:09 +02:00
2023-12-10 18:10:54 +01:00
2024-07-29 13:03:09 +02:00
2024-08-09 08:38:01 +02:00
2024-08-07 17:09:30 +02:00
2024-07-22 17:36:31 +02:00
2024-08-09 08:38:01 +02:00

Run yarn dev while server running on port 3000