refactor(helpdesk): use semantic <hr> instead of CSS borders for rule separators

Replace border-bottom on rule items and border-top on advanced disclosure
with native <hr> elements that inherit Core's muted-border styling.
Module CSS now only handles layout, not border presentation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-05 18:05:50 +02:00
parent 76ac8b945a
commit 28d66dea33
2 changed files with 10 additions and 12 deletions

View File

@@ -292,25 +292,25 @@ $isOAuth2 = $authMode === HelpdeskSettingsGateway::AUTH_MODE_OAUTH2;
<span class="helpdesk-settings-rule-label"><?php e(t('Escalation overdue')); ?></span>
<small><?php e(t('rule_help_escalation_overdue')); ?></small>
</label>
<hr>
<label class="helpdesk-settings-rule">
<input type="checkbox" role="switch" name="recommendations_high_risk_aging_enabled" <?php if (($ruleHighRiskAging['enabled'] ?? true) === true): ?>checked<?php endif; ?>>
<span class="helpdesk-settings-rule-label"><?php e(t('High-risk aging')); ?></span>
<small><?php e(t('rule_help_high_risk_aging')); ?></small>
</label>
<hr>
<label class="helpdesk-settings-rule">
<input type="checkbox" role="switch" name="recommendations_unassigned_open_enabled" <?php if (($ruleUnassignedOpen['enabled'] ?? true) === true): ?>checked<?php endif; ?>>
<span class="helpdesk-settings-rule-label"><?php e(t('Unassigned open')); ?></span>
<small><?php e(t('rule_help_unassigned_open')); ?></small>
</label>
<hr>
<label class="helpdesk-settings-rule">
<input type="checkbox" role="switch" name="recommendations_stale_open_enabled" <?php if (($ruleStaleOpen['enabled'] ?? true) === true): ?>checked<?php endif; ?>>
<span class="helpdesk-settings-rule-label"><?php e(t('Stale open')); ?></span>
<small><?php e(t('rule_help_stale_open')); ?></small>
</label>
<hr>
<label class="helpdesk-settings-rule">
<input type="checkbox" role="switch" name="recommendations_customer_backlog_enabled" <?php if (($ruleCustomerBacklog['enabled'] ?? true) === true): ?>checked<?php endif; ?>>
<span class="helpdesk-settings-rule-label"><?php e(t('Customer backlog')); ?></span>
@@ -318,6 +318,7 @@ $isOAuth2 = $authMode === HelpdeskSettingsGateway::AUTH_MODE_OAUTH2;
</label>
</div>
<hr>
<details class="helpdesk-settings-advanced" data-details-key="helpdesk-settings-recommendations-advanced">
<summary><?php e(t('Advanced options')); ?></summary>
<div class="helpdesk-settings-advanced-grid">
@@ -367,7 +368,7 @@ $isOAuth2 = $authMode === HelpdeskSettingsGateway::AUTH_MODE_OAUTH2;
<input type="number" name="controlling_ticket_volume_increase_threshold" min="5" max="200" value="<?php e((int) ($ctrlTicketVolume['threshold_percent'] ?? 30)); ?>">
</label>
</div>
<hr>
<div class="helpdesk-settings-rule helpdesk-settings-rule-with-threshold">
<label class="helpdesk-settings-rule-toggle">
<input type="checkbox" role="switch" name="controlling_avg_resolution_high_enabled" <?php if (($ctrlAvgResolution['enabled'] ?? true) === true): ?>checked<?php endif; ?>>
@@ -379,7 +380,7 @@ $isOAuth2 = $authMode === HelpdeskSettingsGateway::AUTH_MODE_OAUTH2;
<input type="number" name="controlling_avg_resolution_high_threshold" min="1" max="720" value="<?php e((int) ($ctrlAvgResolution['threshold_hours'] ?? 72)); ?>">
</label>
</div>
<hr>
<div class="helpdesk-settings-rule helpdesk-settings-rule-with-threshold">
<label class="helpdesk-settings-rule-toggle">
<input type="checkbox" role="switch" name="controlling_open_aging_enabled" <?php if (($ctrlOpenAging['enabled'] ?? true) === true): ?>checked<?php endif; ?>>
@@ -391,7 +392,7 @@ $isOAuth2 = $authMode === HelpdeskSettingsGateway::AUTH_MODE_OAUTH2;
<input type="number" name="controlling_open_aging_threshold" min="1" max="2160" value="<?php e((int) ($ctrlOpenAging['threshold_hours'] ?? 168)); ?>">
</label>
</div>
<hr>
<div class="helpdesk-settings-rule helpdesk-settings-rule-with-threshold">
<label class="helpdesk-settings-rule-toggle">
<input type="checkbox" role="switch" name="controlling_unassigned_ratio_enabled" <?php if (($ctrlUnassigned['enabled'] ?? true) === true): ?>checked<?php endif; ?>>

View File

@@ -39,11 +39,10 @@
gap: 0 calc(var(--app-spacing) * 0.5);
align-items: center;
padding: calc(var(--app-spacing) * 0.4) 0;
border-bottom: 1px solid color-mix(in srgb, var(--app-contrast, #000) 8%, transparent);
}
.helpdesk-settings-rule:last-child {
border-bottom: none;
.helpdesk-settings-rules > hr {
margin: 0;
}
.helpdesk-settings-rule > input[type="checkbox"] {
@@ -101,8 +100,6 @@
/* Advanced options disclosure */
.helpdesk-settings-advanced {
margin-top: calc(var(--app-spacing) * 0.5);
border-top: 1px solid color-mix(in srgb, var(--app-contrast, #000) 8%, transparent);
padding-top: calc(var(--app-spacing) * 0.4);
}
.helpdesk-settings-advanced > summary {