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:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -436,6 +436,7 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: $es-spacing-md;
|
||||
padding: $es-spacing-sm $es-spacing-md;
|
||||
background: $es-bg-header;
|
||||
border-bottom: 1px solid $es-border-color;
|
||||
@@ -447,8 +448,13 @@
|
||||
}
|
||||
|
||||
.preview-popover-count {
|
||||
flex-shrink: 0;
|
||||
font-size: $es-font-size-xs;
|
||||
font-weight: $es-font-weight-medium;
|
||||
color: $es-text-muted;
|
||||
background: $es-slate-200;
|
||||
padding: 0.125rem 0.5rem;
|
||||
border-radius: $es-radius-sm;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user