Conversation
packages/twenty-front/src/modules/page-layout/utils/convertLayoutsToWidgets.ts
Show resolved
Hide resolved
Greptile SummaryThis PR migrates the frontend to use the new typed Key changes:
Issues found:
Confidence Score: 4/5
Important Files Changed
Last reviewed commit: 9b45d69 |
packages/twenty-front/src/modules/page-layout/utils/convertLayoutsToWidgets.ts
Show resolved
Hide resolved
Devessier
left a comment
There was a problem hiding this comment.
Left a few comments. I would like to discuss the best practice to create default widgets whose position makes sense with the layout mode they are used within.
packages/twenty-front/src/modules/page-layout/utils/convertPageLayoutDraftToUpdateInput.ts
Show resolved
Hide resolved
| position: { | ||
| __typename: 'PageLayoutWidgetGridPosition', | ||
| layoutMode: PageLayoutTabLayoutMode.GRID, | ||
| row: gridPosition.row, | ||
| column: gridPosition.column, | ||
| rowSpan: gridPosition.rowSpan, | ||
| columnSpan: gridPosition.columnSpan, | ||
| }, |
There was a problem hiding this comment.
I feel we should instruct this function about the layout mode it should use. Indeed, we could create front component in record page layouts as well.
| type: WidgetType.GRAPH, | ||
| configuration, | ||
| gridPosition, | ||
| position: { |
There was a problem hiding this comment.
Same thing here about layout mode
| url, | ||
| }, | ||
| gridPosition, | ||
| position: { |
There was a problem hiding this comment.
Same thing here about layout mode
| body, | ||
| }, | ||
| gridPosition, | ||
| position: { |
There was a problem hiding this comment.
Same thing here about layout mode
|
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:15344 This environment will automatically shut down after 5 hours. |
Context
Part 1 of migrating gridPosition in favor of typed position
FE should now always send both values to the BE and use both.
Next steps: