Skip to content

Add FXIOS-12222 [Toolbar refactor] CFR to onboard existing users #26650

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

thatswinnie
Copy link
Collaborator

📜 Tickets

Jira ticket
Github issue

💡 Description

Adds a new CFR to promote the toolbar update.

🎥 Demos

Demo

Simulator Screenshot - iPhone 16 Pro Max - 2025-05-08 at 17 31 27
Simulator Screenshot - iPhone 16 Pro Max - 2025-05-08 at 17 29 56

📝 Checklist

  • I filled in the ticket numbers and a description of my work
  • I updated the PR name to follow our PR naming guidelines
  • I ensured unit tests pass and wrote tests for new code
  • If working on UI, I checked and implemented accessibility (Dynamic Text and VoiceOver)
  • If adding telemetry, I read the data stewardship requirements and will request a data review
  • If needed, I updated documentation and added comments to complex code
  • If needed, I added a backport comment (example @Mergifyio backport release/v120)

@thatswinnie thatswinnie requested a review from a team as a code owner May 9, 2025 15:46
@thatswinnie thatswinnie requested a review from lmarceau May 9, 2025 15:46
@thatswinnie
Copy link
Collaborator Author

@Mergifyio backport release/v139

@thatswinnie
Copy link
Collaborator Author

@Mergifyio backport release/v138

Copy link
Contributor

mergify bot commented May 9, 2025

backport release/v139

🟠 Waiting for conditions to match

  • merged [📌 backport requirement]

Copy link
Contributor

mergify bot commented May 9, 2025

backport release/v138

🟠 Waiting for conditions to match

  • merged [📌 backport requirement]

@mobiletest-ci-bot
Copy link

Messages
📖 Project coverage: 36.48%
📖 Edited 11 files
📖 Created 0 files

Client.app: Coverage: 35.08

File Coverage
BrowserViewController+TabToolbarDelegate.swift 1.93% ⚠️
BrowserViewController.swift 11.62% ⚠️
ContextualHintViewProvider.swift 37.23% ⚠️
ContextualHintCopyProvider.swift 0.0% ⚠️
ContextualHintEligibilityUtility.swift 83.33%
ContextualHintPrefsKeysProvider.swift 100.0%
NimbusFlaggableFeature.swift 99.36%
NimbusFeatureFlagLayer.swift 68.92%

Generated by 🚫 Danger Swift against 681db9d

@@ -271,6 +276,10 @@ class BrowserViewController: UIViewController,
return featureFlags.isFeatureEnabled(.toolbarNavigationHint, checking: .buildOnly)
}

var isToolbarUpdateHintEnabled: Bool {
return featureFlags.isFeatureEnabled(.toolbarUpdateHint, checking: .buildOnly)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add this flag in the spreadsheet?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we adding subflags to the spreadsheet as well? This one is underneath toolbar refactor.

Comment on lines +115 to +117
guard let selectedTab = tabManager.selectedTab,
selectedTab.isFxHomeTab || selectedTab.isCustomHomeTab
else { return }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With previous toolbar CFR (that was removed recently), we had a check to make sure this wouldn't interfere with the intro screen (on iPad the intro screen is shown on the of the homepage).

The check was:

   private func presentContextualHint() {
        if IntroScreenManager(prefs: profile.prefs).shouldShowIntroScreen { return }

Just wondering if we should have a similar case here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I'll look into that. Thanks @lmarceau 🙏

@@ -19,6 +19,11 @@ features:
If true, enables the navigation contextual hint.
type: Boolean
default: false
toolbar_update_hint:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm glad you made a demo of all those options in that yaml 😆

@@ -45,6 +45,8 @@ struct ContextualHintEligibilityUtility: ContextualHintEligibilityUtilityProtoco
hintTypeShouldBePresented = true
case .navigation:
hintTypeShouldBePresented = true
case .toolbarUpdate:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar question, we had a check in the past to make sure the jump back in sync tab CFR wouldn't show at the same time of the toolbar CFR (removed in this same PR). It seems we should add this back?

    /// Determine if the CFR for SyncedTab in JumpBackIn is presentable.
    ///
    /// The context hint is presentable when certain conditions are met:
    /// - A synced tab appears in Jump Back In
    /// - The Toolbar CFR has already been presented or the CFR toolbar flag is disabled
    /// - This CFR hasn't already been presented
    /// - The Home Tab Banner isn't being displayed (not specified by Product,
    ///   but the CFR might show when the anchor point isn't on screen)
    private var canPresentJumpBackInSyncedTab: Bool {
        return shouldCheckToolbarHasShown
    }

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.

3 participants