5bcbe43596
> [!WARNING] > Most of the quick fixes will be dropped once we release the feature and deprecate the old show pages code. This PR fixes padding and alignment issues so that the new Record Page Layout feature looks like the old show pages. ## This PR <img width="3456" height="2160" alt="CleanShot 2026-01-16 at 17 24 40@2x" src="https://github.com/user-attachments/assets/f3640553-2316-498c-8dd0-14b09ed913f1" /> <img width="3456" height="2160" alt="CleanShot 2026-01-16 at 17 27 14@2x" src="https://github.com/user-attachments/assets/c4ccb28f-5629-4e68-83ad-863f21066962" /> ## The production <img width="3456" height="2160" alt="CleanShot 2026-01-16 at 17 25 11@2x" src="https://github.com/user-attachments/assets/a91f7216-0b57-404b-9f9d-f6f45d4858d6" /> <img width="3456" height="2234" alt="CleanShot 2026-01-16 at 17 27 19@2x" src="https://github.com/user-attachments/assets/aaf1ee6b-b323-4844-9f1a-a59807cdbe40" />
21 lines
865 B
TypeScript
21 lines
865 B
TypeScript
import { type PageLayoutType } from '~/generated/graphql';
|
|
import { createRequiredContext } from '~/utils/createRequiredContext';
|
|
import { type TargetRecordIdentifier } from './TargetRecordIdentifier';
|
|
|
|
export type LayoutRenderingContextType = {
|
|
// Optional target record - only present for record pages that display data about a specific record
|
|
// Undefined for dashboards which are standalone
|
|
// Uses ActivityTargetableObject shape for compatibility with existing components
|
|
targetRecordIdentifier: TargetRecordIdentifier | undefined;
|
|
|
|
layoutType: PageLayoutType;
|
|
|
|
isInRightDrawer: boolean;
|
|
|
|
/** TODO: Remove once the traditional record show page is removed. */
|
|
isLegacyRecordShowPage?: boolean;
|
|
};
|
|
|
|
export const [LayoutRenderingProvider, useLayoutRenderingContext] =
|
|
createRequiredContext<LayoutRenderingContextType>('LayoutRenderingContext');
|