Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/app/analyzer/sidebar/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ <h3 (click)="toggleSection('anomalyScanner')">Anomaly Scanner</h3>
class="control-group flex-grow gray-box"
[class.collapsed]="isSectionCollapsed('signals')"
>
<app-signal-list-panel idPrefix="chk-left"></app-signal-list-panel>
<app-signal-list-panel
idPrefix="chk-left"
[collapsed]="isSectionCollapsed('signals')"
(titleClick)="toggleSection('signals')"
></app-signal-list-panel>
</div>

<div
Expand Down
20 changes: 17 additions & 3 deletions src/app/analyzer/signal-list-panel/signal-list-panel.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
<div class="group-header-row">
<div class="group-header-row" (click)="titleClick.emit()">
<h3>Signals</h3>
@if (!collapsed()) {
<div class="button-row-sw">
<button class="btn btn-sm" (click)="toggleAllSignals(true)">All</button>
<button class="btn btn-sm" (click)="toggleAllSignals(false)">None</button>
<button
class="btn btn-sm"
(click)="toggleAllSignals(true); $event.stopPropagation()"
>
All
</button>
<button
class="btn btn-sm"
(click)="toggleAllSignals(false); $event.stopPropagation()"
>
None
</button>
</div>
}
</div>
@if (!collapsed()) {
<p class="section-description">
Search and select signals to display on the chart.
</p>
Expand Down Expand Up @@ -169,3 +182,4 @@ <h3>Signals</h3>
</div>
} }
</div>
}
14 changes: 13 additions & 1 deletion src/app/analyzer/signal-list-panel/signal-list-panel.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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<void>();

protected readonly appState = inject(AppStateService);
protected readonly preferences = inject(PreferencesService);
private readonly palette = inject(SignalPaletteService);
Expand Down
3 changes: 2 additions & 1 deletion src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Loading