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

[MC-1470] Custom templates actions (Custom Templates Part 5) #336

Merged
merged 8 commits into from
Jun 17, 2024

Conversation

nzagorchev
Copy link
Contributor

Overview

  • Implement triggering actions from custom templates.
  • Trigger custom functions from Default SDK in-apps.
  • Custom actions with functions isVisual:true are added at the front of the in-app notifications queue. Default actions and functions isVisual:false are executed directly.
  • CustomTemplateInAppData for Actions is set isAction:true. Those actions present and dismiss do not call the CTInAppNotificationDisplayDelegate delegate.

Implementation

  • Notification actions handling method handleNotificationCTA:buttonCustomExtras:forNotification:fromViewController:withExtras: is replaced with handleNotificationAction:forNotification:withExtras: which now handles all types of actions
  • Handle open URL is extracted into method handleCTAOpenURL:
  • Implemented _addInAppNotificationInFrontOfQueue which uses CTInAppNotification.
  • Custom actions are handled in triggerCustomTemplateAction:(CTCustomTemplateInAppData *)actionData forNotification:(CTInAppNotification *)notification.
  • Implemented onClose action to call the CustomTemplate presenter onCloseClicked:.

@nzagorchev nzagorchev requested a review from akashvercetti June 6, 2024 14:09
@nzagorchev nzagorchev force-pushed the custom_templates_actions branch from 4cd604b to 851711e Compare June 17, 2024 14:30
@nzagorchev nzagorchev merged commit 3b20bf9 into custom_inapp_templates Jun 17, 2024
1 check passed
nzagorchev added a commit that referenced this pull request Aug 6, 2024
* [MC-1465] Custom templates define (Custom Templates Part 1) (#327)

* [MC-1467] Custom templates Sync (Custom Templates Part 2) (#329)

* [MC-1466] Custom templates data in inapp notification (Custom Templates Part 3) (#330)

* [MC-1468] Custom templates present and dismiss (Custom Templates Part 4) (#332)

* [MC-1470] Custom templates actions (Custom Templates Part 5) (#336)

* [MC-1649] Custom functions allow dictionaries (Custom Templates Part 6) (#337)

* [MC-1472] In-app actions js interface (Custom Templates Part 7) (#338)

* Implement custom templates file arguments (#348)

* Add template and template context debug descriptions (#351)

* [MC-1823] Fix html view controller presented before scene became active (#352)

* tvOS compatibility (#353)

* Add SDK version as window variable to the JS interface (#354)

* Create the syncPayload and meta outside the syncWithBlock (#356)

* Expose activeContextForTemplate (#357)

* [MC-1883] File download concurrency (#358)

* Enumerate synchronously (#359)

* Update docs, Changelog and README (#360)

* Update SPM (#362)

* Bump version to 7.0.0 (#361)
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