mirror of
https://github.com/9x/sheetmusictrainer.git
synced 2026-11-03 22:03:54 +01:00
Move Setup panel above notation; host note filter inside it; fix key signature semantics
- Phrase mode: Setup panel now sits between the title row and the sheet music (was below the transport). It hosts the material options plus the shared TargetNoteControls (key/strings/fret window). - TargetNoteControls: in Phrase Mode the Key section binds to the generator key (tonic+mode always applied, no enable toggle) and the display-signature sync checkbox is hidden — phrase notation takes its signature from the score's key, so a display-signature select there would be a no-op. - Footer filter button hidden in Phrase Mode (lives in Setup now); still present in single-note modes. - Remove leftover '&& null' placeholder blocks.
This commit is contained in:
@@ -30,17 +30,23 @@ export const Controls: React.FC<ControlsProps> = ({ currentPitch }) => {
|
||||
});
|
||||
};
|
||||
|
||||
const inPhraseMode = settings.gameMode === 'phrase';
|
||||
|
||||
const pf = getPracticeFilter(settings);
|
||||
const activeFilterCount =
|
||||
(pf.keyEnabled ? 1 : 0) +
|
||||
(pf.strings.length > 0 ? 1 : 0) +
|
||||
(pf.fretWindowEnabled ? 1 : 0);
|
||||
|
||||
const inPhraseMode = settings.gameMode === 'phrase';
|
||||
// Phrase Mode hosts the filter inside its Setup panel (above the
|
||||
// notation) — no footer filter button there.
|
||||
const showFilterButton = !inPhraseMode;
|
||||
const shouldShowFilters = showFilterButton && filtersOpen;
|
||||
|
||||
return (
|
||||
<div className="controls-container">
|
||||
{/* Note filter: collapsed behind a button — visible only when needed */}
|
||||
{showFilterButton && (
|
||||
<div style={{ display: 'flex', justifyContent: 'center', marginBottom: '8px' }}>
|
||||
<button
|
||||
className={`hint-button ${filtersOpen ? 'active' : ''}`}
|
||||
@@ -59,7 +65,8 @@ export const Controls: React.FC<ControlsProps> = ({ currentPitch }) => {
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
{filtersOpen && <TargetNoteControls />}
|
||||
)}
|
||||
{shouldShowFilters && <TargetNoteControls />}
|
||||
|
||||
{/* Bottom Section: Tools Grid (2 Columns now) */}
|
||||
<div className="tools-grid" style={inPhraseMode ? { gridTemplateColumns: '1fr' } : undefined}>
|
||||
|
||||
Reference in New Issue
Block a user