Skip to content

Commit

Permalink
Add empty state for deprecations
Browse files Browse the repository at this point in the history
Make it more obvious that the panel isn't broken.
  • Loading branch information
markstory committed May 27, 2024
1 parent 70e851f commit e1b5335
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion templates/element/deprecations_panel.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

use function Cake\Core\h;

$hasAny = count($app) + count($plugins) + count($cake) . count($vendor);

$printer = function ($section, $data) {
?>
<h3><?= h(ucfirst($section)) ?> </h3>
Expand All @@ -39,7 +41,11 @@
}
?>
<div class="c-deprecations-panel">
<?php
<?php if ($hasAny) : ?>
<p class="c-flash c-flash--info">No deprecations</p>
<?php
endif;

if (count($app)) :
$printer('app', $app);
endif;
Expand Down

0 comments on commit e1b5335

Please sign in to comment.