Enable switching field to group records by on existing kanban view#17015
Enable switching field to group records by on existing kanban view#17015
Conversation
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.
There was a problem hiding this comment.
1 issue found across 1 file
Prompt for AI agents (all 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/object-record/object-options-dropdown/components/ObjectOptionsDropdownRecordGroupsContent.tsx">
<violation number="1" location="packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownRecordGroupsContent.tsx:127">
P2: The `onEnter` callback doesn't respect the disabled state. When `hasOnlyOneGroupByOption` is true, the MenuItem is visually disabled but pressing Enter will still trigger navigation. Guard the `onEnter` callback to match the disabled behavior.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| <SelectableListItem itemId="GroupBy"> | ||
| <SelectableListItem | ||
| itemId="GroupBy" | ||
| onEnter={() => onContentChange('recordGroupFields')} |
There was a problem hiding this comment.
P2: The onEnter callback doesn't respect the disabled state. When hasOnlyOneGroupByOption is true, the MenuItem is visually disabled but pressing Enter will still trigger navigation. Guard the onEnter callback to match the disabled behavior.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/twenty-front/src/modules/object-record/object-options-dropdown/components/ObjectOptionsDropdownRecordGroupsContent.tsx, line 127:
<comment>The `onEnter` callback doesn't respect the disabled state. When `hasOnlyOneGroupByOption` is true, the MenuItem is visually disabled but pressing Enter will still trigger navigation. Guard the `onEnter` callback to match the disabled behavior.</comment>
<file context>
@@ -116,10 +122,14 @@ export const ObjectOptionsDropdownRecordGroupsContent = () => {
- <SelectableListItem itemId="GroupBy">
+ <SelectableListItem
+ itemId="GroupBy"
+ onEnter={() => onContentChange('recordGroupFields')}
+ >
<MenuItem
</file context>
| onEnter={() => onContentChange('recordGroupFields')} | |
| onEnter={() => !hasOnlyOneGroupByOption && onContentChange('recordGroupFields')} |
✅ Addressed in f3a720b
| handleHideEmptyRecordGroupChange, | ||
| } = useRecordGroupVisibility(); | ||
|
|
||
| const { availableFieldsForKanban } = useGetAvailableFieldsForKanban(); |
There was a problem hiding this comment.
this naming seems outdated?
charlesBochet
left a comment
There was a problem hiding this comment.
Left comment + let's fix tests
|
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:62601 This environment will automatically shut down when the PR is closed or after 5 hours. |
Fixes #16982 and https://github.com/twentyhq/private-issues/issues/403
Re-introducing the feature to allow to switch field to group records by on a kanban view
Enregistrement.de.l.ecran.2026-01-08.a.13.26.56.mov