Describe the bug
I have this weird bug that only occured when I disabled blaze
The dynamic component slot's content not rendered at all. To simplify the issue, here is some screenshot of the slot layout
Blaze enabled
Blaze disabled
Component causing the issue
components
livewire
- notification-section
- unread
- unread.blade.php
- unread.php
pages
- notifications
- notifications.blade.php
- notifications.php
// page component $current = 'notification-section.unread';
<div>
<livewire:dynamic-component :is="$current" :wire:key="$current">
// global filter slot
</livewire:dynamic-component>
</div>
// livewire.notification-section.unread.unread.blade.php
<x-notification.section>
<x-slot name="filter">
{{ $slot }} // global filter slot goes here
</x-slot>
<x-slot name="markButtons">
// button slot for unread notification
</x-slot>
</x-notification-section>
// components.notification.section.index.blade.php
@blaze(fold: true, unsafe: ['markButtons', 'filter'])
<div>
// some default content for all types of notification
@if ($markButtons->isNotEmpty())
{{ $markButtons }} // button slot for each type of notification goes here
@endif
@if ($filter->isNotEmpty())
{{ $filter }} // global filter slot goes here
@endif
@foreach ($this->notifications as $notification)
<div wire:key="notification-{{ $notification->id }}">
<x-notification :mention="$notification->mention"
:notification="$notification"
:user="$notification->user" />
</div>
@endforeach
</div>
// components.notification.index.blade.php
@blaze(fold: true)
@props([
'user' => null,
'mention' => null,
'notification' => null,
])
@php
$icon = $notification->read() ? 'envelope-open' : 'envelope';
@endphp
<x-dynamic-component {{ $attributes }}
:icon="$icon"
component="notification.{{ $notification->read() ? 'read' : 'unread' }}">
<x-slot name="heading">
// heading goes here
</x-slot>
<x-slot name="content">
// content goes here
</x-slot>
</x-dynamic-component>
// components.notification.unread.blade.php
@blaze(fold: true, memo: true, safe: ['heading', 'content', 'links'])
@aware([
'notification' => null,
])
@props([
'icon' => 'envelope',
])
<flux:callout :icon="$icon" inline>
<div class="flex flex-col gap-4">
<flux:callout.heading :icon="$icon" class:icon="sm:hidden">
{{ $heading }} // not rendered when blaze disabled
</flux:callout.heading>
{{ $content }} // not rendered when blaze disabled
</div>
</flux:callout>
Expected behavior
I expect it rendered properly either Blaze is enabled or disabled
Actual behavior
It only rendered when Blaze is enabled.
Environment
- Laravel version: ^13.0
- PHP version: 8.4
- Blaze version: ^1.0
Additional context
What I have tried:
php artisan view:clear
php artisan:optimize:clear
composer remove livewire/blaze
Describe the bug
I have this weird bug that only occured when I disabled blaze
The dynamic component slot's content not rendered at all. To simplify the issue, here is some screenshot of the slot layout
Blaze enabled
Blaze disabled
Component causing the issue
components
livewire
pages
Expected behavior
I expect it rendered properly either Blaze is enabled or disabled
Actual behavior
It only rendered when Blaze is enabled.
Environment
Additional context
What I have tried:
php artisan view:clearphp artisan:optimize:clearcomposer remove livewire/blaze