mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-10 01:56:16 -08:00
- Implemented `DashboardActivityItemsComponent` with styles and functionality for displaying activity items in list and grid views. - Created `DashboardWidgetShellComponent` for consistent widget layout with header and content areas. - Developed `GlobalFavoritesWidgetComponent` to manage and display global favorites with filtering options. - Added `RecentSourcesWidgetComponent` to show recently accessed sources with links to manage them. - Introduced `RecentlyWatchedWidgetComponent` to track and display recently watched content with filtering capabilities. - Created `SourceStatsWidgetComponent` to present statistics of different source types. - Established TypeScript configuration files for the dashboard UI library.
6.0 KiB
6.0 KiB
Workspace Dashboard Plan
Context
The workspace shell is now the primary app entrypoint. The dashboard should evolve from a placeholder into an operational home page that helps users:
- Quickly continue playback/work.
- Switch context across M3U, Xtream, and Stalker sources.
- Monitor relevant content (recent items, EPG, status) in one place.
This document defines the implementation plan before Phase 1 work starts.
Status Snapshot (February 22, 2026)
Delivered
- Dashboard route is active in workspace shell with persisted widget layout.
- Widget host and configurable widget model are implemented.
Customizemode supports:- Enable/disable widgets
- Reorder widgets (up/down)
- Widget scope (provider + playlist selection)
- Active widgets in production:
- Continue Watching
- Recent Sources
- Source Statistics
- Recently Watched (global)
- Global Favorites
- Recently Watched and Global Favorites support:
- Content-kind chips (channels/vod/series)
- List/grid toggle
- Direct deep linking from widget item to target view/detail
- Xtream live deep links now auto-start playback when opened from dashboard widgets.
- Dashboard now uses a shared Material-based widget shell for consistent visual structure.
- Customize mode now supports drag-and-drop ordering and widget size presets (
1/3,1/2,2/3,full).
Partially Delivered / Deviation From Initial Phase 1 List
- EPG Radar was intentionally removed from the current dashboard scope and is postponed.
- Recent Activity / Recently Added widget was intentionally removed from current scope.
Not Started
- Phase 4 external widgets (RSS/scores/news adapters).
Immediate Next Widget Tasks (Recommended)
- Expand widget settings UX (scope presets, bulk provider toggles).
Product Direction
The dashboard should be a configurable widget system, but introduced in stages:
- Start with useful, stable widgets and a constrained layout.
- Add edit/customization workflows after widget value is proven.
- Add advanced drag/resize and external integrations later.
This avoids building heavy layout mechanics before core data widgets are solid.
UX Direction
Design style: professional operator console (dense, calm, high-signal).
Target layout:
- Top row: continue actions, recent sources, health/status.
- Middle row: discovery widgets (recently viewed, recently added, favorites).
- Edit mode: add/remove/reorder widgets and configure source scope.
Architecture
Core Components
DashboardPageComponent(container/layout/edit mode orchestration)DashboardWidgetHostComponent(widget factory/renderer by type)DashboardLayoutStore(signal-based state for layout, settings, edit mode)DashboardPersistenceService(save/load layout, version migration)DashboardDataFacade(aggregate provider data for widgets)
Widget Contract
type WidgetSize = 'one-third' | 'half' | 'two-thirds' | 'full';
interface WidgetScope {
providers: Array<'m3u' | 'xtream' | 'stalker'>;
playlistIds?: string[];
}
interface DashboardWidget {
id: string;
type: string;
title: string;
size: WidgetSize;
order: number;
enabled: boolean;
scope: WidgetScope;
settings: Record<string, unknown>;
}
interface DashboardLayout {
version: number;
widgets: DashboardWidget[];
}
Capability Rules
Widgets must degrade gracefully per provider:
- If a source/provider does not support required data (for example EPG), show a clear empty/unsupported state.
- Widgets never hard fail the page; each widget owns loading/error states.
- Scope defaults to "all supported providers" unless user config overrides it.
Phased Delivery
Phase 1 (Now): Production Dashboard V1
Scope:
- Replace placeholder dashboard with real widget host + predefined layout.
- Fixed grid slots (no free drag/resize yet).
- Initial widgets:
- Recent Sources
- Continue Watching
- Source Statistics
- Recently Added / Recently Viewed (provider-aware)
- Persist enabled/disabled and order (simple list reorder if needed).
Out of scope:
- Freeform drag-and-drop grid resizing.
- External data providers (RSS/sports/news).
- Full widget marketplace.
Acceptance criteria:
- Dashboard loads with useful content for at least one active source type.
- Empty states are clear and actionable (links to Sources/settings).
- No route regressions for existing workspace sections.
- Layout/settings survive app restart.
Phase 2: Edit Mode and Configuration
Scope:
- "Customize dashboard" mode.
- Enable/disable widgets.
- Widget-level source scoping (providers + selected playlists).
- Order management (move up/down or drag reorder within constrained grid).
Phase 3: Advanced Layout (Drag/Resize)
Scope:
- True grid layout manager with size presets and drag repositioning.
- Collision handling and responsive breakpoint behavior.
- Optional "reset layout" and preset templates.
Phase 4: External Widgets
Scope:
- Adapter interface for non-playlist data widgets (RSS, scores, news).
- Polling/cache strategy with rate limits.
- User opt-in and failure isolation per external source.
Data and Performance Notes
- Use memoized/computed selectors for widget inputs.
- Avoid redundant provider fetches; reuse existing stores/services where possible.
- Update widgets incrementally and isolate heavy computations in facade/store utilities.
File/Module Placement (Proposed)
libs/workspace/dashboard/feature/(page + edit mode orchestration)libs/workspace/dashboard/ui/(widget host + widget components)libs/workspace/dashboard/data-access/(state model + persistence + data facade/service)- Route integration remains in
apps/web/src/app/app.routes.tsand workspace shell.
Open Questions
- Should dashboard layout be global per app profile, or per active workspace/provider mix?
- Which widgets are enabled by default for new users vs migrated users?
Next Step
Start Phase 1 implementation using this document as the source of truth and track deviations explicitly in follow-up updates.