Refactor FXIOS-15851 WindowManager tabManager API should return an optional value#33928
Open
mattreaganmozilla wants to merge 2 commits into
Open
Refactor FXIOS-15851 WindowManager tabManager API should return an optional value#33928mattreaganmozilla wants to merge 2 commits into
mattreaganmozilla wants to merge 2 commits into
Conversation
Collaborator
Author
|
+cc @lmarceau Since this is ultimately more of a Tab change than an actual WindowManager change. |
💪 Quality guardian2 tests files modified. You're a champion of test coverage! 🚀 🥇 Perfect PR sizeSmaller PRs are easier to review. Thanks for making life easy for reviewers! ✨ 💬 Description craftsmanGreat PR description! Reviewers salute you 🫡 ✅ New file code coverageNo new file detected so code coverage gate wasn't ran. ✅ Existing file code coverageAll modified files meet their thresholds. Client.app: Coverage: 40.74
Generated by 🚫 Danger Swift against ec838e8 |
|
|
||
| /// Convenience. Provides opportunity for safety checks or window validation. | ||
| @MainActor | ||
| func windowExists(uuid: WindowUUID) -> Bool |
Collaborator
Author
There was a problem hiding this comment.
Removed windowExists() because I think it was a code smell. Generally callers should not need to directly check this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Tickets
Jira ticket
💡 Description
Refactors the tabManager API in our
WindowManageradopters to return an optional value. I've kept the Sentry logging in that func in place, so that unexpected or invalid UUIDs should still be visible to us.Because we're still logging in that func, in most cases early returns are still reasonable and are preferable to us doing something like returning some other window's tabManager (which is very unsafe).
📝 Checklist