Skip to content

Conversation

@mabdullahabaid
Copy link
Member

@mabdullahabaid mabdullahabaid commented Dec 18, 2025

Closes 2006

Removed the top-border in FieldsWidget and added buttom-border to WidgetCard.

Beyond this, I tried making the spacing of these widgets even at the top and the bottom, but it turns out the widgets are also used in activity views, so configuring them for side-column messes up those activity views/tabs.

I feel that in order to make these widgets cleaner in side-column, we have to make the widgets context aware - I tried figuring out some other solution, but since some cards have spacing defined within, we do not really have a clean and quick solution imo.

If we do not align spacing, the following delta remains in bottom-spacing of the widgets and it looks ugly.

image image

Let me know your thoughts.

Copy link
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.

@mabdullahabaid
Copy link
Member Author

This is the widgets array I added to DefaultPersonRecordPageLayout to enable all the widgets and figure out the delta.

      widgets: [
        {
          __typename: 'PageLayoutWidget',
          id: 'person-widget-fields',
          pageLayoutTabId: 'person-tab-fields',
          title: 'Fields',
          type: WidgetType.FIELDS,
          objectMetadataId: null,
          gridPosition: {
            __typename: 'GridPosition',
            row: 0,
            column: 0,
            rowSpan: 12,
            columnSpan: 12,
          },
          configuration: null,
          createdAt: new Date().toISOString(),
          updatedAt: new Date().toISOString(),
          deletedAt: null,
        },
        {
          __typename: 'PageLayoutWidget',
          id: 'person-widget-side-tasks',
          pageLayoutTabId: 'person-tab-fields',
          title: 'Tasks',
          type: WidgetType.TASKS,
          objectMetadataId: null,
          gridPosition: {
            __typename: 'GridPosition',
            row: 1,
            column: 0,
            rowSpan: 6,
            columnSpan: 12,
          },
          configuration: null,
          createdAt: new Date().toISOString(),
          updatedAt: new Date().toISOString(),
          deletedAt: null,
        },
        {
          __typename: 'PageLayoutWidget',
          id: 'person-widget-side-notes',
          pageLayoutTabId: 'person-tab-fields',
          title: 'Notes',
          type: WidgetType.NOTES,
          objectMetadataId: null,
          gridPosition: {
            __typename: 'GridPosition',
            row: 2,
            column: 0,
            rowSpan: 6,
            columnSpan: 12,
          },
          configuration: null,
          createdAt: new Date().toISOString(),
          updatedAt: new Date().toISOString(),
          deletedAt: null,
        },
        {
          __typename: 'PageLayoutWidget',
          id: 'person-widget-side-timeline',
          pageLayoutTabId: 'person-tab-fields',
          title: 'Timeline',
          type: WidgetType.TIMELINE,
          objectMetadataId: null,
          gridPosition: {
            __typename: 'GridPosition',
            row: 3,
            column: 0,
            rowSpan: 6,
            columnSpan: 12,
          },
          configuration: null,
          createdAt: new Date().toISOString(),
          updatedAt: new Date().toISOString(),
          deletedAt: null,
        },
        {
          __typename: 'PageLayoutWidget',
          id: 'person-widget-side-files',
          pageLayoutTabId: 'person-tab-fields',
          title: 'Files',
          type: WidgetType.FILES,
          objectMetadataId: null,
          gridPosition: {
            __typename: 'GridPosition',
            row: 4,
            column: 0,
            rowSpan: 6,
            columnSpan: 12,
          },
          configuration: null,
          createdAt: new Date().toISOString(),
          updatedAt: new Date().toISOString(),
          deletedAt: null,
        },
        {
          __typename: 'PageLayoutWidget',
          id: 'person-widget-side-emails',
          pageLayoutTabId: 'person-tab-fields',
          title: 'Emails',
          type: WidgetType.EMAILS,
          objectMetadataId: null,
          gridPosition: {
            __typename: 'GridPosition',
            row: 5,
            column: 0,
            rowSpan: 6,
            columnSpan: 12,
          },
          configuration: null,
          createdAt: new Date().toISOString(),
          updatedAt: new Date().toISOString(),
          deletedAt: null,
        },
        {
          __typename: 'PageLayoutWidget',
          id: 'person-widget-side-calendar',
          pageLayoutTabId: 'person-tab-fields',
          title: 'Calendar',
          type: WidgetType.CALENDAR,
          objectMetadataId: null,
          gridPosition: {
            __typename: 'GridPosition',
            row: 6,
            column: 0,
            rowSpan: 6,
            columnSpan: 12,
          },
          configuration: null,
          createdAt: new Date().toISOString(),
          updatedAt: new Date().toISOString(),
          deletedAt: null,
        },
      ],

Copy link
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 3 files

@github-actions
Copy link
Contributor

github-actions bot commented Dec 18, 2025

🚀 Preview Environment Ready!

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

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

Copy link
Contributor

@Devessier Devessier left a comment

Choose a reason for hiding this comment

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

Thanks for your work! I suggest a few technical changes but overall it looks good.

if (variant === 'side-column' && !isEditable) {
return css`
background: ${theme.background.secondary};
border-bottom: 1px solid ${theme.border.color.light};
Copy link
Contributor

Choose a reason for hiding this comment

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

Good! As mentioned in DM, I think we have to do that in conjunction to a padding removal on the vertical list/editor components.

const StyledVerticalListContainer = styled.div`
display: flex;
flex-direction: column;
gap: ${({ theme }) => theme.spacing(2)};
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we don't want to keep gap here. Let's go with that, we can update the styles later if we want to adding spacing.

import { Section } from 'twenty-ui/layout';

const StyledRecordDetailSectionContainer = styled(Section)`
border-top: 1px solid ${({ theme }) => theme.border.color.light};
Copy link
Contributor

Choose a reason for hiding this comment

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

We can't drop this property. The component is used in the normal code path, currently in production.

I suggest you to fork the whole RecordDetailSectionContainer component into FieldsWidgetSectionContainer.

Most code paths will likely diverge, and RecordDetailSectionContainer will likely be replaced by Fields widget!

Image

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.

Correctly separate widgets in side-column mode

3 participants