refactor: entity selector full overhaul — Mar 2026

- Unified _setBadgeCount for ALL badge updates
- target-conditions-trait → entity-selector-trait
- target-* → es-* class rename (20+ classes)
- SCSS recompiled: zero duplicate selectors
- CSS transitions replace jQuery slideDown/slideUp
- Serialize cache, method swap cache
- Badge: no-matches gray, consistent hover, no blending
- Inline condition count always visible
- Preview popover refreshes in-place on sort change
- Categories add chips immediately
- Entity type icons on chips
- Consistent info_outline icons via buildHelpIcon
- Method dropdown text clipping fix (line-height)
- mpr-input-compact on all inputs
- Dropdown padding fixed in SCSS source
- Chips wrapper: same container always
- Reusable helpers: _buildEmptyState, _buildSearchBoxHtml, _buildInfoTooltip
- Asset path: uses $this->module->getPathUri() not reflection
- Debug logs removed

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-30 18:05:43 +00:00
parent d2d4f96c5e
commit c6fd5cee13
38 changed files with 7670 additions and 8929 deletions

View File

@@ -6,8 +6,7 @@
@use '../variables' as *;
@use '../mixins' as *;
// Main wrapper (supports both .target-conditions-trait and .entity-selector-trait)
.target-conditions-trait,
// Main wrapper (supports both .entity-selector-trait and .entity-selector-trait)
.entity-selector-trait {
position: relative;
overflow: visible;
@@ -174,7 +173,7 @@
}
// Block type tabs
.target-block-tabs {
.es-block-tabs {
display: flex;
flex-wrap: wrap;
gap: 0;
@@ -183,7 +182,7 @@
border-bottom: 1px solid $es-border-color;
}
.target-block-tab {
.es-block-tab {
position: relative;
display: flex;
align-items: center;
@@ -237,7 +236,7 @@
border-bottom: 1px solid $es-border-color;
border-radius: $es-radius-lg $es-radius-lg 0 0;
.target-block-tabs {
.es-block-tabs {
flex: 1;
border-bottom: 0;
border-radius: $es-radius-lg 0 0 0;
@@ -261,7 +260,7 @@
color: $es-primary;
}
> i {
.material-icons {
font-size: 20px !important;
}
}
@@ -279,7 +278,7 @@
}
// Block container
.target-block-container {
.es-block-container {
display: none;
&.active {
@@ -287,18 +286,18 @@
}
}
.target-block-content {
.es-block-content {
padding: $es-spacing-md;
}
.target-block-groups {
.es-block-groups {
display: flex;
flex-direction: column;
gap: $es-spacing-md;
}
// Block header (for standalone blocks)
.target-block-header {
.es-block-header {
display: flex;
align-items: center;
justify-content: space-between;
@@ -308,7 +307,7 @@
}
// Empty state
.target-block-empty {
.es-block-empty {
display: flex;
flex-direction: column;
align-items: center;
@@ -366,25 +365,18 @@
}
// Single mode specific styles
.target-conditions-trait.single-mode,
.entity-selector-trait.single-mode,
.entity-selector-trait.single-mode {
// Hide tabs in standalone layout (has separate header, 1 tab is redundant)
.target-block-tabs {
.es-block-tabs {
display: none;
}
.target-block-container {
.es-block-container {
display: block;
}
// In form-content layout, always show tabs — they serve as the block title
.entity-selector-tabs-row .target-block-tabs {
display: flex;
}
}
// Header action buttons
.target-conditions-trait,
.entity-selector-trait {
.header-actions {
display: flex;