Skip to content

Use canvas layout for all advanced RPL widgets#17028

Merged
charlesBochet merged 2 commits intomainfrom
rpl-landing-soon-in-prod
Jan 9, 2026
Merged

Use canvas layout for all advanced RPL widgets#17028
charlesBochet merged 2 commits intomainfrom
rpl-landing-soon-in-prod

Conversation

@Devessier
Copy link
Copy Markdown
Contributor

Before

CleanShot 2026-01-08 at 18 46 32@2x

After

CleanShot 2026-01-08 at 18 46 59@2x

@Devessier Devessier marked this pull request as ready for review January 8, 2026 17:47
Copilot AI review requested due to automatic review settings January 8, 2026 17:47
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.

No issues found across 6 files

icon: 'IconTimelineEvent',
position: 200,
layoutMode: 'vertical-list',
layoutMode: 'canvas',
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: Changing default layouts to canvas mode will hide any widgets beyond the first one, as PageLayoutCanvasViewer only renders widgets.at(0).
Severity: CRITICAL

🔍 Detailed Analysis

The pull request changes several default page layout tabs from vertical-list to canvas mode. The PageLayoutCanvasViewer component, which renders canvas layouts, is designed to only display the first widget in the list (widgets.at(0)). However, there are no validation checks in place to prevent users from adding multiple widgets to a tab in canvas mode. As a result, if a user adds more than one widget to these newly converted canvas tabs, all widgets after the first one will be silently hidden from view, leading to a confusing user experience and perceived data loss. This also affects existing customizations where users may have already added multiple widgets.

💡 Suggested Fix

Prevent users from adding more than one widget to tabs with layoutMode: 'canvas'. This can be achieved by adding a validation check within the widget creation hooks (e.g., useCreatePageLayoutStandaloneRichTextWidget) before adding a new widget to a tab.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location:
packages/twenty-front/src/modules/page-layout/constants/DefaultPersonRecordPageLayout.ts#L58

Potential issue: The pull request changes several default page layout tabs from
`vertical-list` to `canvas` mode. The `PageLayoutCanvasViewer` component, which renders
canvas layouts, is designed to only display the first widget in the list
(`widgets.at(0)`). However, there are no validation checks in place to prevent users
from adding multiple widgets to a tab in canvas mode. As a result, if a user adds more
than one widget to these newly converted canvas tabs, all widgets after the first one
will be silently hidden from view, leading to a confusing user experience and perceived
data loss. This also affects existing customizations where users may have already added
multiple widgets.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 8353563

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request updates the layout mode for advanced RPL (Record Page Layout) widgets from 'vertical-list' to 'canvas' across all default record page layouts. The change improves the visual presentation of interactive widgets like Timeline, Tasks, Notes, Files, Emails, and Calendar, while keeping the basic Fields tabs unchanged.

Key changes:

  • Updated layoutMode from 'vertical-list' to 'canvas' for advanced widgets across 6 default page layout files
  • Basic tabs (Fields, Note) intentionally remain as 'vertical-list'

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
DefaultTaskRecordPageLayout.ts Updated Timeline and Files tabs to use canvas layout
DefaultRecordPageLayout.ts Updated Timeline, Tasks, Notes, and Files tabs to use canvas layout
DefaultPersonRecordPageLayout.ts Updated Timeline, Tasks, Notes, Files, Emails, and Calendar tabs to use canvas layout
DefaultOpportunityRecordPageLayout.ts Updated Timeline, Tasks, Notes, Files, Emails, and Calendar tabs to use canvas layout
DefaultNoteRecordPageLayout.ts Updated Timeline and Files tabs to use canvas layout
DefaultCompanyRecordPageLayout.ts Updated Timeline, Tasks, Notes, Files, Emails, and Calendar tabs to use canvas layout

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 8, 2026

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:14741

This environment will automatically shut down when the PR is closed or after 5 hours.

@charlesBochet charlesBochet added this pull request to the merge queue Jan 9, 2026
Merged via the queue into main with commit 8fc0bb3 Jan 9, 2026
72 of 73 checks passed
@charlesBochet charlesBochet deleted the rpl-landing-soon-in-prod branch January 9, 2026 08:53
@twenty-eng-sync
Copy link
Copy Markdown

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

2 similar comments
@twenty-eng-sync
Copy link
Copy Markdown

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

@twenty-eng-sync
Copy link
Copy Markdown

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

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.

3 participants