Skip to content

Hoist magic numbers and strings across view and graph files - #40

Merged
veillette merged 1 commit into
mainfrom
claude/hoist-constants-and-strings-DMOTp
Feb 23, 2026
Merged

Hoist magic numbers and strings across view and graph files#40
veillette merged 1 commit into
mainfrom
claude/hoist-constants-and-strings-DMOTp

Conversation

@veillette

Copy link
Copy Markdown
Collaborator
  • TrackLabConstants: add DIGITIZING_DIM_OPACITY (shared opacity for digitizing lock-out)
  • strings_en/fr + StringManager: add i18n strings for calibration, coordSystem, videoSource, webcam, kinematicsGraph, playback, and autoTracker categories
  • SimScreenView: extract four layout margin constants
  • PlaybackControlsNode: extract REWIND_BUTTON_ICON_SIZE; use i18n for duration/seconds strings
  • VideoSourceControlNode: extract DOWNLOAD_ICON_FONT_SIZE; use i18n for button accessibleNames
  • CoordinateSystemNode: use DIGITIZING_DIM_OPACITY; use i18n for axis labels and accessibleNames
  • CalibrationToolNode: use DIGITIZING_DIM_OPACITY; use i18n for endpoint/warning strings
  • AutoTrackerNode: extract LABELS_SPACING; use i18n for accessibleName and error fallback string
  • ConfigurableGraph: replace inline literals in resizeGraph() with named constants already defined at file top
  • DataTableNode: extract CSS dimension constants (border-radius, padding) and DOWNLOAD_ICON_FONT_SIZE
  • DigitizingOverlayNode: extract MAG_SHADOW_OFFSET_X/Y/BLUR for box-shadow CSS
  • KinematicsGraphNode: extract VBOX_SPACING, TRACK_SELECTOR_FONT, TRACK_COMBO_X/Y_MARGIN, TRACK_SELECTOR_SPACING; use i18n for "Track:", "No tracks", "Track {{symbol}}"
  • WebcamPanel: extract CAMERA_SELECT_FONT/PADDING, TIMER_INTERVAL_MS, SECONDS_PER_MINUTE; use i18n for all button accessibleNames, status strings, and FPS estimate display

https://claude.ai/code/session_01P9UscuE1hestbaoHgVZKZD

- TrackLabConstants: add DIGITIZING_DIM_OPACITY (shared opacity for digitizing lock-out)
- strings_en/fr + StringManager: add i18n strings for calibration, coordSystem, videoSource, webcam, kinematicsGraph, playback, and autoTracker categories
- SimScreenView: extract four layout margin constants
- PlaybackControlsNode: extract REWIND_BUTTON_ICON_SIZE; use i18n for duration/seconds strings
- VideoSourceControlNode: extract DOWNLOAD_ICON_FONT_SIZE; use i18n for button accessibleNames
- CoordinateSystemNode: use DIGITIZING_DIM_OPACITY; use i18n for axis labels and accessibleNames
- CalibrationToolNode: use DIGITIZING_DIM_OPACITY; use i18n for endpoint/warning strings
- AutoTrackerNode: extract LABELS_SPACING; use i18n for accessibleName and error fallback string
- ConfigurableGraph: replace inline literals in resizeGraph() with named constants already defined at file top
- DataTableNode: extract CSS dimension constants (border-radius, padding) and DOWNLOAD_ICON_FONT_SIZE
- DigitizingOverlayNode: extract MAG_SHADOW_OFFSET_X/Y/BLUR for box-shadow CSS
- KinematicsGraphNode: extract VBOX_SPACING, TRACK_SELECTOR_FONT, TRACK_COMBO_X/Y_MARGIN, TRACK_SELECTOR_SPACING; use i18n for "Track:", "No tracks", "Track {{symbol}}"
- WebcamPanel: extract CAMERA_SELECT_FONT/PADDING, TIMER_INTERVAL_MS, SECONDS_PER_MINUTE; use i18n for all button accessibleNames, status strings, and FPS estimate display

https://claude.ai/code/session_01P9UscuE1hestbaoHgVZKZD
@veillette
veillette merged commit afb4ac9 into main Feb 23, 2026
1 check passed
@veillette
veillette deleted the claude/hoist-constants-and-strings-DMOTp branch February 23, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants