[Dashboards] Rich text editor frontend#16437
Conversation
This reverts commit 332f7db.
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
TODOs/FIXMEs:
|
There was a problem hiding this comment.
2 issues found across 17 files
Prompt for AI agents (all 2 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/twenty-front/src/modules/page-layout/hooks/useCreatePageLayoutStandaloneRichTextWidget.ts">
<violation number="1" location="packages/twenty-front/src/modules/page-layout/hooks/useCreatePageLayoutStandaloneRichTextWidget.ts:65">
P2: Error message references "iframe widget" but this hook creates a standalone rich text widget. This appears to be a copy-paste error that will confuse developers debugging issues.</violation>
</file>
<file name="packages/twenty-front/src/modules/ui/input/editor/utils/parseInitialBlocknote.ts">
<violation number="1" location="packages/twenty-front/src/modules/ui/input/editor/utils/parseInitialBlocknote.ts:18">
P1: Type safety issue: `JSON.parse` can return any type, but only empty arrays are filtered out. If the parsed JSON is not an array (e.g., an object, string, or number), it will be returned despite the `PartialBlock[] | undefined` return type. The condition should validate that the result is actually an array before returning.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
...es/twenty-front/src/modules/page-layout/hooks/useCreatePageLayoutStandaloneRichTextWidget.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/ui/input/editor/utils/parseInitialBlocknote.ts
Outdated
Show resolved
Hide resolved
…cknote editor for dashbaords
@ehconitin I've started the AI code review. It'll take a few minutes to complete. |
There was a problem hiding this comment.
2 issues found across 38 files
Prompt for AI agents (all 2 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/twenty-front/src/modules/page-layout/widgets/components/WidgetRenderer.tsx">
<violation number="1" location="packages/twenty-front/src/modules/page-layout/widgets/components/WidgetRenderer.tsx:64">
P3: Typo in comment: "wihtout" should be "without".</violation>
</file>
<file name="packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardBlockDragHandleMenu.tsx">
<violation number="1" location="packages/twenty-front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardBlockDragHandleMenu.tsx:83">
P1: Inconsistent editor usage: The function mixes `blockNoteEditor` (from hook) with `editor` (prop) and ignores the `block` prop. If the cursor position differs from the block this menu targets, blocks will be inserted in the wrong location. Consider using the `block` prop consistently:
```typescript
editor.insertBlocks([{ type: 'paragraph' }], block, 'after');
```</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
packages/twenty-front/src/modules/page-layout/widgets/components/WidgetRenderer.tsx
Outdated
Show resolved
Hide resolved
...modules/page-layout/widgets/standalone-rich-text/components/DashboardBlockDragHandleMenu.tsx
Outdated
Show resolved
Hide resolved
...rc/modules/command-menu/pages/page-layout/components/CommandMenuPageLayoutIframeSettings.tsx
Show resolved
Hide resolved
...modules/page-layout/widgets/standalone-rich-text/components/DashboardBlockDragHandleMenu.tsx
Outdated
Show resolved
Hide resolved
...front/src/modules/page-layout/widgets/standalone-rich-text/components/DashboardColorIcon.tsx
Outdated
Show resolved
Hide resolved
| align-items: center; | ||
| `; | ||
|
|
||
| const StyledDragHandleContainer = styled.div` |
There was a problem hiding this comment.
I feel like it is the same component as the one inside the widgets, maybe we could have a common abstraction in ui
There was a problem hiding this comment.
I too thought the same, but its not -- maybe it should be the same
https://www.figma.com/design/xt8O9mFeLl46C5InWwoMrN/Twenty?node-id=75849-261995&t=ahtsLHKbSRVWeXBF-0
.../src/modules/page-layout/widgets/standalone-rich-text/components/DashboardEditorSideMenu.tsx
Outdated
Show resolved
Hide resolved
...c/modules/page-layout/widgets/standalone-rich-text/components/DashboardFormattingToolbar.tsx
Show resolved
Hide resolved
packages/twenty-front/src/modules/ui/input/editor/hooks/useAttachmentSync.ts
Outdated
Show resolved
Hide resolved
...age-layout/widgets/standalone-rich-text/components/DashboardFormattingToolbarColorButton.tsx
Outdated
Show resolved
Hide resolved
...c/modules/page-layout/widgets/standalone-rich-text/components/DashboardFormattingToolbar.tsx
Show resolved
Hide resolved
...src/modules/page-layout/widgets/standalone-rich-text/components/StandaloneRichTextWidget.tsx
Show resolved
Hide resolved
|
Hey @ehconitin! After you've done the QA of your Pull Request, you can mark it as done here. Thank you! |
Likely a missing lazy load in: #16437 Let's unblock and fix separately
closes twentyhq/core-team-issues#1894