Fix splits page: km/mi toggle conversion and button hover styles#28
Draft
Fix splits page: km/mi toggle conversion and button hover styles#28
Conversation
✅ Deploy Preview for trainpace ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
New feature for runners: enter a goal time and distance to get per-km or per-mile split targets for race day. - Even, negative, and positive split strategies - Printable pace band for wrist - Copy splits to clipboard - Race day pacing tips section - 18 unit tests for calculation logic - Added to navigation, landing page, and comparison table Co-authored-by: aleexwong <65264501+aleexwong@users.noreply.github.com>
Co-authored-by: aleexwong <65264501+aleexwong@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Investigate value propositions for average runners
feat: Add Race Split Calculator with pace band printing
Mar 3, 2026
…istent hover styles The shadcn Button component's built-in hover styles (hover:bg-primary/90, hover:bg-accent) conflicted with custom Tailwind classes, causing bad hover behavior. Replaced with native <button> elements using explicit Tailwind hover classes, matching the /calculator page approach. Co-authored-by: aleexwong <65264501+aleexwong@users.noreply.github.com>
Copilot
AI
changed the title
feat: Add Race Split Calculator with pace band printing
fix: replace shadcn Button with native buttons on splits page for consistent hover styles
Mar 3, 2026
…toggle The km/mi toggle only changed the unit label without converting the distance value. Selecting "Half Marathon" (21.0975 km) and toggling to miles would leave distance as 21.0975 treated as miles. - Add convertDistance utility with smart snapping to common race distances - Update handleUnitToggle to convert distance when switching units - Replace plain buttons with animated sliding toggle (matches /calculator) - Add 4 test cases for convertDistance function Co-authored-by: aleexwong <65264501+aleexwong@users.noreply.github.com>
Copilot
AI
changed the title
fix: replace shadcn Button with native buttons on splits page for consistent hover styles
Fix splits page: km/mi toggle conversion and button hover styles
Mar 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The splits page had two issues: the km/mi toggle only swapped the label without converting the distance value (e.g. selecting Half Marathon then toggling to miles kept 21.0975 as miles instead of converting to 13.1), and the shadcn
<Button>component's built-in hover styles conflicted with custom Tailwind classes.Distance conversion
convertDistance()to split-calculator utils with smart snapping to common race distances (5K, 10K, half, full)handleUnitTogglenow converts the distance value when switching units, matching/calculatorbehaviorButton hover styles
<Button>with native<button>elements using explicit Tailwind hover classes, consistent with/calculatorTests
convertDistancetest cases covering round-trip snapping and non-common distances💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.