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:
2026-09-01 10:39:37 +00:00
parent d7f1a43400
commit dbac930523
2 changed files with 7 additions and 7 deletions
@@ -229,16 +229,16 @@ class TenantPanelProvider extends PanelProvider
BLADE), BLADE),
scopes: [Dashboard::class], scopes: [Dashboard::class],
) )
// Auto-injected hint on every page whose URL maps to a hint key. // Auto-inject "?" hint icon right after the page title on every
// Reads the current request path and looks it up in Hints::forPath(). // main page whose URL matches an entry in Hints::forPath().
// Blades that already embedded <x-hint> stay untouched — this only // PAGE_HEADER_HEADING_AFTER always renders (unlike the actions
// fires on pages that don't have their own. // slot which is skipped on pages without header actions).
->renderHook( ->renderHook(
PanelsRenderHook::PAGE_HEADER_ACTIONS_BEFORE, PanelsRenderHook::PAGE_HEADER_HEADING_AFTER,
fn (): string => Blade::render(<<<'BLADE' fn (): string => Blade::render(<<<'BLADE'
@php $__hintKey = \App\Support\Hints::forPath(request()->path()); @endphp @php $__hintKey = \App\Support\Hints::forPath(request()->path()); @endphp
@if ($__hintKey) @if ($__hintKey)
<span style="display:inline-flex;align-items:center;margin-right:8px;"><x-hint :key="$__hintKey" /></span> <x-hint :key="$__hintKey" />
@endif @endif
BLADE), BLADE),
) )
+1 -1
View File
@@ -743,7 +743,7 @@ class Hints
'app/vehicles' => 'crm.vehicles.overview', 'app/vehicles' => 'crm.vehicles.overview',
'app/leads' => 'crm.leads.overview', 'app/leads' => 'crm.leads.overview',
'app/deals' => 'crm.pipeline.overview', 'app/deals' => 'crm.pipeline.overview',
'app/pipeline' => 'crm.pipeline.overview', 'app/pipeline-board' => 'crm.pipeline.overview',
'app/calendar-board' => 'crm.calendar.overview', 'app/calendar-board' => 'crm.calendar.overview',
'app/appointments' => 'crm.calendar.overview', 'app/appointments' => 'crm.calendar.overview',
'app/calls' => 'crm.calls.overview', 'app/calls' => 'crm.calls.overview',