Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor FXIOS-11147 [Tabs] Remove Legacy Tab Manager Part 1 #24436

Merged
merged 6 commits into from
Feb 3, 2025

Conversation

Cramsden
Copy link
Contributor

📜 Tickets

Jira ticket
Github issue

💡 Description

We no longer need the LegacyTabMangernow that we have finished the Tab Tray refactor. The way that things are currently architected, there is still a lot of logic in LegacyTabManager that needed to be moved in to TabManagerImplmentation. This is part 1 of clean up to the TabManager

📝 Checklist

You have to check all boxes before merging

  • Filled in the above information (tickets numbers and description of your work)
  • Updated the PR name to follow our PR naming guidelines
  • Wrote unit tests and/or ensured the tests suite is passing
  • When working on UI, I checked and implemented accessibility (minimum Dynamic Text and VoiceOver)
  • If needed, I updated documentation / comments for complex code and public methods
  • If needed, added a backport comment (example @Mergifyio backport release/v120)

@Cramsden Cramsden requested a review from a team as a code owner January 29, 2025 21:07
@mobiletest-ci-bot
Copy link

Warnings
⚠️ Pull Request size seems relatively large. If this Pull Request contains multiple changes, please split each into separate PR will helps faster, easier review. Consider using epic branches for work that would affect main.
Messages
📖 Project coverage: 33.58%
📖 Edited 7 files
📖 Created 0 files

Client.app: Coverage: 32.34

File Coverage
SettingsContentViewController.swift 4.97% ⚠️
ClipboardBarDisplayHandler.swift 0.0% ⚠️
TabManager.swift 61.11%
TabManagerImplementation.swift 47.01% ⚠️
LegacyTabManager.swift 15.79% ⚠️

Generated by 🚫 Danger Swift against 8564de7

@Cramsden Cramsden marked this pull request as draft January 30, 2025 03:47
@Cramsden
Copy link
Contributor Author

Making this a draft PR. I need to fix some more tests

@Cramsden Cramsden marked this pull request as ready for review January 30, 2025 20:15
@Cramsden Cramsden requested review from yoanarios and a team January 31, 2025 20:07
Copy link
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 🚀 , just a small comment about a TODO

@ih-codes ih-codes self-requested a review February 3, 2025 16:25
Copy link
Collaborator

@ih-codes ih-codes left a comment

Choose a reason for hiding this comment

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

Tested on my device for a while and no issues jumped out at me! So happy to see this cleaned up. 🙌

Comment on lines -155 to -168
func testRemoveScreenshotWithImage() async throws {
let subject = createSubject()
addTabs(to: subject, count: 5)
guard let tab = subject.tabs.first else {
XCTFail("First tab was expected to be found")
return
}

tab.setScreenshot(UIImage())
await subject.removeScreenshot(tab: tab)
try await Task.sleep(nanoseconds: sleepTime)
XCTAssertEqual(mockDiskImageStore.deleteImageForKeyCallCount, 1)
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

I take it this test was no longer useful..?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It appeared to be testing the same functionality as testSaveScreenshotWithImage since tabDidSetScreenshot calls removeScreenshot when a previous screenshot is set.

@Cramsden Cramsden merged commit 7e883f1 into main Feb 3, 2025
10 checks passed
@Cramsden Cramsden deleted the cr/FXIOS-11147_clean-up-legacy-tab-manager branch February 3, 2025 17:19
aya-en-amir pushed a commit to aya-en-amir/firefox-ios that referenced this pull request Feb 5, 2025
…-mobile#24436)

* V1 - remove legacy tab manager and move existing functionality into tab manager

* reorder

* fix linting error

* clean up

* Rename TabManagerDelegate and move out of Legacy code

* clean up todo
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.

5 participants