Skip to content

Commit

Permalink
Fix lint problems
Browse files Browse the repository at this point in the history
  • Loading branch information
PravinPK committed Nov 1, 2024
1 parent ac42ee5 commit 0e0c416
Show file tree
Hide file tree
Showing 15 changed files with 68 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ The `getContentCardsUI` method retrieves an array of [ContentCardUI](./public-cl

#### Parameters:

- _surface_ - The [Surface](../../public-classes/surface.md) for which the content cards should be retrieved.
- _customizer_ - An optional [ContentCardCustomizing](./public-classes/contentcardcustomizing.md) object to customize the appearance of the content card template. If you do not need to customize the appearance of the content card template, this parameter can be omitted.
- _listener_ - An optional [ContentCardUIEventListening](./public-classes/contentcarduieventlistening.md) object to listen to UI events from the content card. If you do not need to listen to UI events from the content card, this parameter can be omitted.
- _completion_ - A completion handler that is called with a `Result` containing either:
- _success_ - An array of [ContentCardUI](./public-classes/contentcardui.md) objects representing the content cards to be displayed.
- _failure_ - An `Error` object indicating the reason for the failure, if any.
* _surface_ - The [Surface](../../public-classes/surface.md) for which the content cards should be retrieved.
* _customizer_ - An optional [ContentCardCustomizing](./public-classes/contentcardcustomizing.md) object to customize the appearance of the content card template. If you do not need to customize the appearance of the content card template, this parameter can be omitted.
* _listener_ - An optional [ContentCardUIEventListening](./public-classes/contentcarduieventlistening.md) object to listen to UI events from the content card. If you do not need to listen to UI events from the content card, this parameter can be omitted.
* _completion_ - A completion handler that is called with a `Result` containing either:
* _success_ - An array of [ContentCardUI](./public-classes/contentcardui.md) objects representing the content cards to be displayed.
* _failure_ - An `Error` object indicating the reason for the failure, if any.

<InlineAlert variant="info" slots="text"/>

Calling this API will not download content cards from Adobe Journey Optimizer; it will only retrieve the content cards that are already downloaded and cached by the Messaging extension. You **must** call [`updatePropositionsForSurfaces`](../../code-based/api-reference.md#updatepropositionsforsurfaces) API with the desired surfaces prior to calling this API.
Calling this API will not download content cards from Adobe Journey Optimizer; it will only retrieve the content cards that are already downloaded and cached by the Messaging extension. You **must** call [`updatePropositionsForSurfaces`](../../code-based/api-reference.md#updatepropositionsforsurfaces) API with the desired surfaces prior to calling this API.

#### Syntax

Expand All @@ -58,12 +58,12 @@ let homePageSurface = Surface(path: "homepage")
Messaging.updatePropositionsForSurfaces([homePageSurface])

// Get the content card UI for the homepage surface
Messaging.getContentCardsUI(for: acrobatCardsSurface) { result in
Messaging.getContentCardsUI(for: homePageSurface) { result in
switch result {
case .success(let contentCards):
// Use the contentCards array to display UI for templated content cards in your application
case .failure(let error):
// Handle the error
}
}
```
```
36 changes: 18 additions & 18 deletions src/pages/edge/adobe-journey-optimizer/content-card-ui/iOS/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,35 @@ keywords:

## Requirements

- iOS 15 (or newer)
- Xcode 15 (or newer)
- Swift 5.1 (or newer)
* iOS 15 (or newer)
* Xcode 15 (or newer)
* Swift 5.1 (or newer)

## API Reference

- [Content Card API's](./api-usage.md)
* [Content Card API's](./api-usage.md)

## Public Classes, Enums, and Protocols

- [Class - ContentCardUI](./public-classes/contentcardui.md)
- [Protocol - ContentCardCustomizing](./public-classes/contentcardcustomizing.md)
- [Protocol - ContentCardUIEventListening](./public-classes/contentcarduieventlistening.md)
- [Enum - ContentCardTemplateType](./public-classes/contentcardtemplatetype.md)
* [Class - ContentCardUI](./public-classes/contentcardui.md)
* [Protocol - ContentCardCustomizing](./public-classes/contentcardcustomizing.md)
* [Protocol - ContentCardUIEventListening](./public-classes/contentcarduieventlistening.md)
* [Enum - ContentCardTemplateType](./public-classes/contentcardtemplatetype.md)

## Templates

- [SmallImageTemplate](./templates/smallimage-template.md)
* [SmallImageTemplate](./templates/smallimage-template.md)

## UI Elements

- [AEPText](./ui-elements/aeptext.md)
- [AEPButton](./ui-elements/aepbutton.md)
- [AEPImage](./ui-elements/aepimage.md)
- [AEPStack](./ui-elements/aepstack.md)
- [AEPDismissButton](./ui-elements/aepdismissbutton.md)
* [AEPText](./ui-elements/aeptext.md)
* [AEPButton](./ui-elements/aepbutton.md)
* [AEPImage](./ui-elements/aepimage.md)
* [AEPStack](./ui-elements/aepstack.md)
* [AEPDismissButton](./ui-elements/aepdismissbutton.md)

## Tutorials

- [Fetch and Display Content Cards](./tutorial/displaying-content-cards.md)
- [Customizing Content Card Templates](./tutorial/customizing-content-card-templates.md)
- [Listening to Content Card Events](./tutorial/listening-content-card-events.md)
* [Fetch and Display Content Cards](./tutorial/displaying-content-cards.md)
* [Customizing Content Card Templates](./tutorial/customizing-content-card-templates.md)
* [Listening to Content Card Events](./tutorial/listening-content-card-events.md)
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,20 @@ protocol ContentCardCustomizing {

## Methods

### customize
### customize

Customize content cards with [SmallImageTemplate](../PublicClasses/Template/smallimage-template.md).

#### Parameters

- _template_ - The `SmallImageTemplate` instance to be customized.
* _template_ - The `SmallImageTemplate` instance to be customized.

#### Syntax

<CodeBlock slots="heading, code" repeat="1" languages="Swift" />

#### Swift

``` swift
func customize(template: SmallImageTemplate)
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ keywords:

# ContentCardTemplateType

An enumeration of the different types of content card templates supported by the AEPSwiftUI framework.
An enumeration of the different types of content card templates supported by the AEPSwiftUI framework.

Each case corresponds to a specific template type, identified by its JSON string value.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ The ContentCardUI class is responsible for holding data for a content card and p
| --- | --- | --- |
| view | [View](https://developer.apple.com/documentation/swiftui/view) | The SwiftUI view representing the content card. |
| meta | [String: Any] | The metadata associated with the content card. |

Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Called when the content card appears on the screen. Implementation of this metho

#### Parameters

- _card_ - The [ContentCardUI](./contentcardui.md) that is displayed.
* _card_ - The [ContentCardUI](./contentcardui.md) that is displayed.

#### Syntax

Expand All @@ -55,7 +55,7 @@ Called when the content card is dismissed. Implementation of this method is opti

#### Parameters

- _card_ - The [ContentCardUI](./contentcardui.md) that is dismissed.
* _card_ - The [ContentCardUI](./contentcardui.md) that is dismissed.

#### Syntax

Expand All @@ -73,9 +73,9 @@ Called when the user interacts with the content card. Implementation of this met

#### Parameters

- _card_ - The [ContentCardUI](./contentcardui.md) that is interacted with.
- _interactionId_ - A string identifier for the interaction event.
- _actionURL_ - The optional URL associated with the interaction.
* _card_ - The [ContentCardUI](./contentcardui.md) that is interacted with.
* _interactionId_ - A string identifier for the interaction event.
* _actionURL_ - The optional URL associated with the interaction.

#### Returns

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ keywords:
---

# SmallImageTemplate

This class represents a SmallImage templated content card authored in Adobe Journey Optimizer.

This class represents a SmallImage templated content card authored in Adobe Journey Optimizer.

A small image template content card includes a title, body, image, and a maximum of three buttons. The image is displayed in line with the text content. An optional dismiss button can be added to dismiss the content card.

Use the SmallImageTemplate class to customize the appearance of the small image templated content cards.

A small image template content card includes a title, body, image, and a maximum of three buttons. The image is displayed in line with the text content. An optional dismiss button can be added to dismiss the content card.

Use the SmallImageTemplate class to customize the appearance of the small image templated content cards.

SmallImageTemplate conforms to `ObservableObject`, allowing it to be used reactively in SwiftUI views.

## Layout
Expand All @@ -45,4 +45,4 @@ keywords:
| buttonHStack | [AEPHStack](../ui-elements/aepstack.md#aephstack) | A horizontal stack for arranging buttons. |
| textVStack | [AEPVStack](../ui-elements/aepstack.md#aepvstack) | A vertical stack for arranging the title, body, and buttons. |
| rootHStack | [AEPHStack](../ui-elements/aepstack.md#aephstack) | A horizontal stack for arranging the image and text stack. |
| dismissButton | [AEPDismissButton](../ui-elements/aepdismissbutton.md) | *Optional*<br/>The dismiss button for the content card. |
| dismissButton | [AEPDismissButton](../ui-elements/aepdismissbutton.md) | *Optional*<br/>The dismiss button for the content card. |
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ Messaging.getContentCardsUI(for: detailPageSurface,
customizer: detailPageCustomizer) { result in
// handle result
}
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ This tutorial explains how to listen to content card events in your application.

The Messaging extension provides a way to listen to events from content cards displayed in your application. The following functions can be implemented in conformance with the [ContentCardUIEventListening](../public-classes/contentcarduieventlistening.md) protocol:

- `onDisplay`
- `onDismiss`
- `onInteract`
* `onDisplay`
* `onDismiss`
* `onInteract`

## Implement ContentCardEventListening

Expand Down Expand Up @@ -85,9 +85,9 @@ struct HomePage: View, ContentCardUIEventListening {

The `onInteract` method provides an optional `actionURL` parameter associated with the interaction event. The return value of this method determines how the URL is handled.

- Return `true` if your application has successfully handled the URL. This indicates to the SDK that no further action is needed.
* Return `true` if your application has successfully handled the URL. This indicates to the SDK that no further action is needed.

- Return `false` to allow the SDK to process the URL.
* Return `false` to allow the SDK to process the URL.

<CodeBlock slots="heading, code" repeat="1" languages="Swift" />

Expand All @@ -98,7 +98,7 @@ func onInteract(_ card: ContentCardUI, _ interactionId: String, actionURL: URL?)
guard let url = actionURL else { return false }

// Your application handles the actionable URL here

// Return true to indicate that the SDK need not process the URL
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ keywords:

The AEPButton class is a fundamental UI component used to create interactive buttons for content cards.

Customization of the button's properties can be achieved with a custom view modifier.
Customization of the button's properties can be achieved with a custom view modifier.

AEPButton conforms to `ObservableObject`, allowing it to be used reactively in SwiftUI views.

Expand Down Expand Up @@ -58,4 +58,4 @@ class MyCustomizer: ContentCardCustomizing {
}
}
}
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ class MyCustomizer: ContentCardCustomizing {
}
}
}
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ keywords:

The AEPImage class is a fundamental UI component used to display images for content cards.

Images can be displayed from various sources (URL, bundle, or SF Symbols) and their appearance can be customized.
Images can be displayed from various sources (URL, bundle, or SF Symbols) and their appearance can be customized.

AEPImage conforms to `ObservableObject`, allowing it to be used reactively in SwiftUI views.

## Image Sources

The AEPImage class supports multiple sources for displaying images, with built-in support for both light and dark mode variants.
The AEPImage class supports multiple sources for displaying images, with built-in support for both light and dark mode variants.

Image sources are prioritized in the following order:

- URL images
- Bundled resource images
- SF Symbol icons
* URL images
* Bundled resource images
* SF Symbol icons

## Public properties

Expand Down Expand Up @@ -75,4 +75,4 @@ class MyCustomizer: ContentCardCustomizing {
}
}
}
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ class MyCustomizer : ContentCardCustomizing {
}
}
}
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ keywords:

The AEPText class is a fundamental UI component used to display text for content cards.

This class allows you to customize the text element with properties like font, color, and modifier.
This class allows you to customize the text element with properties like font, color, and modifier.

AEPText class conforms to `ObservableObject`, allowing it to be used reactively in SwiftUI views.


## Properties

| Property | Type | Description | Default Value |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ keywords:

Messaging extension provides the following UI elements that act as building blocks for creating templated content cards:

- [AEPText](./aeptext.md)
- [AEPButton](./aepbutton.md)
- [AEPImage](./aepimage.md)
- [AEPStack](./aepstack.md)
- [AEPDismissButton](./aepdismissbutton.md)
* [AEPText](./aeptext.md)
* [AEPButton](./aepbutton.md)
* [AEPImage](./aepimage.md)
* [AEPStack](./aepstack.md)
* [AEPDismissButton](./aepdismissbutton.md)

0 comments on commit 0e0c416

Please sign in to comment.