Browse Source
feat(ui): redesign startup flow with Foxglove-style SPA loading screen
feat(ui): redesign startup flow with Foxglove-style SPA loading screen
This commit refactors the initialization phase of the Visualizer to act as a Single Page Application (SPA). A persistent workspace shell is now initially hidden behind a "Data Synchronizer" Start Screen, which handles file ingestion before seamlessly revealing the canvas. Part 1: Implement SPA Start Screen Modal and Data Routing * steps/index.html: Added the full-screen `start-screen-modal` overlay to intercept the user on load. Removed text placeholders inside the video and canvas containers since the workspace is now exclusively visible when populated. * steps/src/dom.js: Exported references for the new modal, drop zone, and primary load buttons. * steps/src/main.js: Routed standard drag-and-drop and click events to target the new Start Screen elements rather than the legacy footer buttons, initiating the existing file pipeline. Part 2: Integrate Loading Progress Natively * steps/index.html: Added a hidden `start-progress-container` directly inside the Start Screen card to prevent overlapping popups. * steps/src/dom.js: Exported references to the native progress bar and text elements. * steps/src/modal.js: Refactored `showLoadingModal`, `updateLoadingModal`, and `hideModal` to dynamically route progress updates. If the Start Screen is active, it renders the inline progress bar and disables background buttons rather than spawning the generic popup modal. * steps/src/fileLoader.js: Updated `processFilePipeline` to fully dismiss the `start-screen-modal` upon successful data ingestion and precomputation, seamlessly transitioning the user. Part 3: Replicate Accessibility and Theme Controls * steps/index.html: Duplicated the Quick Start Guide, Codebase Overview, What's New, and Theme Toggle buttons, positioning them in the top-right corner of the Start Screen. Also fixed a `-webkit-appearance` CSS warning on the range slider. * steps/src/dom.js: Exported references for the new accessibility buttons and theme toggle SVGs. * steps/src/ui.js: Attached existing `toggleGuideModal`, `toggleCodebaseModal`, and `toggleChangelogModal` event listeners to the new replicated buttons, granting users access to documentation before data load. * steps/src/theme.js: Updated `initializeTheme()` so switching the theme from either the workspace or the Start Screen bidirectionally syncs the Light/Dark SVGs on both buttons simultaneously.refactor/sync-centralize
7 changed files with 206 additions and 32 deletions
-
70steps/index.html
-
16steps/src/dom.js
-
8steps/src/fileLoader.js
-
44steps/src/main.js
-
45steps/src/modal.js
-
14steps/src/theme.js
-
15steps/src/ui.js
Write
Preview
Loading…
Cancel
Save
Reference in new issue