Skip to content

feat: native builder filters and field schema extensions - #223

Merged
ManukMinasyan merged 23 commits into
3.xfrom
feat/resolution-filters
Sep 8, 2026
Merged

feat: native builder filters and field schema extensions#223
ManukMinasyan merged 23 commits into
3.xfrom
feat/resolution-filters

Conversation

@ManukMinasyan

@ManukMinasyan ManukMinasyan commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Consumers can filter fields and sections directly on Table, Infolist, and Exporter builders. Application defaults use Laravel container resolving() callbacks targeted at concrete builders.

getFields() and getSections() expose standard collections. Builders provide native when(), unless(), and tap(), plus model and persisted-record accessors. Eloquent queries remain on the configured custom field model.

Adds FieldForm::extendSchemaUsing() and setting() accessors with Laravel dot notation. Settings edits preserve unrendered keys while submitted lists and nulls replace stored values.

Cloned infolists retain configured callbacks and resolve their current record. Conditional visibility retains cross-section dependencies and prioritizes same-section fields when codes repeat. Reused section scopes replace previous constraints, and collection mutation preserves cached metadata.

Filters apply to presentation builders. Forms and importers retain their existing persistence behavior.

Validation: 983 package tests pass, with three existing todos. PHPStan, Rector, Pint, and the documentation build pass. GitHub CI passes on Laravel 12 and 13 at 5391631. Relaticle passes 4,309 tests, with two existing skips, and retains 100% type coverage. Package type coverage remains 99.4%, matching the five pre-existing gaps on 3.x.

Browser checks cover field creation, editing, deletion, table columns, infolists, value persistence and clearing, and mobile empty states. A local infolist filter hides Amount while retaining Close Date and Stage. Light and dark screenshots were inspected.

The existing consumer infolist still needs a reload after saving. The original package reproduces that behavior.

… an edit

The section-edit test for a bag key with no form component passed before
SettingsMerger existed (Filament already preserved that untouched key), so
the spec's predicted wipe did not reproduce there. Kept as a pin. The other
wipe case, an extra key alongside a rendered extension key, did reproduce
and is fixed by the merge.
Retracts the earlier commit's claim that Filament preserved the untouched
extra key on its own; the prior test passed only because SECTION_CONDITIONAL_VISIBILITY
was off by default, so the section form rendered no settings.* component and
submitted no settings key at all, never exercising the merge.
Copilot AI lite review requested due to automatic review settings September 7, 2026 14:20

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 reached their quota limit.

The settings merge now recurses, so switching a field or section back to
Always visible left the old conditions in the row instead of replacing the
bag. Every reader gates on the mode, so they were dead weight that would
reappear on the next mode change.
Evaluating visibility once for the whole entity moved the model access
ahead of the empty-section short circuit, turning a builder without a
model from an empty collection into a typed property error.
@ManukMinasyan ManukMinasyan changed the title feat: resolution filters and field-form schema seam feat: native builder filters and field schema extensions Sep 8, 2026
@ManukMinasyan
ManukMinasyan merged commit dd2c0a2 into 3.x Sep 8, 2026
7 checks passed
@ManukMinasyan
ManukMinasyan deleted the feat/resolution-filters branch September 8, 2026 16:05
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