Home

dev / openkara

publicthedavidweng/OpenKara· sync paused
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

fix(lyrics): eliminate alignment-toggle flash by stabilizing LyricLine children

2 months ago

6771557
Authored
Davy7/29/2026, 5:35:45 AM
Switching between centered and left-aligned lyrics was remounting the
mainText, bgWords, and word spans because the lineContent tree structure
differed between the two alignments. New elements carried motion-surface's
color transition, which caused every line to briefly appear active before
the target state color was applied.

Now the same wrapper span encloses mainText and bgWords for both
alignments, so React reconciles the existing elements instead of
recreating them. The wrapper's align-items/min-w-0/break-words classes are
swapped conditionally, but the child hierarchy stays identical.

Parentdd06e48

1 file changed
  • src/components/Lyrics/LyricLine.tsx+6−8