fix(hints): position "?" next to page title, fix Admin pages missing
Switched render hook from PAGE_HEADER_ACTIONS_BEFORE to PAGE_HEADER_HEADING_AFTER: - Previous hook lived inside the action buttons container which is skipped on pages without header actions (most Admin pages: Settings, Integrations, API Tokens, Backup, Activity log). - Previous hook also pushed the icon to the right side on pages that did have actions (Clienți, Mașini, Calendar list), which looked disconnected from the title. New hook renders "?" immediately after the page heading text on every page, always visible. Also fixed one URL prefix mismatch: app/pipeline → app/pipeline-board (actual Filament page slug). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -229,16 +229,16 @@ class TenantPanelProvider extends PanelProvider
|
||||
BLADE),
|
||||
scopes: [Dashboard::class],
|
||||
)
|
||||
// Auto-injected hint on every page whose URL maps to a hint key.
|
||||
// Reads the current request path and looks it up in Hints::forPath().
|
||||
// Blades that already embedded <x-hint> stay untouched — this only
|
||||
// fires on pages that don't have their own.
|
||||
// Auto-inject "?" hint icon right after the page title on every
|
||||
// main page whose URL matches an entry in Hints::forPath().
|
||||
// PAGE_HEADER_HEADING_AFTER always renders (unlike the actions
|
||||
// slot which is skipped on pages without header actions).
|
||||
->renderHook(
|
||||
PanelsRenderHook::PAGE_HEADER_ACTIONS_BEFORE,
|
||||
PanelsRenderHook::PAGE_HEADER_HEADING_AFTER,
|
||||
fn (): string => Blade::render(<<<'BLADE'
|
||||
@php $__hintKey = \App\Support\Hints::forPath(request()->path()); @endphp
|
||||
@if ($__hintKey)
|
||||
<span style="display:inline-flex;align-items:center;margin-right:8px;"><x-hint :key="$__hintKey" /></span>
|
||||
<x-hint :key="$__hintKey" />
|
||||
@endif
|
||||
BLADE),
|
||||
)
|
||||
|
||||
@@ -743,7 +743,7 @@ class Hints
|
||||
'app/vehicles' => 'crm.vehicles.overview',
|
||||
'app/leads' => 'crm.leads.overview',
|
||||
'app/deals' => 'crm.pipeline.overview',
|
||||
'app/pipeline' => 'crm.pipeline.overview',
|
||||
'app/pipeline-board' => 'crm.pipeline.overview',
|
||||
'app/calendar-board' => 'crm.calendar.overview',
|
||||
'app/appointments' => 'crm.calendar.overview',
|
||||
'app/calls' => 'crm.calls.overview',
|
||||
|
||||
Reference in New Issue
Block a user