Skip to content

fix(sections): grey out Add when there is no room for a section - #820

Merged
thcp merged 1 commit into
big-releasefrom
fix/sections-add-disabled-775
Oct 20, 2026
Merged

thcp merged 1 commit into
big-releasefrom
fix/sections-add-disabled-775

Conversation

@thcp

@thcp thcp commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Closes #775

What changed

  • Sections Add button is greyed out (aria-disabled) with a tooltip "No free space for a new section" when pressing it would do nothing.
  • Kept in sync on sections change, song change, loop change, language change.
  • Guide sentence for the button mentions the greyed-out state. New string in all ten tables.
  • New spec: tests/e2e/sections-add-disabled.spec.mjs.

Disabled exactly when: no loop is armed AND no free gap fits a new section (static/js/sections.js refreshSectionsAddState).

Not changed: Add button kept, Sections label not renamed, Detect structure label untouched.

Test: karaoke 'each mode keeps its own saved mix' and 3 trash-restore specs fail on big-release too (pre-existing).

Add silently did nothing when the sections left no free space. It is now aria-disabled with a translated reason in its tooltip, kept in sync with sections, the loop, the song and the language. The Guide sentence says so.

Closes #775
@thcp
thcp marked this pull request as ready for review October 20, 2026 00:22
@thcp
thcp merged commit 3fec7aa into big-release Oct 20, 2026
10 checks passed
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