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

Behavioral toast updates #1063

Merged
merged 8 commits into from
Nov 9, 2024
Merged

Behavioral toast updates #1063

merged 8 commits into from
Nov 9, 2024

Conversation

jaceklyp
Copy link
Contributor

@jaceklyp jaceklyp commented Nov 6, 2024

Task/Issue URL:
iOS PR: duckduckgo/iOS#3552
macOS PR: duckduckgo/macos-browser#3523
What kind of version bump will this require?: Major

Description:
We’re introducing a behavioral toast on macOS, which required moving logic from the iOS client into BSK. Some of this logic has been updated—specifically, we now only support an event for 3 consecutive refreshes, whereas previously, we had multiple events.

Steps to test this PR:

  1. Run tests.

Internal references:

Software Engineering Expectations
Technical Design Template

@jaceklyp jaceklyp requested a review from dus7 November 6, 2024 22:20
let settings = getSettingsFromConfig()

resetDismissStreakIfNeeded(dismissStreakResetDays: settings.dismissStreakResetDays)
// TODO: Uncomment before merging -> this is just for review builds so it is easier to test
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is just for the purpose of Ship review so it is easier to test the feature but should be removed before merging.

Copy link
Contributor

@dus7 dus7 left a comment

Choose a reason for hiding this comment

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

Looks good! One small thing to consider.

}

func isLessThan48HoursAgo() -> Bool {
self > Date().addingTimeInterval(-48 * 60 * 60)
Copy link
Contributor

Choose a reason for hiding this comment

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

Technically isLessThan(daysAgo: 2) could be used as a backing implementation here. But that's just a nitpick.

@jaceklyp jaceklyp merged commit 1715490 into main Nov 9, 2024
7 checks passed
@jaceklyp jaceklyp deleted the jacek/behavioral-toast-udpates branch November 9, 2024 00:19
samsymons added a commit that referenced this pull request Nov 12, 2024
* main:
  Remediate TunnelVision, TunnelCrack and fix "Exclude Local Networks" (#1039)
  Sync: Send pixels for account removal + decoding issues (#1065)
  Bump github.com/duckduckgo/content-scope-scripts from 6.31.0 to 6.32.0 (#1067)
  Behavioral toast updates (#1063)
  point to CSS branch (#1051)
mgurgel pushed a commit that referenced this pull request Nov 18, 2024
Task/Issue URL: 
iOS PR: duckduckgo/iOS#3552
macOS PR: duckduckgo/macos-browser#3523

**Description**:
We’re introducing a behavioral toast on macOS, which required moving logic from the iOS client into BSK. Some of this logic has been updated—specifically, we now only support an event for 3 consecutive refreshes, whereas previously, we had multiple events.
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