Skip to content

Conversation

@mrevanzak
Copy link

Summary

This PR adds support for the showHours property to the Voltra.Timer component, allowing users to control whether the timer displays hours when the duration exceeds 60 minutes.

Key Changes

  • New Property: Added showHours (boolean) to the Timer component.
    • true: Displays H:MM:SS format (e.g., 1:34:00).
    • false (default): Displays MM:SS format, with minutes exceeding 60 (e.g., 94:00).
  • Native Implementation: Updated VoltraTimer.swift to leverage SwiftUI's native showsHours parameter in Text(timerInterval:showsHours:).
  • Manual Formatting: Updated DateComponentsFormatter in the native layer to respect the showHours setting when using custom textTemplates.
  • Schema & Tooling:
    • Added showHours to data/components.json with short name mapping (shrs).
    • Regenerated TypeScript props and Swift parameters using npm run generate.
  • Testing: Added unit tests in src/jsx/__tests__/Timer.node.test.tsx to verify prop serialization.

Verification Results

  • ✅ All 172 tests passed (npm test).
  • ✅ Build completed successfully (npm run build).
  • ✅ Verified correct prop-to-shortname mapping in generated files.
Before After
image image

@vercel
Copy link

vercel bot commented Jan 16, 2026

@mrevanzak is attempting to deploy a commit to the Callstack Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant