Skip to content

Fix transcript banner overlapping episode description#5301

Open
lromero16 wants to merge 1 commit into
mainfrom
fix/transcript-banner-overlaps-show-notes
Open

Fix transcript banner overlapping episode description#5301
lromero16 wants to merge 1 commit into
mainfrom
fix/transcript-banner-overlaps-show-notes

Conversation

@lromero16
Copy link
Copy Markdown
Collaborator

Description

Fixes #PCDROID-326

The "View Transcript" banner was overlapping the episode description (show notes WebView) in the episode detail screen.

Root cause: AnimatedNonNullVisibility uses expandVertically by default, which animates the Compose layout height from 0 to full size. When embedded in a ConstraintLayout, the View system doesn't receive requestLayout() on every animation frame — so during the expand, webViewShowNotes stays positioned as if episodeTranscript has height 0, causing the overlap.

Fix: Override enter/exit transitions to fadeIn()/fadeOut() at the EpisodeFragment call site. This avoids height animation entirely; Compose reports the full height immediately, and ConstraintLayout positions the show notes correctly from the first frame.

Testing Instructions

  1. Open an episode that has a transcript available
  2. Observe the episode detail screen — the "View Transcript" banner should appear above the episode description without overlapping it
  3. Dismiss and reopen the episode to verify consistent behaviour

Screenshots or Screencast

Checklist

  • If this is a user-facing change, I have added an entry in CHANGELOG.md
  • Ensure the linter passes (./gradlew spotlessApply to automatically apply formatting/linting)
  • I have considered whether it makes sense to add tests for my changes
  • All strings that need to be localized are in modules/services/localization/src/main/res/values/strings.xml
  • Any jetpack compose components I added or changed are covered by compose previews
  • I have updated (or requested that someone edit) the spreadsheet to reflect any new or changed analytics.

I have tested any UI changes...

  • with different themes
  • with a landscape orientation
  • with the device set to have a large display and font size
  • for accessibility with TalkBack

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>
@lromero16 lromero16 requested a review from a team as a code owner May 13, 2026 19:47
@lromero16 lromero16 requested review from geekygecko and removed request for a team May 13, 2026 19:47
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@dangermattic
Copy link
Copy Markdown
Collaborator

1 Error
🚫 PR requires a [Type] label and either a [Area] or [Project] label.
1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

Copy link
Copy Markdown
Member

@geekygecko geekygecko left a comment

Choose a reason for hiding this comment

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

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?

Image
Screen_recording_20260514_134719.webm

Can you please follow the checklist in the PR description template and sign the CLA.

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.

4 participants