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

Keep Remote Messages in database if they were shown #3136

Merged
merged 9 commits into from
Jul 25, 2024

Conversation

ayoy
Copy link
Contributor

@ayoy ayoy commented Jul 24, 2024

Task/Issue URL: https://app.asana.com/0/1207619243206445/1207864976004819/f

Description:
Update RemoteMessagingStore to keep track of messages that have ever been shown to the user,
also if the user didn't interact with them (by dismissing or clicking any buttons).
Additionally, upgrade RMF debug view with a button to refetch the config and a bit nicer view
of remote messages in the database.

Steps to test this PR:
See this Asana task.

Definition of Done (Internal Only):

Copy Testing:

  • Use of correct apostrophes in new copy, ie rather than '

Orientation Testing:

  • Portrait
  • Landscape

Device Testing:

  • iPhone SE (1st Gen)
  • iPhone 8
  • iPhone X
  • iPhone 14 Pro
  • iPad

OS Testing:

  • iOS 15
  • iOS 16
  • iOS 17

Theme Testing:

  • Light theme
  • Dark theme

Internal references:

Software Engineering Expectations
Technical Design Template

@@ -264,7 +264,7 @@
<rect key="frame" x="0.0" y="0.0" width="383.5" height="44.5"/>
<autoresizingMask key="autoresizingMask"/>
</tableViewCellContentView>
<listContentConfiguration key="contentConfiguration" text="Remote Messages" secondaryText=""/>
<listContentConfiguration key="contentConfiguration" text="Remote Messaging Framework" secondaryText=""/>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Believe me or not, but this is the only change I made to the storyboard 😅

DuckDuckGo/HomeMessageViewModel.swift Show resolved Hide resolved

// call didAppear here to support marking messages as shown when they appear on the new tab page
// as a result of refreshing a config while the user was on a new tab page already.
onDidAppear()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's fishy, but it works. That said, a remote message appearing on user's new tab page is a rare situation (normally they will appear at app startup after being refreshed in background).

@ayoy ayoy requested a review from samsymons July 24, 2024 15:54
@ayoy ayoy assigned samsymons and unassigned ayoy Jul 24, 2024
@ayoy ayoy marked this pull request as ready for review July 24, 2024 15:55
Copy link
Contributor

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

Works great, and the debug menu changes are nice!

@ayoy ayoy merged commit 879d1f4 into main Jul 25, 2024
14 checks passed
@ayoy ayoy deleted the dominik/rmf-track-shown-messages branch July 25, 2024 06:35
samsymons added a commit that referenced this pull request Jul 25, 2024
* main:
  Update Xcode version to 15.4 (#3142)
  remove pixels for keyboard toggle (#3135)
  Keep Remote Messages in database if they were shown (#3136)
samsymons added a commit that referenced this pull request Jul 26, 2024
# By Dominik Kapusta (2) and others
# Via GitHub
* main:
  Add favorites empty state tooltip (#3119)
  Bump submodules/privacy-reference-tests from `a603ff9` to `afb4f61` (#3113)
  iOS 14 deprecation cleanup (#3098)
  Update Xcode version to 15.4 (#3142)
  remove pixels for keyboard toggle (#3135)
  Keep Remote Messages in database if they were shown (#3136)

# Conflicts:
#	DuckDuckGo/SettingsViewModel.swift
samsymons added a commit that referenced this pull request Jul 28, 2024
# By Daniel Bernal (3) and others
# Via GitHub
* main:
  [DuckPlayer] 13. Add openInfo message to Overlay (#3151)
  [DuckPlayer] 12. Ensure DuckPlayer does not leak without the proper config (#3147)
  [DuckPlayer] 11. Tab views and Pixel updates (#3145)
  Remove the NETWORK_PROTECTION compilation flag (#3139)
  Add favorites empty state tooltip (#3119)
  Bump submodules/privacy-reference-tests from `a603ff9` to `afb4f61` (#3113)
  iOS 14 deprecation cleanup (#3098)
  Update Xcode version to 15.4 (#3142)
  remove pixels for keyboard toggle (#3135)
  Keep Remote Messages in database if they were shown (#3136)

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
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