-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add no value column on Kanban #6252
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
- Added 'no value' column to Kanban board (
packages/twenty-front/src/modules/object-record/utils/computeRecordBoardColumnDefinitionsFromObjectMetadata.ts
) - Introduced new column types for Kanban (
packages/twenty-front/src/modules/object-record/record-board/types/RecordBoardColumnDefinition.ts
) - Conditional color setting for 'no value' column (
packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnHeader.tsx
) - Reordered import statements for consistency (
packages/twenty-front/src/modules/object-record/record-board/components/RecordBoard.tsx
)
4 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
- Added variant prop to
Tag
component for 'no value' column (packages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnHeader.tsx
) - Updated
boardFieldSelectValue
prop to accept null values (packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexBoardColumnLoaderEffect.tsx
) - Added new column for records with no value in Kanban board (
packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexBoardDataLoader.tsx
) - Handled null
columnFieldSelectValue
in filter for 'no value' column (packages/twenty-front/src/modules/object-record/record-index/hooks/useLoadRecordIndexBoardColumn.ts
) - Reordered import statements in
Tag
component (packages/twenty-ui/src/display/tag/components/Tag.tsx
)
5 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings
boardFieldMetadataId={recordIndexKanbanFieldMetadataId} | ||
boardFieldSelectValue={null} | ||
recordBoardId={recordBoardId} | ||
columnId={'no-value'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style: Consider using a constant for 'no-value' to avoid magic strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
- Conditional rendering for
columnDefinition.actions
inRecordBoardColumnHeader.tsx
- Display header actions and dropdown menu only when actions are available
- Relevant for the new 'no value' column in the Kanban board
No major changes found since last review.
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
- Stricter check for
columnDefinition.actions
length inpackages/twenty-front/src/modules/object-record/record-board/record-board-column/components/RecordBoardColumnHeader.tsx
- Render actions only if
columnDefinition.actions
has items - Prevent potential rendering issues with empty
columnDefinition.actions
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
@@ -79,14 +80,23 @@ export const RecordBoardColumnHeader = () => { | |||
> | |||
<Tag | |||
onClick={handleBoardColumnMenuOpen} | |||
color={columnDefinition.color} | |||
variant={ | |||
columnDefinition.type === RecordBoardColumnDefinitionType.Value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is because of the Tag component not maching figma. we could have the transparent as a color variant
@@ -45,6 +45,13 @@ export const RecordIndexBoardDataLoader = ({ | |||
columnId={columnIds[index]} | |||
/> | |||
))} | |||
<RecordIndexBoardColumnLoaderEffect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually think this should be computed from the recordBoardcolumnDefinition array just to be consistent
Great! Maybe display @WorkspaceIsNullable() as "advanced option" during field creation/edition @Bonapara - could be a followup ticket? But the issue @charlesBochet is the data migration will be painful if we need to go back the other way and make the stage field not-nullable, which we will want to do. |
Okay, we have discussed this with @ijreilly and we are:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
- Added
isNullable
property to field definition metadata inpackages/twenty-front/src/modules/object-metadata/utils/formatFieldMetadataItemAsFieldDefinition.ts
- Conditional 'No value' option in
SelectFieldInput.tsx
based onisNullable
property - Updated
FieldSelectMetadata
type to includeisNullable
inFieldMetadata.ts
- Conditional rendering of 'no-value' column in
RecordIndexBoardDataLoader.tsx
if field is nullable - Added 'No Value' column to Kanban board in
computeRecordBoardColumnDefinitionsFromObjectMetadata.ts
based onisNullable
property
5 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings
boardFieldMetadataId={recordIndexKanbanFieldMetadataId} | ||
boardFieldSelectValue={null} | ||
recordBoardId={recordBoardId} | ||
columnId={'no-value'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style: Consider using a constant for 'no-value' to avoid magic strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
- Added
isNullable
property toselectFieldDefinition
inpackages/twenty-front/src/modules/object-record/record-field/__mocks__/fieldDefinitions.ts
- Added
PrefetchDataProvider
to providers inpackages/twenty-front/src/testing/decorators/PageDecorator.tsx
- Added new GraphQL query mock for
CombinedFindManyRecords
inpackages/twenty-front/src/testing/graphqlMocks.ts
- Updated mock data for views and view fields in
packages/twenty-front/src/testing/mock-data/view-fields.ts
andpackages/twenty-front/src/testing/mock-data/views.ts
- Removed
variant
prop fromTag
component inpackages/twenty-ui/src/display/tag/components/Tag.tsx
9 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings
console.log(columnDefinitions); | ||
console.log(viewFields); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style: Remove console.log statements before merging to main to avoid cluttering the console output.
console.log(viewFields); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style: Remove console.log statements before merging to main to avoid cluttering the console output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
- Removed
console.log
statements frompackages/twenty-front/src/modules/views/utils/mapViewFieldsToColumnDefinitions.ts
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
- Introduced
TagVariant
type with 'solid' and 'outline' values in/packages/twenty-ui/src/display/tag/components/Tag.tsx
- Updated
TagProps
interface to includevariant
property - Modified
StyledTag
to handle 'outline' variant with a dashed border
No major changes found since last review.
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
Open questions:
Follow up: