Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,17 @@ import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';
import { useRecoilComponentValue } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValue';
import { useSetRecoilComponentFamilyState } from '@/ui/utilities/state/component-state/hooks/useSetRecoilComponentFamilyState';
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { type MouseEvent } from 'react';
import { IconLock } from 'twenty-ui/display';
import { WidgetType } from '~/generated/graphql';

const StyledNoAccessContainer = styled.div`
align-items: center;
display: flex;
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

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

The StyledNoAccessContainer is missing a height property to properly center the icon vertically within the WidgetCardContent. Since WidgetCardContent has height: 100%, this container should also have height: 100% to ensure the icon is centered both horizontally and vertically across the full available space. Similar patterns in the codebase (e.g., GraphWidgetAggregateChart) include height: 100% when centering content with flexbox.

Suggested change
display: flex;
display: flex;
height: 100%;

Copilot uses AI. Check for mistakes.
justify-content: center;
`;

type WidgetRendererProps = {
widget: PageLayoutWidget;
};
Expand Down Expand Up @@ -150,10 +157,12 @@ export const WidgetRenderer = ({ widget }: WidgetRendererProps) => {
<WidgetCardContent variant={variant}>
{hasAccess && <WidgetContentRenderer widget={widget} />}
{!hasAccess && (
<IconLock
color={theme.font.color.tertiary}
stroke={theme.icon.stroke.sm}
/>
<StyledNoAccessContainer>
<IconLock
color={theme.font.color.tertiary}
stroke={theme.icon.stroke.sm}
/>
</StyledNoAccessContainer>
)}
</WidgetCardContent>
</WidgetCard>
Expand Down
Loading