Integrate NTP promos into modal coordinator - #9290
Draft
aibrahim- wants to merge 1 commit into
Draft
Conversation
Collapse the New Tab Page's app-originated prompt systems from four to two by absorbing the Privacy Pro foreground promo and the Add Widget promo into the modal coordinator, so they now share its priority ordering and 24-hour cooldown instead of racing each other. - ModalEvaluator gains a declared ModalTrigger (APP_RESUME default so the existing four evaluators are unchanged; NTP_RENDER is new). - Coordinator filters evaluators by trigger: process onResume drives APP_RESUME; the new NewTabPageModalTrigger.onNewTabPageShown() drives NTP_RENDER. - Privacy Pro (APP_RESUME) and Add Widget (NTP_RENDER) become ModalEvaluators that render via NewTabPageModalPresenter, which the visible tab's BrowserTabViewModel implements and registers while visible, reusing the existing CTA bottom-sheet path (pixels and dismiss handling unchanged). - Eligibility for the Privacy Pro promo is extracted into a shared SubscriptionPromoModalDecider; the old checkSubscriptionPromoOnForeground path and the Add Widget branch of getHomeCta are removed, closing the double-prompt window. Task: https://app.asana.com/1/137249556945/task/1214300205792364 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
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.
Collapse the New Tab Page's app-originated prompt systems from four to two by absorbing the Privacy Pro foreground promo and the Add Widget promo into the modal coordinator, so they now share its priority ordering and 24-hour cooldown instead of racing each other.
Task:
Task/Issue URL:
Tech Design URL (if applicable):
Description
Steps to test this PR
Feature 1
UI changes