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

[Connect] Add Dashboard-only access to NotificationBanner #4061

Merged

Conversation

mludowise-stripe
Copy link
Contributor

@mludowise-stripe mludowise-stripe commented Sep 26, 2024

Summary

Adds NotificationBannerViewController equivalent to the Notification banner embedded component with DashboardOnly access.

This component has a delegate callback, didChangeWithTotal: andActionRequired which contains:

  • The total number of notifications
  • The number of notifications that require action

Motivation

https://jira.corp.stripe.com/browse/MXMOBILE-2503

Testing

Unit tests

@mludowise-stripe mludowise-stripe force-pushed the mludowise/MXMOBILE-2503_dashboard_components branch from dd968f0 to e844c0f Compare September 28, 2024 16:40
@mludowise-stripe mludowise-stripe force-pushed the mludowise/MXMOBILE-2503_notification_banner branch from 2c98ef3 to b00b9bd Compare September 28, 2024 17:01
Copy link

github-actions bot commented Sep 28, 2024

🚨 New dead code detected in this PR:

NotificationBannerViewController.swift: warning: Property 'collectionOptions' is assigned, but never used

Please remove the dead code before merging.

If this is intentional, you can bypass this check by adding the label skip dead code check to this PR.

ℹ️ If this comment appears to be left in error, double check that the flagged code is actually used and/or make sure your branch is up-to-date with master.

@mludowise-stripe mludowise-stripe force-pushed the mludowise/MXMOBILE-2503_dashboard_components branch 2 times, most recently from 13b9949 to a272b52 Compare September 29, 2024 00:14
@mludowise-stripe mludowise-stripe force-pushed the mludowise/MXMOBILE-2503_notification_banner branch 2 times, most recently from baf7731 to c04f948 Compare September 29, 2024 00:18
@mludowise-stripe mludowise-stripe force-pushed the mludowise/MXMOBILE-2503_dashboard_components branch from a272b52 to 62516e2 Compare October 1, 2024 00:28
Base automatically changed from mludowise/MXMOBILE-2503_dashboard_components to master October 2, 2024 19:33
@mludowise-stripe mludowise-stripe force-pushed the mludowise/MXMOBILE-2503_notification_banner branch from 6f39d37 to 19b7736 Compare October 2, 2024 19:37
@mludowise-stripe mludowise-stripe changed the title [WIP] Add Dashboard-only access to NotificationBanner [Connect] Add Dashboard-only access to NotificationBanner Oct 2, 2024
@mludowise-stripe mludowise-stripe marked this pull request as ready for review October 2, 2024 22:10
@mludowise-stripe mludowise-stripe requested review from a team as code owners October 2, 2024 22:10
@mludowise-stripe
Copy link
Contributor Author

Dead code check has a false positive because it's not checking if the property is used in an Encodable

@@ -9,7 +9,7 @@ import Foundation

@_spi(PrivateBetaConnect)
/// Collection options for account onboarding
public struct AccountCollectionOptions: Codable {
public struct AccountCollectionOptions: Equatable, Codable {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added Equatable so we could compare values in the Dashboard app

@mludowise-stripe mludowise-stripe force-pushed the mludowise/MXMOBILE-2503_notification_banner branch from 0c10880 to bb8a81d Compare October 4, 2024 21:29
@mludowise-stripe mludowise-stripe merged commit f55f157 into master Oct 4, 2024
6 checks passed
@mludowise-stripe mludowise-stripe deleted the mludowise/MXMOBILE-2503_notification_banner branch October 4, 2024 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants