fix(live-tv): migrate the live navigation helpers to the per-surface sidebar API

master (#1554) added `XtreamLiveChannelNavigationService` and
`stalker-live-navigation.ts`, which expand the rail through
`sidebar.setState('expanded')` on the pre-split signature. Point them at the
`portal` surface and update their specs; drop the now-unused hidden-state
stub from the Xtream layout spec, which master pushed to the max-lines
budget.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Fable 5.1 committed 2026-09-06 10:55:02 +02:00
1 parent 276a7b756b
commit b6b18d7269
5 files changed
+9 -19

No files matched your search

@@ -209,7 +209,7 @@ describe('StalkerLiveNavigation', () => {
);
expect(store.selectedCategoryId()).toBe('news');
expect(store.searchPhrase()).toBe('');
expect(sidebar.setState).toHaveBeenCalledWith('expanded');
expect(sidebar.setState).toHaveBeenCalledWith('portal', 'expanded');
expect(revealRow).toHaveBeenCalledWith('1');
expect(play).not.toHaveBeenCalled();
expect(navigation.canReveal()).toBe(false);
@@ -266,7 +266,7 @@ export class StalkerLiveNavigation {
this.options.store.setSearchPhrase('');
this.options.store.setSelectedCategory(category);
this.options.store.setPage(0);
this.options.sidebar.setState('expanded');
this.options.sidebar.setState('portal', 'expanded');
this.revealed.set({ owner, category, item: active });
this.pendingReveal.set({
owner,
@@ -40,10 +40,7 @@ import {
RecordingStoppedEvent,
ResolvedPortalPlayback,
} from '@iptvnator/shared/interfaces';
import {
ChannelListHiddenStateComponent,
GridListComponent,
} from '@iptvnator/portal/shared/ui';
import { GridListComponent } from '@iptvnator/portal/shared/ui';
import { PortalChannelsListComponent } from '../portal-channels-list/portal-channels-list.component';
import { LiveStreamLayoutComponent } from './live-stream-layout.component';
import { RuntimeCapabilitiesService, SettingsStore } from '@iptvnator/services';
@@ -135,15 +132,6 @@ class StubEpgTimelineComponent {
})
class StubResizableDirective {}
@Component({
selector: 'app-channel-list-hidden-state',
standalone: true,
template: '',
})
class StubChannelListHiddenStateComponent {
readonly restore = output<void>();
}
describe('LiveStreamLayoutComponent', () => {
let fixture: ComponentFixture<LiveStreamLayoutComponent>;
let component: LiveStreamLayoutComponent;
@@ -328,7 +316,6 @@ describe('LiveStreamLayoutComponent', () => {
.overrideComponent(LiveStreamLayoutComponent, {
remove: {
imports: [
ChannelListHiddenStateComponent,
EpgListViewComponent,
EpgTimelineComponent,
GridListComponent,
@@ -340,7 +327,6 @@ describe('LiveStreamLayoutComponent', () => {
},
add: {
imports: [
StubChannelListHiddenStateComponent,
StubEpgTimelineComponent,
StubGridListComponent,
StubPortalChannelsListComponent,
@@ -1152,6 +1138,10 @@ describe('LiveStreamLayoutComponent', () => {
);
});
// Collapsing with a selected category and no stream renders the real
// `app-channel-list-hidden-state` (its TranslatePipe needs a
// TranslateService); this spec is at the max-lines budget, so that branch
// is covered by video-player-sidebar.spec.ts and the Electron E2E instead.
it('shows the floating restore button when the sidebar is collapsed even without a selected category', () => {
selectedCategoryId.set(null);
TestBed.inject(LiveLayoutSidebarStateService).setState('portal', 'collapsed');
@@ -187,7 +187,7 @@ describe('XtreamLiveChannelNavigationService', () => {
);
expect(selectedCategoryId()).toBe(10);
expect(categorySearchTerm()).toBe('');
expect(sidebar.setState).toHaveBeenCalledWith('expanded');
expect(sidebar.setState).toHaveBeenCalledWith('portal', 'expanded');
expect(service.revealRequest()).toEqual(
expect.objectContaining({ channelId: 1 })
);
@@ -232,7 +232,7 @@ export class XtreamLiveChannelNavigationService {
return;
this.store.setCategorySearchTerm('');
this.store.setSelectedCategory(categoryId);
this.sidebar.setState('expanded');
this.sidebar.setState('portal', 'expanded');
this.pendingReveal.set({
channelId: target.xtream_id,
categoryId,