Skip to content

fix: show the entity icon for a linked record without an image on view pages - #293

Merged
ManukMinasyan merged 1 commit into
3.xfrom
fix/record-entry-icon
Nov 7, 2026
Merged

ManukMinasyan merged 1 commit into
3.xfrom
fix/record-entry-icon

Conversation

@ManukMinasyan

Copy link
Copy Markdown
Member

A record-type field on a view page now shows its entity's icon when the linked record has no image, as the table column does since v3.18.1. Before, a company without a logo or a person without a photo showed only an underlined name in the infolist, beside native relation entries that did show an icon.

What changed

  • RecordEntry::formatRecord() adds the icon key RecordColumn already returns: the entity icon when the entity has an avatar configuration and this record's image is blank.
  • infolists/record-entry.blade.php replaces its two inline <img> blocks with the tables/columns/partials/record-avatar partial from fix: pad the record column and show the entity icon for a record without an image #292. The partial draws the image, or else the 20px tile with a 12px entity icon in the avatar's shape.

Why this way

The entry reuses the table's rule and partial, so a record looks the same in a table cell and on its parent's view page. Entities without an avatar configuration (notes, tasks) keep no tile, as in the table.

Behavior to know about

  • Visual change for consumers whose entities configure an avatar: on view pages, linked records without an image gain an icon tile.
  • RecordEntry is final and formatRecord() is private, so the new state key reaches no consumer code. A consumer that copied infolists/record-entry.blade.php into resources/views/vendor/custom-fields keeps its copy and sees no change.
  • No migration, no config key, no new dependency. The tile uses the classes the table tile already uses.

Tests

tests/Feature/Filament/Components/RecordEntryTest.php renders the custom-fields infolist inside a Livewire schema component:

  • a linked record with an image renders the image and no tile, and one without renders the tile;
  • an entity with no avatar configuration renders no tile.

Checked

  • The new test failed on the missing tile before the fix and passes after it.
  • tests/Feature/Filament/Components and tests/Feature/Integration/Resources/Pages: 162 passed, 2 todo. Pint, Rector and PHPStan are clean.
  • Rendered in a host app (Relaticle) on an opportunity view page: a company field and a person field each show their tile, 20px with a 12px icon, in Chromium light and dark and in WebKit.

Not checked

The full suite runs in CI on this PR.

Copilot AI balanced review requested due to automatic review settings November 7, 2026 17:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@ManukMinasyan
ManukMinasyan added this pull request to the merge queue Nov 7, 2026
Merged via the queue into 3.x with commit eb646ee Nov 7, 2026
7 checks passed
@ManukMinasyan
ManukMinasyan deleted the fix/record-entry-icon branch November 7, 2026 17:59
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