Add a CARD layout to the Field widget (#16995)

Closes https://github.com/twentyhq/core-team-issues/issues/1943

## Demo



https://github.com/user-attachments/assets/ea86e1e6-6495-42b8-8dd3-e2bf7d295bab

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
Baptiste Devessier
2026-01-08 16:43:34 +01:00
committed by GitHub
parent 28e79de7b0
commit f1aee7fd18
21 changed files with 949 additions and 51 deletions
@@ -36,6 +36,7 @@ import {
} from 'twenty-ui/layout';
const StyledContainer = styled.div`
box-sizing: border-box;
display: flex;
flex-direction: column;
width: 100%;
@@ -49,7 +50,7 @@ export const FieldsWidget = ({ widget }: FieldsWidgetProps) => {
const targetRecord = useTargetRecord();
const { isInRightDrawer } = useLayoutRenderingContext();
const instanceId = `fields-widget-${widget.id}-${targetRecord.id}${isInRightDrawer ? '-right-drawer' : ''}`;
const instanceId = `${widget.id}-${targetRecord.id}${isInRightDrawer ? '-right-drawer' : ''}`;
const { recordLoading, isPrefetchLoading } = useRecordShowContainerData({
objectRecordId: targetRecord.id,