Skip to content

[6.x] Link columns in Table fields - #19998

Merged
brandonkelly merged 5 commits into
6.xfrom
rias/cms-1330-link-columns-in-table-fields
Oct 19, 2026
Merged

brandonkelly merged 5 commits into
6.xfrom
rias/cms-1330-link-columns-in-table-fields

Conversation

@riasvdv

@riasvdv riasvdv commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Table field
├── Link column type (TableCells\Link) — same settings as Link fields
│   ├── cells normalize to LinkData; linked elements batch-load on first access
│   ├── element links localize on propagation, and count as field references
│   ├── GraphQL: LinkData / LinkDataInput
│   ├── editor: summary + “Add link” / “Edit link” → the Link field popover
│   └── unavailable link types: kept as-is, locked, still removable
└── column settings: dialog → slideout with Apply / Cancel

Link field
└── normalize / validate / localize → LinkResolver (shared with Link cells)

Evidence

  • Before: Table fields had no Link column type.
    After: Link cells summarize the link and edit it in the Link field popover. A cell whose link type is no longer installed keeps its value, but is locked:

    Link cells in a Table field with the link popover open

    Column settings open in a slideout:

    The Link column settings in a slideout

  • Before: replacing references in a Link field rewrote links to unrelated elements (in_array(! $id, …) never matched) and dropped their labels.
    After:

    // tests/Feature/Field/TableLinkColumnTest.php
    replaceReferences(source, oldTargetIds: [unrelated], newTarget) → false
    replaceReferences(source, oldTargetIds: [old], newTarget)       → true
    stored link → {value: "{entry:new@site:url}", label: "Old"}
    

Related issues

Table fields get a Link column type with the same settings as Link fields.
Link cells normalize to LinkData, track and localize element references,
batch-load linked elements, and use the LinkData GraphQL types. Cells
edit links in the Link field popover, and Table column settings now open
in a slideout.

The Link field's normalization, validation, and localization move into
LinkResolver, which also fixes replacing references in Link fields.
@linear-code

linear-code Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

CMS-1330

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

📚 Storybook previews

@craftcms/ui — open Storybook

No changed components detected in this Storybook.

resources/js — open Storybook

No changed components detected in this Storybook.

@riasvdv
riasvdv requested a review from brandonkelly October 16, 2026 12:12
…umns-in-table-fields

# Conflicts:
#	CHANGELOG.md
@github-actions

Copy link
Copy Markdown

This PR had conflicts with 6.x. Claude attempted an automatic resolution and pushed a merge commit. Please review the merge commit carefully before approving/merging.

Claude's response

I've resolved the one conflict and committed the merge as b8a5cbe. It hasn't been pushed. No other files had conflicts, and nothing needed a # CONFLICT-REVIEW: comment.

Conflicts

  • CHANGELOG.md, the Unreleased → Content Management list. 6.x split the Unreleased notes into new sections (Control Panel UI, Accessibility, Administration, Extensibility). Several lines this branch had in the conflicting block are now in those 6.x sections:

    • the activity timeline badge line
    • the three Selectize/Autosuggest combobox lines
    • the "Updated the index pages … shared UI tables" line

    I dropped this branch's copies of those so they don't appear twice. I kept the four Table-field entries for [6.x] Link columns in Table fields #19998: the Link column type, column settings opening in a slideout, cell errors naming the column, and invalid columns being flagged. They sit at the end of Content Management, before 6.x's new [6.x] Open admin table rows on double-click #19957 admin-table double-click line, and the Accessibility heading that 6.x added follows straight after.

Worth a quick look

  • Section choice for the Table lines. Putting them under Content Management is my judgement call. The column-settings and invalid-settings lines describe field settings screens, so a reviewer might prefer them under Administration.

Not changed

  • Entries in the Extensibility section. I left this branch's [6.x] Link columns in Table fields #19998 entries there as they were (the TableCellInterface, ElementAwareTableCellInterface, LinkResolver and Link::compact() lines), because they merged without a conflict.

@brandonkelly
brandonkelly merged commit 6cf4d17 into 6.x Oct 19, 2026
@brandonkelly
brandonkelly deleted the rias/cms-1330-link-columns-in-table-fields branch October 19, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants