Skip to content

Feature 15797 add secondary action button#16582

Merged
etiennejouan merged 16 commits intotwentyhq:mainfrom
Lakshayyy-m:feature-15797-add-secondary-action-button
Dec 17, 2025
Merged

Feature 15797 add secondary action button#16582
etiennejouan merged 16 commits intotwentyhq:mainfrom
Lakshayyy-m:feature-15797-add-secondary-action-button

Conversation

@Lakshayyy-m
Copy link
Copy Markdown
Contributor

This is a fix for #15797

This pull request is to replace PR #16307 and to extend #16265

Just to repeat, this PR does the following ->
Table Cell Button and Edit Button Improvements

  • Enhanced RecordTableCellButton to support a secondary action and icon, enabling both the primary and secondary actions based on the selected action mode.
  • Updated RecordTableCellEditButton to determine the action mode for actionable fields, and provide both copy and navigate actions as primary/secondary buttons, with appropriate feedback.

When primary function is to copy

image

When primary function is to open link

image

Hey @etiennejouan, please have a look!
Thank you

Copilot AI review requested due to automatic review settings December 16, 2025 05:08
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.

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 4 files

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 PR adds support for secondary action buttons in table cells for phone, email, and link fields. It enables users to toggle between copy and navigate actions based on the field's configured click action setting.

  • Enhanced RecordTableCellButton to support optional secondary action buttons using LightIconButtonGroup
  • Extended RecordTableCellEditButton to provide both copy and navigate actions as primary/secondary buttons for phone, email, and link fields based on their configured click action
  • Added I18n decorator to storybook configuration and removed isDisplayModeFixHeight from default context values

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
RecordTableCellEditButton.tsx Added logic to determine primary/secondary actions (copy/navigate) based on field type and click action configuration
RecordTableCellButton.tsx Refactored to use LightIconButtonGroup for rendering multiple action buttons and added border styling
RecordInlineCellContext.tsx Removed isDisplayModeFixHeight from default context values
SettingsDataModelFieldPreviewWidget.stories.tsx Added I18nFrontDecorator for internationalization support
Comments suppressed due to low confidence (2)

packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellEditButton.tsx:27

  • Unused variable enqueueSuccessSnackBar.
  const { enqueueSuccessSnackBar, enqueueErrorSnackBar } = useSnackBar();

packages/twenty-front/src/modules/object-record/record-table/record-table-cell/components/RecordTableCellEditButton.tsx:27

  • Unused variable enqueueErrorSnackBar.
  const { enqueueSuccessSnackBar, enqueueErrorSnackBar } = useSnackBar();

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

@etiennejouan etiennejouan self-assigned this Dec 16, 2025
editModeContent: undefined,
editModeContentOnly: false,
displayModeContent: undefined,
isDisplayModeFixHeight: false,
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.

@Lakshayyy-m Why do you remove this default prop ?

Copy link
Copy Markdown
Contributor

@etiennejouan etiennejouan left a comment

Choose a reason for hiding this comment

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

@Lakshayyy-m Thanks a lot for your contribution ! 🙏
As you already do extra work with rebase, I update myself rather than commenting. I simply move the secondary button action logic in a dedicated hook.

Thank you for your work and patience !

@Lakshayyy-m
Copy link
Copy Markdown
Contributor Author

Hey @etiennejouan,
Thank you for making those changes. And I honestly wouldn't have minded, it's a learning opportunity for me. Let me know if I can help anymore!

@etiennejouan etiennejouan merged commit d43e21b into twentyhq:main Dec 17, 2025
61 checks passed
@twenty-eng-sync
Copy link
Copy Markdown

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

@github-actions
Copy link
Copy Markdown
Contributor

Thanks @Lakshayyy-m for your contribution!
This marks your 1st PR on the repo. You're top 38% of all our contributors 🎉
See contributor page - Share on LinkedIn - Share on Twitter

Contributions

@etiennejouan
Copy link
Copy Markdown
Contributor

etiennejouan commented Dec 17, 2025

Hey @etiennejouan, Thank you for making those changes. And I honestly wouldn't have minded, it's a learning opportunity for me. Let me know if I can help anymore!

@Lakshayyy-m, congrats for your first merged PR ! 👏
Please feel free to tackle other issues !

etiennejouan added a commit that referenced this pull request Dec 17, 2025
Merged #16582 without testing
case when fieldDefinition.metadata.settings?.clickAction is not set
(default value)

To test : 
When 
<img width="548" height="537" alt="Screenshot 2025-12-17 at 09 37 26"
src="https://github.com/user-attachments/assets/96a85093-24bb-4436-9000-340cd020e343"
/>
is set (or default)
In table view you can copy cell content
<img width="252" height="77" alt="Screenshot 2025-12-17 at 09 36 58"
src="https://github.com/user-attachments/assets/44b938f3-74b8-4d58-8b1a-344b4f39bfbd"
/>
abdulrahmancodes pushed a commit that referenced this pull request Dec 18, 2025
This is a fix for #15797 

This pull request is to replace PR #16307 and to extend #16265 

Just to repeat, this PR does the following -> 
**Table Cell Button and Edit Button Improvements**
- Enhanced RecordTableCellButton to support a secondary action and icon,
enabling both the primary and secondary actions based on the selected
action mode.
- Updated RecordTableCellEditButton to determine the action mode for
actionable fields, and provide both copy and navigate actions as
primary/secondary buttons, with appropriate feedback.

## When primary function is to copy
<img width="1817" height="939" alt="image"
src="https://github.com/user-attachments/assets/7ec6c6aa-80d8-402b-a210-519163d39ef6"
/>


## When primary function is to open link
<img width="1784" height="942" alt="image"
src="https://github.com/user-attachments/assets/dfe0fcf1-ba72-4083-a5f9-7165a03db3df"
/>

Hey @etiennejouan, please have a look!
Thank you

---------

Co-authored-by: Etienne <45695613+etiennejouan@users.noreply.github.com>
abdulrahmancodes pushed a commit that referenced this pull request Dec 18, 2025
Merged #16582 without testing
case when fieldDefinition.metadata.settings?.clickAction is not set
(default value)

To test : 
When 
<img width="548" height="537" alt="Screenshot 2025-12-17 at 09 37 26"
src="https://github.com/user-attachments/assets/96a85093-24bb-4436-9000-340cd020e343"
/>
is set (or default)
In table view you can copy cell content
<img width="252" height="77" alt="Screenshot 2025-12-17 at 09 36 58"
src="https://github.com/user-attachments/assets/44b938f3-74b8-4d58-8b1a-344b4f39bfbd"
/>
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