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

Add support for background customization in HTML New Tab Page #3711

Merged
merged 77 commits into from
Jan 10, 2025

Conversation

ayoy
Copy link
Collaborator

@ayoy ayoy commented Jan 8, 2025

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:

  1. Launch the app from Xcode, become internal user and enable HTML NTP via the feature flag overrides debug menu.
  2. Click Customize button in the lower right corner and play with the side panel: pick gradients, solid colors and add user images. Verify that backgrounds are updated accordingly.
  3. Verify that switching browser theme in the NTP side panel works as expected.
  4. Verify that custom backgrounds use a fixed theme for NTP components. If you select a light color, NTP should present light-themed views even if browser theme is set to dark.
  5. Verify that "Go to Settings" button opens Appearance Settings.
  6. Close the side panel on NTP, then open Appearance Settings and click "Customize Background". Verify that it opens NTP and then slides in the customization panel.
  7. Smoke test adding and deleting background images (the logic hasn't changed, it's just the new UI).

Definition of Done:


Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

ayoy added 30 commits December 2, 2024 21:47
ayoy added 10 commits January 7, 2025 16:04
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).
Copy link
Contributor

github-actions bot commented Jan 8, 2025

Warnings
⚠️ PR has more than 500 lines of code changing. Consider splitting into smaller PRs if possible.

Generated by 🚫 dangerJS against 813dd9a

@ayoy ayoy requested a review from samsymons January 8, 2025 12:11
@ayoy ayoy marked this pull request as ready for review January 8, 2025 13:53
@ayoy ayoy requested review from samsymons and removed request for samsymons January 8, 2025 13:53
@@ -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) {
Copy link
Collaborator

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.)

Copy link
Collaborator Author

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.

Copy link
Collaborator

@samsymons samsymons left a 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.

@ayoy ayoy merged commit e961a41 into main Jan 10, 2025
20 checks passed
@ayoy ayoy deleted the dominik/customizer branch January 10, 2025 07:25
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.

2 participants