Fix transcript banner overlapping episode description#5301
Conversation
Use fade-only transitions for the transcript banner in EpisodeFragment to prevent the expandVertically animation from causing layout overlap with the show notes WebView in ConstraintLayout. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Generated by 🚫 Danger |
There was a problem hiding this comment.
Thanks for investigating a fix for this issue.
I wasn’t able to properly test this on my side as I can’t currently reproduce the error.
One thing I did notice is that the text no longer slides down the screen and instead jumps into place. This doesn’t look quite as smooth as before, which seems to be a downside of removing expandVertically(). Are there any alternative approaches we could try that would still avoid the issue while keeping the smoother animation?
Screen_recording_20260514_134719.webm
Can you please follow the checklist in the PR description template and sign the CLA.
Description
Fixes #PCDROID-326
The "View Transcript" banner was overlapping the episode description (show notes WebView) in the episode detail screen.
Root cause:
AnimatedNonNullVisibilityusesexpandVerticallyby default, which animates the Compose layout height from 0 to full size. When embedded in aConstraintLayout, the View system doesn't receiverequestLayout()on every animation frame — so during the expand,webViewShowNotesstays positioned as ifepisodeTranscripthas height 0, causing the overlap.Fix: Override
enter/exittransitions tofadeIn()/fadeOut()at theEpisodeFragmentcall site. This avoids height animation entirely; Compose reports the full height immediately, andConstraintLayoutpositions the show notes correctly from the first frame.Testing Instructions
Screenshots or Screencast
Checklist
./gradlew spotlessApplyto automatically apply formatting/linting)modules/services/localization/src/main/res/values/strings.xmlI have tested any UI changes...