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: 6 additions & 0 deletions .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Embed version from package.json
run: yarn generate-version

- name: Build standalone bundle
run: yarn build:standalone

Expand Down Expand Up @@ -109,6 +112,9 @@ jobs:
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Embed version from package.json
run: yarn generate-version

- name: Build standalone bundle
run: |
yarn build:standalone
Expand Down
8 changes: 8 additions & 0 deletions src/components/ModeButtons.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/// <reference path="../types.js" />

import { getModeDisplayName } from '../utils/calculations.js'
import { getVersion } from '../utils/version.js'

/**
* Create mode switching UI with buttons and guidance panel
Expand Down Expand Up @@ -55,6 +56,13 @@ export function createModeSwitchingUI(modeCell, state, modeSwitchCallback, modes
button.className = 'gram-frame-mode-btn'
button.textContent = getModeDisplayName(modeType)
button.dataset.mode = modeType

// Subtle version surface for debugging: hovering the Pan button reveals the
// GramFrame version. The tooltip shows even while the button is disabled
// (before the user has zoomed in), so it is always available on request.
if (modeType === 'pan') {
button.title = `GramFrame v${getVersion()}`
}

// Set active state for current mode
if (modeType === state.mode) {
Expand Down
3 changes: 2 additions & 1 deletion src/core/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { AnalysisMode } from '../modes/analysis/AnalysisMode.js'
import { HarmonicsMode } from '../modes/harmonics/HarmonicsMode.js'
import { DopplerMode } from '../modes/doppler/DopplerMode.js'
import { PanMode } from '../modes/pan/PanMode.js'
import { getVersion } from '../utils/version.js'

/**
* Build mode-specific initial state by collecting from all mode classes
Expand All @@ -34,7 +35,7 @@ function buildModeInitialState() {
* @type {GramFrameState}
*/
export const initialState = {
version: '0.0.1',
version: getVersion(),
timestamp: new Date().toISOString(),
instanceId: '',
mode: 'analysis', // 'analysis', 'harmonics', 'doppler', 'pan'
Expand Down
Loading