Skip to content

[Dashboards] Rich text editor frontend#16437

Merged
ehconitin merged 50 commits intomainfrom
rich-text-editor-frontend
Dec 12, 2025
Merged

[Dashboards] Rich text editor frontend#16437
ehconitin merged 50 commits intomainfrom
rich-text-editor-frontend

Conversation

@ehconitin
Copy link
Copy Markdown
Contributor

@ehconitin ehconitin commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 9, 2025

TODOs/FIXMEs:

  • // TODO: Remove this once we have removed the old rich text: packages/twenty-front/src/modules/activities/components/ActivityRichTextEditor.tsx
  • // TODO: when we have more widgets without headers, we should use a more generic approach to hide the header: packages/twenty-front/src/modules/page-layout/widgets/components/WidgetRenderer.tsx

Generated by 🚫 dangerJS against 9807c52

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 &quot;iframe widget&quot; 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

@cubic-dev-ai
Copy link
Copy Markdown
Contributor

cubic-dev-ai bot commented Dec 12, 2025

@cubic-dev-ai review trigger

@ehconitin I've started the AI code review. It'll take a few minutes to complete.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: &quot;wihtout&quot; should be &quot;without&quot;.</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: &#39;paragraph&#39; }], block, &#39;after&#39;);
```</violation>
</file>

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

align-items: center;
`;

const StyledDragHandleContainer = styled.div`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like it is the same component as the one inside the widgets, maybe we could have a common abstraction in ui

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

CleanShot 2025-12-12 at 19 18 30

| StandaloneRichTextConfiguration
| undefined;

const currentBody = configuration?.body?.blocknote ?? '';

This comment was marked as outdated.

}

const imageUrl = block.props.url;
const parsedImageUrl = new URL(imageUrl);

This comment was marked as outdated.

| StandaloneRichTextConfiguration
| undefined;

const currentBody = configuration?.body?.blocknote ?? '';

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

@bosiraphael bosiraphael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@ehconitin ehconitin merged commit 44f0cfd into main Dec 12, 2025
62 checks passed
@ehconitin ehconitin deleted the rich-text-editor-frontend branch December 12, 2025 17:37
@twenty-eng-sync
Copy link
Copy Markdown

Hey @ehconitin! After you've done the QA of your Pull Request, you can mark it as done here. Thank you!

charlesBochet added a commit that referenced this pull request Dec 15, 2025
Likely a missing lazy load in:
#16437

Let's unblock and fix separately
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Dashboards] Rich text widget frontend

2 participants