diff --git a/src/app/analyzer/sidebar/sidebar.html b/src/app/analyzer/sidebar/sidebar.html index 74d2541..370bea4 100644 --- a/src/app/analyzer/sidebar/sidebar.html +++ b/src/app/analyzer/sidebar/sidebar.html @@ -40,7 +40,11 @@

Anomaly Scanner

class="control-group flex-grow gray-box" [class.collapsed]="isSectionCollapsed('signals')" > - +
+

Signals

+ @if (!collapsed()) {
- - + +
+ }
+@if (!collapsed()) {

Search and select signals to display on the chart.

@@ -169,3 +182,4 @@

Signals

} } +} diff --git a/src/app/analyzer/signal-list-panel/signal-list-panel.ts b/src/app/analyzer/signal-list-panel/signal-list-panel.ts index ed00d1e..e1ce5d2 100644 --- a/src/app/analyzer/signal-list-panel/signal-list-panel.ts +++ b/src/app/analyzer/signal-list-panel/signal-list-panel.ts @@ -1,4 +1,4 @@ -import { Component, inject, input, signal } from '@angular/core'; +import { Component, inject, input, output, signal } from '@angular/core'; import { AppStateService } from '../../core/app-state.service'; import { LoadedFile } from '../../core/models'; import { PreferencesService } from '../../core/preferences.service'; @@ -34,6 +34,18 @@ interface CategoryGroup { export class SignalListPanel { readonly idPrefix = input('chk'); + /** + * Whether the caller's wrapping section is collapsed. This component owns its own "Signals" + * title (shared with SignalsEdgePanel, which never collapses it), so Sidebar can't just hide + * this whole element the way it does for its other sections -- instead it passes the collapsed + * state in and this component hides its own body while keeping the header (and the way back + * to expand it) visible. + */ + readonly collapsed = input(false); + + /** Emitted when the title row is clicked; Sidebar wires this to its own toggleSection('signals'). */ + readonly titleClick = output(); + protected readonly appState = inject(AppStateService); protected readonly preferences = inject(PreferencesService); private readonly palette = inject(SignalPaletteService); diff --git a/src/styles.css b/src/styles.css index 098fa07..ab036f9 100644 --- a/src/styles.css +++ b/src/styles.css @@ -238,7 +238,8 @@ body:not(.dark-theme) .sidebar h2 { float: right; } -.control-group.collapsed > :not(h3, .group-header, .group-header-row) { +.control-group.collapsed + > :not(h3, .group-header, .group-header-row, app-signal-list-panel) { display: none !important; }