Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

Tab bar: Start is a play button, Exercises a dumbbell

Duarte Santosdcc4a39009e4
diff --git a/frontend/src/components/TabBar.jsx b/frontend/src/components/TabBar.jsx
index 21d706cf7..8dd833fe9 100644
--- a/frontend/src/components/TabBar.jsx
+++ b/frontend/src/components/TabBar.jsx
@@ -46,13 +46,14 @@ export default function TabBar({ onStart }) {
<Tab active={on('plan')} icon="calendar" label={t('Plan')} onClick={() => nav('/plan')} />
{/* On the workout screen itself there is nothing to resume, so the button reads as the
tab it is and stays lit (#29); anywhere else it brings you back to the exercise you
- were on — the marker is kept in S.active.cur and never moves on its own (#21). */}
+ were on — the marker is kept in S.active.cur and never moves on its own (#21). The
+ glyph is always play: start and resume are one concept, and an exercise is a dumbbell. */}
<button className={'start' + (S.active ? ' rec' : '') + (S.active && cur === 'workout' ? ' on' : '')} onClick={startWorkout}>
- <span className="cir"><Icon name={S.active ? (cur === 'workout' ? 'dumbbell' : 'play') : 'dumbbell'} /></span>
+ <span className="cir"><Icon name="play" /></span>
<span>{S.active ? (cur === 'workout' ? t('Workout') : S.active.editingWorkoutId ? t('Edit workout') : t('Resume')) : t('Start')}</span>
</button>
<Tab active={on('stats')} icon="chart" label={t('Stats')} onClick={() => nav('/stats')} />
- <Tab active={on('library')} icon="list" label={t('Exercises')} onClick={() => nav('/library')} />
+ <Tab active={on('library')} icon="dumbbell" label={t('Exercises')} onClick={() => nav('/library')} />
</nav>
)
}
diff --git a/frontend/src/components/TabBar.test.jsx b/frontend/src/components/TabBar.test.jsx
index f16908cb2..415af5183 100644
--- a/frontend/src/components/TabBar.test.jsx
+++ b/frontend/src/components/TabBar.test.jsx
@@ -80,3 +80,19 @@ describe('the connection dot on Home', () => {
} finally { useStore.setState({ sync: original }) }
})
})
+
+// v1.3.11 icon sweep: one icon per concept. Every tab carries its name under the icon, Start is a
+// play button whether or not a session runs, and Exercises is the dumbbell (no more generic list).
+describe('the tab icons and labels', () => {
+ const icon = el => el.querySelector('svg')?.getAttribute('data-icon')
+ const label = el => el.querySelector('span:last-child').textContent
+ it('labels every tab and uses one icon per concept', () => {
+ act(() => { root.render(<TabBar onStart={() => {}} />) })
+ expect(tabs().map(icon)).toEqual(['house', 'calendar', 'play', 'chart', 'dumbbell'])
+ expect(tabs().map(label)).toEqual(['Home', 'Plan', 'Start', 'Stats', 'Exercises'])
+
+ act(() => { useStore.getState().update(s => { s.active = { id: 'a', entries: [], cur: 0 } }, false) })
+ expect(icon(tabs()[2])).toBe('play')
+ expect(label(tabs()[2])).toBe('Resume')
+ })
+})