|
8 | 8 | * (`buildDefaultPageSchema`). |
9 | 9 | */ |
10 | 10 |
|
11 | | -import { createElement, useState, useEffect, useLayoutEffect, useCallback, useContext, useMemo, useRef, type ReactElement } from 'react'; |
| 11 | +import { useState, useEffect, useLayoutEffect, useCallback, useContext, useMemo, useRef, type ReactElement } from 'react'; |
12 | 12 | import { useParams, useNavigate, useLocation, useSearchParams, Link } from 'react-router-dom'; |
13 | 13 | import { activityRowToFeedItem, composeImpersonatedActor, IMPERSONATED_ACTOR_FALLBACK, auditEntriesToFeedItems, bodyTableIdsOf, claimQueuedRecord, RECORD_PAGE_TIMELINE_PANEL, RECORD_TIMELINE_PANEL_MAX_ENTRIES, RecordFieldChangesContext, RecordFieldHistoryContext, RecordTimelineTotalContext, DefaultRecordPageContext, EMPTY_RELATED_ARRANGEMENT, InlineEditSaveBar, RecordBodyTablesContext, RecordMetaFooter, RecordPageColumns, buildDefaultPageColumns, buildDefaultPageSchema, extractMentions, isRefusedFeedRead, recordPageTierHasRightColumn, recordSitsInQueue, resolveTitleField, useQueueClaimOffered, useRecordEditable, useRecordPageTier } from '@object-ui/plugin-detail'; |
14 | | -import { Empty, EmptyTitle, EmptyDescription, Button, PageHeaderActions, PageHeaderPhoneContext, PageHeaderTrailingContext, PanelToggles, RecordHeaderBarContext, RecordHeaderStateContext, RecordTopBar, RecordTopBarButton, cn, useRecordStepKeys, type PanelToggleItem, type RecordHeaderBar, type RecordHeaderGroupParts, type RecordHeaderState, type RecordTopBarStepper } from '@object-ui/components'; |
15 | | -import { getIcon } from '../utils/getIcon.js'; |
| 14 | +import { Empty, EmptyTitle, EmptyDescription, Button, PageHeaderActions, PageHeaderPhoneContext, PageHeaderTrailingContext, PanelToggles, ObjectIconTile, RecordHeaderBarContext, RecordHeaderStateContext, RecordTopBar, RecordTopBarButton, cn, useRecordStepKeys, type PanelToggleItem, type RecordHeaderBar, type RecordHeaderGroupParts, type RecordHeaderState, type RecordTopBarStepper } from '@object-ui/components'; |
16 | 15 | import { isActingApprover } from '../utils/approvalDecisionFold.js'; |
17 | 16 | import { useAuth, createAuthenticatedFetch } from '@object-ui/auth'; |
18 | 17 | import { usePermissions } from '@object-ui/permissions'; |
@@ -5278,10 +5277,11 @@ export function RecordDetailView({ dataSource, objects, onEdit, objectNameOverri |
5278 | 5277 | data-record-bar-title="" |
5279 | 5278 | /> |
5280 | 5279 | ); |
| 5280 | + // objectstack#35985 — the record row leads with the object's tile: white |
| 5281 | + // glyph on the object's colour, gray without one. |
5281 | 5282 | const objectIconName = typeof (objectDef as any)?.icon === 'string' ? ((objectDef as any).icon as string) : undefined; |
5282 | | - const objectIcon = objectIconName |
5283 | | - ? createElement(getIcon(objectIconName), { className: 'h-4 w-4 shrink-0 text-muted-foreground', 'aria-hidden': true }) |
5284 | | - : null; |
| 5283 | + const objectColor = typeof (objectDef as any)?.color === 'string' ? ((objectDef as any).color as string) : undefined; |
| 5284 | + const objectIcon = objectIconName ? <ObjectIconTile icon={objectIconName} color={objectColor} /> : null; |
5285 | 5285 | const pageLeading = embedded ? null : pageTrail.length > 0 ? ( |
5286 | 5286 | <> |
5287 | 5287 | {originFrom?.pathname && ( |
|
0 commit comments