Skip to content

Commit f3eef9d

Browse files
author
Callin Mullaney
committed
chore: remove unused Environment and deployment status section of the theme
1 parent 58539ab commit f3eef9d

1 file changed

Lines changed: 0 additions & 43 deletions

File tree

src/Hook/ThemeSettingsHooks.php

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ final class ThemeSettingsHooks {
4242
'source_diagnostics_notice',
4343
'status',
4444
'package_status_notice',
45-
'environment_status_notice',
4645
'maskable_info',
4746
'maskable_icon_notice',
4847
'generation_hint',
@@ -250,11 +249,6 @@ public function formSystemThemeSettingsAlter(array &$form, FormStateInterface $f
250249
'#title' => $this->t('Current generated package'),
251250
'#markup' => $package_status['status_markup'],
252251
];
253-
$form['emulsify_favicon']['environment_status_notice'] = [
254-
'#type' => 'item',
255-
'#title' => $this->t('Environment and deployment status'),
256-
'#markup' => $this->buildEnvironmentStatusMarkup($settings, $package_status),
257-
];
258252

259253
$form['emulsify_favicon']['browser'] = [
260254
'#type' => 'details',
@@ -642,43 +636,6 @@ private function buildStatusMarkup(array $status): string {
642636
};
643637
}
644638

645-
/**
646-
* Builds dependency and deployment guidance for the current environment.
647-
*/
648-
private function buildEnvironmentStatusMarkup(array $settings, array $package_status): string {
649-
$dependencies = $this->faviconThemeManager->getRuntimeDependencyStatus();
650-
$portable_source_size = (int) ($package_status['portable_source_size'] ?? 0);
651-
652-
$items = [
653-
$this->t('Generated favicon package enabled: @value', ['@value' => $this->formatBooleanStatus((bool) $settings['favicon_package_enabled'])]),
654-
$this->t('GD available: @value', ['@value' => $this->formatBooleanStatus($dependencies['gd'])]),
655-
$this->t('Imagick available: @value', ['@value' => $this->formatBooleanStatus($dependencies['imagick'])]),
656-
$this->t('Active theme package exists: @value', ['@value' => $this->formatBooleanStatus((bool) $package_status['package_exists'])]),
657-
$this->t('Portable SVG source available: @value', ['@value' => $this->formatBooleanStatus((bool) $package_status['portable_source_available'])]),
658-
];
659-
660-
if (!empty($package_status['portable_source_available'])) {
661-
$items[] = $this->t('Portable SVG source size: @size', ['@size' => $this->formatBytes($portable_source_size)]);
662-
}
663-
664-
$markup_items = [];
665-
foreach ($items as $item) {
666-
$markup_items[] = '<li>' . Html::escape((string) $item) . '</li>';
667-
}
668-
669-
return '<div class="messages messages--status" role="status"><div>'
670-
. '<p>' . Html::escape((string) $this->t('Recommended deployment flow: generate favicon packages on admin save, regenerate them during deployment with drush emulsify_tools:favicon-generate [theme_name] before public traffic reaches the environment when the helper module is installed, and rely on runtime generation only as a lock-protected fallback.')) . '</p>'
671-
. '<ul>' . implode('', $markup_items) . '</ul>'
672-
. '</div></div>';
673-
}
674-
675-
/**
676-
* Formats a boolean status for operator-facing diagnostics.
677-
*/
678-
private function formatBooleanStatus(bool $value): string {
679-
return $value ? 'Yes' : 'No';
680-
}
681-
682639
/**
683640
* Formats a byte count for admin diagnostics.
684641
*/

0 commit comments

Comments
 (0)