Implements Spec 082 updates to the Filament Action Surface Contract: - New required list/table slot: InspectAffordance (clickable row via recordUrl preferred; also supports View action or primary link column) - Retrofit view-only tables to remove lone View row action buttons and use clickable rows - Update validator + guard tests, add golden regression assertions - Add docs: docs/ui/action-surface-contract.md Tests (local via Sail): - vendor/bin/sail artisan test --compact tests/Feature/Guards/ActionSurfaceContractTest.php - vendor/bin/sail artisan test --compact tests/Feature/Guards/ActionSurfaceValidatorTest.php - vendor/bin/sail artisan test --compact tests/Feature/Rbac/ActionSurfaceRbacSemanticsTest.php - vendor/bin/sail artisan test --compact tests/Feature/Filament/EntraGroupSyncRunResourceTest.php Notes: - Filament v5 / Livewire v4 compatible. - No destructive-action behavior changed in this PR. Co-authored-by: Ahmed Darrazi <ahmeddarrazi@MacBookPro.fritz.box> Reviewed-on: #100
103 lines
2.6 KiB
JSON
103 lines
2.6 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://tenantatlas.local/schemas/action-surface-declaration.schema.json",
|
|
"title": "ActionSurfaceDeclaration",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["version", "componentType", "profile", "defaults", "slots"],
|
|
"properties": {
|
|
"version": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"componentType": {
|
|
"type": "string",
|
|
"enum": ["Resource", "Page", "RelationManager"]
|
|
},
|
|
"profile": {
|
|
"type": "string",
|
|
"enum": [
|
|
"CrudListAndEdit",
|
|
"CrudListAndView",
|
|
"ListOnlyReadOnly",
|
|
"RunLog"
|
|
]
|
|
},
|
|
"defaults": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["moreGroupLabel"],
|
|
"properties": {
|
|
"moreGroupLabel": {
|
|
"type": "string",
|
|
"const": "More"
|
|
},
|
|
"exportIsDefaultBulkActionForReadOnly": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"slots": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"ListHeader": { "$ref": "#/$defs/slotRequirement" },
|
|
"ListRowPrimary": { "$ref": "#/$defs/slotRequirement" },
|
|
"ListRowMoreMenu": { "$ref": "#/$defs/slotRequirement" },
|
|
"ListBulkMoreGroup": { "$ref": "#/$defs/slotRequirement" },
|
|
"ListEmptyState": { "$ref": "#/$defs/slotRequirement" },
|
|
"DetailHeader": { "$ref": "#/$defs/slotRequirement" }
|
|
}
|
|
},
|
|
"exemptions": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/exemption" }
|
|
}
|
|
},
|
|
"$defs": {
|
|
"slotRequirement": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["status"],
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"enum": ["Satisfied", "Exempt"]
|
|
},
|
|
"details": {
|
|
"type": "string"
|
|
},
|
|
"requiresTypedConfirmation": {
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
}
|
|
},
|
|
"exemption": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["slot", "reason"],
|
|
"properties": {
|
|
"slot": {
|
|
"type": "string",
|
|
"enum": [
|
|
"ListHeader",
|
|
"ListRowPrimary",
|
|
"ListRowMoreMenu",
|
|
"ListBulkMoreGroup",
|
|
"ListEmptyState",
|
|
"DetailHeader"
|
|
]
|
|
},
|
|
"reason": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"trackingRef": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|