Fix preview popover styling and icon preservation

- Preserve icon structure when updating total count in trait badge
- Add gap between title and count in preview popover header
- Style the count badge with background, padding, and rounded corners

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-02 09:34:14 +01:00
parent cd714d8400
commit 7d4d1ec618
7 changed files with 28 additions and 6 deletions

View File

@@ -31,7 +31,15 @@
var $totalBadge = this.$wrapper.find('.trait-total-count');
if (total > 0) {
$totalBadge.text(total).show();
// Update count while preserving icon structure
var $countValue = $totalBadge.find('.count-value');
if ($countValue.length) {
$countValue.text(total);
} else {
// Fallback: set HTML with icon
$totalBadge.html('<i class="icon-eye"></i> <span class="count-value">' + total + '</span>');
}
$totalBadge.show();
} else {
$totalBadge.hide();
}