-
Notifications
You must be signed in to change notification settings - Fork 12
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 support for background customization in HTML New Tab Page #3711
Conversation
…ML NTP is available
Task/Issue URL: https://app.asana.com/0/72649045549333/1208973375734052/f Description: This change adds support for displaying Freemium PIR banner in the HTML New Tab Page. The logic of FreemiumDBPPromotionViewCoordinator is updated so that the viewModel is a published property, updated whenever isHomePagePromotionVisible changes (which also means that it's nullified whenever the user dismisses or actions a banner).
DuckDuckGo/Freemium/DBP/Extensions/PromotionView+FreemiumDBP.swift
Outdated
Show resolved
Hide resolved
DuckDuckGo/HomePage/Model/HomePageSettings/CustomBackgrounds/GradientBackground.swift
Show resolved
Hide resolved
DuckDuckGo/HomePage/Model/HomePageSettings/CustomBackgrounds/GradientBackground.swift
Show resolved
Hide resolved
...ckages/NewTabPage/Sources/NewTabPage/CustomBackground/NewTabPageCustomBackgroundClient.swift
Outdated
Show resolved
Hide resolved
LocalPackages/NewTabPage/Sources/NewTabPage/NewTabPageActionsManager.swift
Show resolved
Hide resolved
LocalPackages/NewTabPage/Tests/NewTabPageTests/Helpers/MessageHelper.swift
Show resolved
Hide resolved
@@ -117,6 +117,11 @@ final class DefaultHomePageNavigator: HomePageNavigator { | |||
if let window = WindowControllersManager.shared.lastKeyMainWindowController { | |||
let homePageViewController = window.mainViewController.browserTabViewController.homePageViewController | |||
homePageViewController?.settingsVisibilityModel.isSettingsVisible = true | |||
|
|||
if NSApp.delegateTyped.featureFlagger.isFeatureOn(.htmlNewTabPage) { |
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.
Question about the feature flag: I saw that the htmlNewTabPage
feature has an isLaunched
subfeature, but I didn't see it used anywhere yet. If there's any chance that you'll be using the rollouts
array to roll this out, I'd use that instead, since top level features don't support rollouts. If not, then the current implementation is fine as-is.
(I've been meaning to post about this to the team since this detail bit us for another feature earlier this week.)
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.
Yes, I do plan to use the rollouts array and that was the reason for adding a subfeature :) it's just not implemented yet and will come in a separate PR.
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.
Overall LGTM, left one comment about feature flag usage but I suspect it requires no action. Otherwise, the testing steps all look good and the new changes behave really well after testing each of the options.
Task/Issue URL: https://app.asana.com/0/72649045549333/1208246350498758/f
Description:
This change connects HomePageSettingsModel to HTML New Tab Page.
Steps to test this PR:
Definition of Done:
Internal references:
Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation