From e5c9bba166de2eaef9f814b32fd9e8c8ef832781 Mon Sep 17 00:00:00 2001 From: Patricio Rivera Alfaro Date: Thu, 16 Jul 2026 23:17:49 -0400 Subject: [PATCH] fix: keep minor tetrad symbols lowercase in IdleView quality label Follow-up to #131: the same blanket capitalization (text-transform: capitalize) was still uppercasing raw chord symbols like m7b5 in IdleView's quality label. Reuses formatQualityLabel/isChordSymbolQuality from music/display.ts so only word-phrase labels get title-cased. --- src/components/IdleView.vue | 9 +++++++-- src/components/__tests__/IdleView.spec.ts | 11 +++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/components/IdleView.vue b/src/components/IdleView.vue index 3be884f..6a646f2 100644 --- a/src/components/IdleView.vue +++ b/src/components/IdleView.vue @@ -8,6 +8,7 @@ import { FEATURES } from '@/config/features' import FreePlayPicker from '@/components/FreePlayPicker.vue' import SubStageProgressBar from '@/components/SubStageProgressBar.vue' import TheoryModal from '@/components/TheoryModal.vue' +import { formatQualityLabel, isChordSymbolQuality } from '@/music/display' import type { ChordQuality } from '@/music/data/chords' import type { ScaleMode } from '@/music/data/scales' import type { IntervalGroup } from '@/music/data/intervals' @@ -33,6 +34,11 @@ const quality = computed(() => progressStore.currentLearningQuality() ?? 'major' const progressRatio = computed(() => progressStore.progressRatio(quality.value)) +const qualityLabel = computed(() => { + const label = formatQualityLabel(quality.value) + return isChordSymbolQuality(quality.value) ? label : label.replace(/\b\w/g, (c) => c.toUpperCase()) +}) + function setMode(mode: 'learn' | 'freePlay'): void { progressStore.setIdleMode(mode) } @@ -98,7 +104,7 @@ function onStageOpen(stageIndex: number): void {