-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add FXIOS-10164 [Homepage] Navigation for Pocket Section #22597
Conversation
@OrlaM @adudenamedruby @thatswinnie in case you want to peek before the teams meeting |
This pull request has conflicts when rebasing. Could you fix it @cyndichin? 🙏 |
62f639e
to
9d1109b
Compare
@@ -132,7 +131,6 @@ class BrowserCoordinator: BaseCoordinator, | |||
|
|||
func showHomepage() { | |||
let homepageController = self.homepageViewController ?? HomepageViewController(windowUUID: windowUUID) | |||
homepageController.parentCoordinator = self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for a coordinator for homepage since the navigation is done on browser view level and there are no navigation currently that is specific to homepage only.
@@ -7,6 +7,7 @@ import Storage | |||
import WebKit | |||
|
|||
import struct MozillaAppServices.CreditCard | |||
import enum MozillaAppServices.VisitType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a fan of declaring these types from another service, I prefer to have a wrapper object. However, to minimize changing will keep the method for VisitType
the same
/// Navigates from home page to a new link | ||
func navigateFromHomePanel(to url: URL, visitType: VisitType, isGoogleTopSite: Bool) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is specific to homepage today because I am calling the homePanel
method in the browser coordinator. It would be great to have a single navigateToLink
method instead, but leaving this as of now until we revisit some logic that we are doing in BVC. Let me know if any issues!
import Foundation | ||
import Redux | ||
|
||
/// Actions that are related to navigation from the user perspective |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
user perspective for now, we can update this comment if we see that there are API actions taken that uses this
case _ where state.navigationDestination != nil: | ||
guard let destination = state.navigationDestination else { return } | ||
handleNavigation(to: destination) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer if statements, but left this for now to follow suite our other cases.
7fbd8e9
to
61d3ea1
Compare
@DanielDervishi @tusharC95 for visibility |
Client.app: Coverage: 30.63
Generated by 🚫 Danger Swift against c1eef36 |
61d3ea1
to
c1eef36
Compare
📜 Tickets
Jira ticket
Github issue
💡 Description
Background Context
Discuss this PR during the team meeting and agree that this is the path we want to proceed in terms of navigation that is shared across the application. This PR originally came from a question asked in another PR. Some of the logic in that PR gets removed here.
Summary
NavigationBrowserAction
and newNavigationDestination
type that is used to determine how to handle where to navigateHomepageState
knowing about where to navigateBrowserViewControllerState
is responsible for this because the navigation is not unique to homepagehandleNavigation
, the effort seems more worth to test this when we revisit cleaning up BVC.📝 Checklist
You have to check all boxes before merging
@Mergifyio backport release/v120
)Video
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-10-16.at.14.10.08.mp4