Skip to content

Implement wheel picker behavior for synced lyrics#326

Merged
theovilardo merged 7 commits intomasterfrom
codex/fix-lyrics-rendering-and-improve-autoscroll-ux
Oct 30, 2025
Merged

Implement wheel picker behavior for synced lyrics#326
theovilardo merged 7 commits intomasterfrom
codex/fix-lyrics-rendering-and-improve-autoscroll-ux

Conversation

@theovilardo
Copy link
Copy Markdown
Owner

Summary

  • add Snapper dependency to support snapping behaviour in the synced lyrics list
  • refactor LyricsSheet to provide wheel-picker-style synced lyrics with configurable highlight zone and sanitized word rendering
  • add unit tests covering sanitisation, snap offset calculations, and highlight padding helpers

Testing

  • ./gradlew testDebugUnitTest (fails: SDK location not configured in environment)

https://chatgpt.com/codex/tasks/task_e_6902c9ebdc80832f950c4bdb0db09cc9

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +675 to +678
@Composable
fun LyricWordSpan(
word: SyncedWord,
isHighlighted: Boolean,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 Badge Import SyncedWord before using it

LyricWordSpan and sanitizeSyncedWords reference the SyncedWord data class, but the file only imports SyncedLine. Without importing com.theveloper.pixelplay.data.model.SyncedWord, this file does not compile (unresolved reference). Add the missing import so the new helpers build.

Useful? React with 👍 / 👎.

Comment on lines +754 to +764
internal fun highlightSnapOffsetPx(
viewportHeight: Int,
itemSize: Int,
highlightOffsetPx: Float
): Int {
if (viewportHeight <= 0 || itemSize <= 0) return 0
val viewport = viewportHeight.toFloat()
val halfItem = itemSize / 2f
val targetCenter = (viewport / 2f) - highlightOffsetPx
val clampedCenter = targetCenter.coerceIn(halfItem, viewport - halfItem)
return (clampedCenter - halfItem).roundToInt()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 Badge Add kotlin.math.roundToInt import

highlightSnapOffsetPx calls roundToInt() but no kotlin.math.roundToInt import is present (only abs is imported). Because roundToInt is not part of the default Kotlin imports, the module will fail to compile. Import the function or fully qualify it.

Useful? React with 👍 / 👎.

@theovilardo theovilardo merged commit 4b7fd67 into master Oct 30, 2025
@lostf1sh lostf1sh deleted the codex/fix-lyrics-rendering-and-improve-autoscroll-ux branch January 16, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant