Skip to content

Conversation

@Boy132
Copy link
Member

@Boy132 Boy132 commented Nov 27, 2025

Allows plugins to add to our footer, e.g. additional links or info texts.

@Boy132 Boy132 self-assigned this Nov 27, 2025
@coderabbitai
Copy link

coderabbitai bot commented Nov 27, 2025

📝 Walkthrough

Walkthrough

Added two render-hook invocation points to the footer Blade template (start and end) and introduced a new string-backed PHP enum App\Enums\CustomRenderHooks declaring the corresponding hook identifiers.

Changes

Cohort / File(s) Change Summary
Footer template
resources/views/filament/layouts/footer.blade.php
Inserted two render-hook calls at the start and before the footer closing to expose extension points for injected content. Minor surrounding formatting adjustments.
Render hook enum
app/Enums/CustomRenderHooks.php
Added a new string-backed PHP enum CustomRenderHooks with cases FooterStart = 'pelican::footer.start' and FooterEnd = 'pelican::footer.end'.

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly describes the main change: adding custom render hooks to the footer, which matches the core functionality introduced in both modified files.
Description check ✅ Passed The description accurately explains the purpose of the changes, stating that plugins can now add content to the footer such as links or info texts, which aligns with the hook implementation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Member

@rmartinoscar rmartinoscar left a comment

Choose a reason for hiding this comment

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

Enums ?

Copy link
Member

@rmartinoscar rmartinoscar left a comment

Choose a reason for hiding this comment

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

Chef's kiss

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
resources/views/filament/layouts/footer.blade.php (1)

2-2: Consider using Blade directives for improved readability (optional).

The fully qualified class names are correct but make the template verbose. For improved readability, you could optionally use Blade's @use directive (if using PHP 8.1+):

@use('Filament\Support\Facades\FilamentView')
@use('App\Enums\CustomRenderHooks')

{{ FilamentView::renderHook(CustomRenderHooks::FooterStart->value) }}
...
{{ FilamentView::renderHook(CustomRenderHooks::FooterEnd->value) }}

However, the current implementation is perfectly valid and avoids potential naming conflicts.

Also applies to: 18-18

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1004dc2 and 4aad651.

📒 Files selected for processing (2)
  • app/Enums/CustomRenderHooks.php (1 hunks)
  • resources/views/filament/layouts/footer.blade.php (2 hunks)
🔇 Additional comments (3)
app/Enums/CustomRenderHooks.php (1)

5-9: LGTM! Clean implementation of render hook identifiers.

The string-backed enum provides type safety for the footer render hooks and follows Laravel/Filament naming conventions. The implementation is straightforward and serves its purpose well.

resources/views/filament/layouts/footer.blade.php (2)

2-3: Hook integration looks correct.

The FooterStart hook is properly placed at the beginning of the footer content, allowing plugins to inject content before the copyright notice. The syntax correctly accesses the enum's string value with ->value.


18-18: FooterEnd hook correctly positioned.

The hook is properly placed at the end of the footer, allowing plugins to append content after all existing footer elements. The implementation is consistent with the FooterStart hook.

@Boy132 Boy132 merged commit efa8eef into main Nov 27, 2025
25 checks passed
@Boy132 Boy132 deleted the boy132/custom-render-hooks branch November 27, 2025 22:56
@github-actions github-actions bot locked and limited conversation to collaborators Nov 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants