Skip to content

PCIOS-805: Fix transcript controls layout shift causing mis-taps#4655

Open
pocketcasts wants to merge 2 commits into
trunkfrom
pcios-805/fix-transcript-controls-layout-shift
Open

PCIOS-805: Fix transcript controls layout shift causing mis-taps#4655
pocketcasts wants to merge 2 commits into
trunkfrom
pcios-805/fix-transcript-controls-layout-shift

Conversation

@pocketcasts

Copy link
Copy Markdown
Contributor

Resolves https://linear.app/a8c/issue/PCIOS-805/ios-transcript-controls-shift-position-as-the-transcript-loads-causing

Summary

Fixes a layout shift in the transcript controls bar where buttons would reposition as the transcript loaded, causing taps intended for Share to land on Play.

Changes

  • Always add shareButton and playButton to the stack view upfront (instead of conditionally via if guards), using .isHidden for static feature flag / context gating
  • Replace searchButton.isHidden toggling in loading/loaded states with alpha + isUserInteractionEnabled toggling — this keeps the button in the UIStackView layout (preserving its space) so the flexible spacer does not expand/contract and shift the other buttons
  • Apply the same alpha-based visibility to all control buttons (share, play, search) during the loading transition so they all appear together

Verification

  • Lint: PASS
  • Tests: N/A — pre-existing CarPlay build errors unrelated to this change
  • Diff review: PASS — single file changed, minimal diff, no unintended changes
  • Secret scan: PASS

Confidence

HIGH — The root cause is clearly identified and the fix uses standard UIKit patterns.


This PR was created autonomously by linear-solver.
Triage complexity: simple | Linear issue

…loads, causing mis-taps (Share hit lands on Play)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses a UIKit UIStackView layout shift in TranscriptViewController’s transcript controls bar that could cause mis-taps while the transcript is loading (buttons changing position as subviews are added/removed or hidden/unhidden).

Changes:

  • Always add shareButton and playButton as arranged subviews up front, gating them via .isHidden instead of conditional insertion.
  • Keep control button layout stable during loading by switching from isHidden toggling to alpha + isUserInteractionEnabled toggling.
  • Apply the same visibility approach to all relevant control buttons so they appear/disappear together during the loading transition.

@joashrajin joashrajin self-assigned this Jul 7, 2026
@joashrajin joashrajin marked this pull request as ready for review July 7, 2026 08:47
@joashrajin joashrajin requested a review from a team as a code owner July 7, 2026 08:47
@joashrajin joashrajin requested review from SergioEstevao and removed request for a team July 7, 2026 08:47
@SergioEstevao SergioEstevao added the [Type] Bug Used for issues where something is not functioning as intended. label Jul 7, 2026
@SergioEstevao SergioEstevao added this to the 8.17 milestone Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Bug Used for issues where something is not functioning as intended.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants