Skip to content

Commit ca66281

Browse files
committed
fix(plugin-detail): a related list's date column reads in one absolute face
RelatedList's table cell builder passes inGridColumn on every cell it makes, as ObjectGrid does, so an undeclared date column paints one absolute face with the relative phrase as its title. A declared format still wins. Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup Co-authored-by: Claude <noreply@anthropic.com>
1 parent 548f25d commit ca66281

3 files changed

Lines changed: 23 additions & 1 deletion

File tree

‎.changeset/25884-grid-date-absolute.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ A list grid's `date` column used to mix three faces in one column, for example "
1313
- **Default change for an undeclared `format` (visible from metadata).** In a grid column, a `date` field that declares no `format` now renders the locale's short absolute date: `Oct 25`, with the year added when the date is not in the current year. Every row of the column uses this one face. The group headings of a grid grouped by that field change with it, so a heading still reads like the cell under it.
1414
- **The relative phrase moves to the tooltip.** It is shown on hover ("Yesterday", "In 2 days", or "Overdue 3d" on a declared `dueLike` field). A date outside the ±7-day window has no relative phrase, so it keeps its ISO `title` as before. A past declared deadline is still red.
1515
- **A declared `format` still wins.** A field that declares `format: 'relative'` keeps the relative face in the grid. This is how an author who wants relative wording in a list keeps it.
16-
- **Other surfaces are unchanged.** The record detail body, the header highlights strip, kanban and gallery cards, the tree, a record page's related list and the grid's record panel render `date` cells as before. `DateCellRenderer` paints the absolute default only when its host passes the new `inGridColumn` prop, and `ObjectGrid` passes it on every column it builds. On mobile, a grid card draws its title through the column's cell, so a `date` title reads absolute there too; the card's other date slots were already absolute. `datetime` cells are not affected, because their default face was already absolute (`compact`).
16+
- **Other surfaces are unchanged.** The record detail body, the header highlights strip, kanban and gallery cards, the tree and the grid's record panel render `date` cells as before. `DateCellRenderer` paints the absolute default only when its host passes the new `inGridColumn` prop, and `ObjectGrid` passes it on every column it builds. On mobile, a grid card draws its title through the column's cell, so a `date` title reads absolute there too; the card's other date slots were already absolute. `datetime` cells are not affected, because their default face was already absolute (`compact`).
1717

1818
What to do: nothing. To keep the relative wording in a grid column, declare `format: 'relative'` on the field.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@object-ui/plugin-detail': patch
3+
---
4+
5+
fix(plugin-detail): a related list's `date` column reads in one absolute face when its field declares no `format`
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
A record page's related list drew its `date` column in mixed faces, for example "Yesterday · 3 days ago · Sep 20, 2025", the way list grids did before their own fix. The related list builds its own table cells and did not tell the date cell that it sits in a column.
11+
12+
- **Default change for an undeclared `format` (visible from metadata).** In a related list's table, a `date` field that declares no `format` now renders the locale's short absolute date (`Oct 25`, with the year when the date is not in the current year), one face for every row, as a list grid already does.
13+
- **The relative phrase moves to the tooltip.** It is shown on hover ("Yesterday", "In 2 days", or "Overdue 3d" on a declared `dueLike` field). A past declared deadline is still red.
14+
- **A declared `format` still wins.** A field that declares `format: 'relative'` keeps the relative face.
15+
- **Other surfaces are unchanged.** The phone-width gallery of a related list, the record detail body and the header highlights strip render `date` values as before. `datetime` cells are not affected.
16+
17+
What to do: nothing. To keep the relative wording in a related list's column, declare `format: 'relative'` on the field.

‎ui/packages/plugin-detail/src/RelatedList.tsx‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1666,6 +1666,11 @@ export const RelatedList: React.FC<RelatedListProps> = ({
16661666
// The CHILD row's own `settledWhen` verdict (objectui#11815), judged
16671667
// against the row the table hands this cell — never the parent record.
16681668
deadlineSettled: isDeadlineSettled(def, row, { scope: predicateScope, fields: objectSchema?.fields }),
1669+
// Every cell this builder makes is one of a table COLUMN's cells
1670+
// (objectstack#26344, the grid's objectstack#25884): an undeclared
1671+
// `date` reads in one absolute face down the column, its relative
1672+
// phrase the tooltip. A declared `format` still wins.
1673+
inGridColumn: true,
16691674
});
16701675
};
16711676
};

0 commit comments

Comments
 (0)