Skip to content

Commit e1b5335

Browse files
committed
Add empty state for deprecations
Make it more obvious that the panel isn't broken.
1 parent 70e851f commit e1b5335

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

templates/element/deprecations_panel.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323

2424
use function Cake\Core\h;
2525

26+
$hasAny = count($app) + count($plugins) + count($cake) . count($vendor);
27+
2628
$printer = function ($section, $data) {
2729
?>
2830
<h3><?= h(ucfirst($section)) ?> </h3>
@@ -39,7 +41,11 @@
3941
}
4042
?>
4143
<div class="c-deprecations-panel">
42-
<?php
44+
<?php if ($hasAny) : ?>
45+
<p class="c-flash c-flash--info">No deprecations</p>
46+
<?php
47+
endif;
48+
4349
if (count($app)) :
4450
$printer('app', $app);
4551
endif;

0 commit comments

Comments
 (0)