Skip to content

Bugfix FXIOS-15832 ⁃ [Firefox suggest] - Visual inconsistency when displaying the suggestions#33885

Open
dicarobinho wants to merge 1 commit into
mainfrom
afarcasanu/fxios_15832_33867_firefox_suggest_icon
Open

Bugfix FXIOS-15832 ⁃ [Firefox suggest] - Visual inconsistency when displaying the suggestions#33885
dicarobinho wants to merge 1 commit into
mainfrom
afarcasanu/fxios_15832_33867_firefox_suggest_icon

Conversation

@dicarobinho
Copy link
Copy Markdown
Collaborator

📜 Tickets

Jira ticket
Github issue

💡 Description

Reload data only after view transition is done/completed.

🎥 Demos

ScreenRecording_05-19-2026.16-15-26_1.mp4
Before After
Demo

📝 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

@dicarobinho
Copy link
Copy Markdown
Collaborator Author

This bug is happening because viewModel.isBottomSearchBar does not have the correct value, when searchAppendImage is getting called, while screen rotation is happening.

Another fix can be: instead of reloading tableview data, we can refresh/configure only visible cells.

        guard let indexPaths = tableView.indexPathsForVisibleRows else { return }

        for indexPath in indexPaths {
            guard let oneLineCell = tableView.cellForRow(at: indexPath) as? OneLineTableViewCell else {
                continue
            }

            if let suggestion = viewModel.suggestions?[safe: indexPath.row] {
                let viewModel = oneLineCellModelForSearch(
                    with: suggestion,
                    shouldShowAccessoryView: indexPath.row > 0
                )
                oneLineCell.configure(viewModel: viewModel)
            }
        }

Demo with the fix from above:

ScreenRecording_05-19-2026.16-21-49_1.mp4

@dicarobinho dicarobinho marked this pull request as ready for review May 19, 2026 14:27
@dicarobinho dicarobinho requested a review from a team as a code owner May 19, 2026 14:27
@dicarobinho dicarobinho requested a review from yoanarios May 19, 2026 14:27
@dicarobinho dicarobinho reopened this May 19, 2026
@mobiletest-ci-bot
Copy link
Copy Markdown

Messages
📖 Project coverage: 42.21%

🧹 Tidy commit

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

✅ 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.62

File Coverage
SearchViewController.swift 5.13% ⚠️

Generated by 🚫 Danger Swift against 2e53826

Copy link
Copy Markdown
Contributor

@yoanarios yoanarios left a comment

Choose a reason for hiding this comment

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

LGTM, tested and is working as expected

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