Skip to content

Bugfix FXIOS-15857 [Newsfeed Categories] Fix search results disappearance after rotation#33931

Merged
Foxbolts merged 3 commits into
mainfrom
fb/FXIOS-15857_search-results-disappear
May 21, 2026
Merged

Bugfix FXIOS-15857 [Newsfeed Categories] Fix search results disappearance after rotation#33931
Foxbolts merged 3 commits into
mainfrom
fb/FXIOS-15857_search-results-disappear

Conversation

@Foxbolts

@Foxbolts Foxbolts commented May 20, 2026

Copy link
Copy Markdown
Collaborator

📜 Tickets

Jira ticket
Github issue

💡 Description

  • Ensures active search suggestions view stays above homepage content when homepage pinned header layout updates run during rotation.

📝 Technical Notes:

  • updateContentContainerTopConstraint() was bringing the contentContainer to the front when the homepage pinned header was enabled, and during rotation, that method runs again while search is active, so the homepage could visually cover SearchViewController. Search was not actually dismissed, it was still in the hierarchy, but hidden behind the content container, so we now resurface the active SearchViewController view after pinned homepage z-order updates
  • Weird re-layout behavior of the SearchViewController (that you see in the after video) was a pre-existing issue
  • This is a fairly targeted fix for the regression. The larger issue is that updateContentContainerTopConstraint() handles both layout constraints and view z-ordering and because that method runs from broad lifecycle paths like rotation/layout updates, it can unintentionally change z-ordering unless every active overlay is accounted for 😞

🎥 Demos

Before
Simulator.Screen.Recording.-.iPhone.17.-.2026-05-20.at.19.28.54.mov
After
Simulator.Screen.Recording.-.iPhone.17.-.2026-05-20.at.19.26.16.mov

📝 Checklist

  • I filled in the ticket numbers and a description of my work
  • I updated the PR name to follow our PR naming guidelines
  • I ensured unit tests pass and wrote tests for new code
  • If working on UI, I checked and implemented accessibility (Dynamic Text and VoiceOver)
  • If adding telemetry, I read the data stewardship requirements and will request a data review
  • If adding or modifying strings, I read the guidelines and will request a string review from l10n
  • If needed, I updated documentation and added comments to complex code

@Foxbolts Foxbolts requested a review from yoanarios May 20, 2026 23:30
@Foxbolts Foxbolts requested a review from a team as a code owner May 20, 2026 23:30
@mobiletest-ci-bot

Copy link
Copy Markdown
Messages
📖 Project coverage: 42.47%

💪 Quality guardian

2 tests files modified. You're a champion of test coverage! 🚀

🧹 Tidy commit

Just 3 file(s) touched. Thanks for keeping it clean and review-friendly!

💬 Description craftsman

Great PR description! Reviewers salute you 🫡

🦊 BrowserViewController Check

We’re tracking the size of BrowserViewController.swift to keep it healthy.

  • ✨ Change in file size: +3 lines

✅ New file code coverage

No new file detected so code coverage gate wasn't ran.

✅ Existing file code coverage

No modified file had significant enough changes for the coverage gate to run.

Client.app: Coverage: 40.97

File Coverage
BrowserViewController.swift 36.53% ⚠️

Generated by 🚫 Danger Swift against 7c93569

@yoanarios yoanarios 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.

LGTM 🚀, tested and the bug is fixed

@Foxbolts Foxbolts merged commit f95fa40 into main May 21, 2026
9 checks passed
@Foxbolts Foxbolts deleted the fb/FXIOS-15857_search-results-disappear branch May 21, 2026 16:36
@github-actions

Copy link
Copy Markdown
Contributor

🚀 PR merged to main, targeting version: 151.2

Alex-Bangu pushed a commit that referenced this pull request May 25, 2026
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.

3 participants