Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rymorale committed Nov 14, 2024
1 parent 56a75b6 commit aac561b
Show file tree
Hide file tree
Showing 20 changed files with 57 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The `getContentCardUI` method retrieves a flow of [AepUI](./public-classes/aepui

<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 from the AEPMessaging extension 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 from the AEPMessaging extension with the desired surfaces prior to calling this API.

#### Syntax

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ keywords:

## Requirements

* Latest version of [Android Studio](https://developer.android.com/studio)
* Latest version of [Android Studio](https://developer.android.com/studio)
* Android API 21 (or newer)
* Kotlin 1.5.0 (or newer)
* App with support for [Jetpack Compose](https://developer.android.com/develop/ui/compose/setup)
Expand All @@ -28,37 +28,37 @@ keywords:

## Public Classes, Enums, and Interfaces

- [Interface - AepUI](./public-classes/aepui.md)
- [Class - ContentCardMapper](./public-classes/contentcardmapper.md)
- [Interface - ContentCardUIEventListener](./public-classes/contentcarduieventlistener.md)
- [Class - UIAction](./public-classes/uiaction.md)
- [Class - UIEvent](./public-classes/uievent.md)
* [Interface - AepUI](./public-classes/aepui.md)
* [Class - ContentCardMapper](./public-classes/contentcardmapper.md)
* [Interface - ContentCardUIEventListener](./public-classes/contentcarduieventlistener.md)
* [Class - UIAction](./public-classes/uiaction.md)
* [Class - UIEvent](./public-classes/uievent.md)

## Content Provider

- [AepUIContentProvider](./public-classes/content-provider/aepuicontentprovider.md)
- [ContentCardUIProvider](./public-classes/content-provider/contentcarduiprovider.md)
* [AepUIContentProvider](./public-classes/content-provider/aepuicontentprovider.md)
* [ContentCardUIProvider](./public-classes/content-provider/contentcarduiprovider.md)

## Observers

- [AepUIEventObserver](./public-classes/observers/aepuieventobserver.md)
- [ContentCardEventObserver](./public-classes/observers/contentcardeventobserver.md)
* [AepUIEventObserver](./public-classes/observers/aepuieventobserver.md)
* [ContentCardEventObserver](./public-classes/observers/contentcardeventobserver.md)

## State

- [AepCardUIState](./public-classes/state/aepcarduistate.md)
- [SmallImageCardUIState](./public-classes/state/smallimagecarduistate.md)
* [AepCardUIState](./public-classes/state/aepcarduistate.md)
* [SmallImageCardUIState](./public-classes/state/smallimagecarduistate.md)

## Styles

- [AepButtonStyle](./public-classes/styles/aepbuttonstyle.md)
- [AepCardStyle](./public-classes/styles/aepcardstyle.md)
- [AepColumnStyle](./public-classes/styles/aepcolumnstyle.md)
- [AepIconStyle](./public-classes/styles/aepiconstyle.md)
- [AepImageStyle](./public-classes/styles/aepimagestyle.md)
- [AepRowStyle](./public-classes/styles/aeprowstyle.md)
- [AepTextStyle](./public-classes/styles/aeptextstyle.md)
- [SmallImageUIStyle](./public-classes/styles/smallimageuistyle.md)
* [AepButtonStyle](./public-classes/styles/aepbuttonstyle.md)
* [AepCardStyle](./public-classes/styles/aepcardstyle.md)
* [AepColumnStyle](./public-classes/styles/aepcolumnstyle.md)
* [AepIconStyle](./public-classes/styles/aepiconstyle.md)
* [AepImageStyle](./public-classes/styles/aepimagestyle.md)
* [AepRowStyle](./public-classes/styles/aeprowstyle.md)
* [AepTextStyle](./public-classes/styles/aeptextstyle.md)
* [SmallImageUIStyle](./public-classes/styles/smallimageuistyle.md)

## UI Models

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ keywords:

The `AepUI` interface represents a UI component that can be rendered using the AEP compose UI library. The AEP compose UI currently supports rendering the following UI templates:

1. `SmallImageUI` which renders `Small Image template`
1. `SmallImageUI` which renders `Small Image template`

## Interface Definition

Expand All @@ -35,7 +35,7 @@ sealed interface AepUI<T : AepUITemplate, S : AepCardUIState> {

## Methods

### getTemplate
### getTemplate

Retrieves the template associated with this UI component.

Expand All @@ -53,7 +53,7 @@ A template of type `T` which is an implementation of the `AepUITemplate` interf
fun getTemplate(): T
```

### getState
### getState

Retrieves the current state of the UI component.

Expand All @@ -71,13 +71,13 @@ A state of type `S` which is a subclass of the `AepCardUIState` class.
fun getState(): S
```

### updateState
### updateState

Updates the state of the UI component with a new state.

#### Parameters

- _newState_ - The new state of type `S` to update within the UI component.
* _newState_ - The new state of type `S` to update within the UI component.

#### Syntax

Expand Down Expand Up @@ -110,7 +110,7 @@ class SmallImageUI(

## Methods

### getTemplate
### getTemplate

Retrieves the template associated with the small image UI.

Expand All @@ -128,7 +128,7 @@ The small image template.
override fun getTemplate(): SmallImageTemplate
```

### getState
### getState

Retrieves the current state of the small image UI.

Expand All @@ -146,13 +146,13 @@ The current SmallImageCardUIState.
override fun getState(): SmallImageCardUIState
```

### updateState
### updateState

Updates the current state of the small image UI.

#### Parameters

- _newState_ - The new state of type `SmallImageCardUIState` to update within the UI component.
* _newState_ - The new state of type `SmallImageCardUIState` to update within the UI component.

#### Syntax

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ keywords:

# AepUIContentProvider

Responsible for retrieving and refreshing data as required by the UI.
Responsible for retrieving and refreshing data as required by the UI.

Classes implementing this interface will define a strategy to provide content for rendering the UI.

Expand Down Expand Up @@ -64,4 +64,4 @@ Refreshes the content for the UI. Implementations should update the data into th

```kotlin
suspend fun refreshContent()
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,3 @@ Updates the flow returned by [getContent](#getContent) with the latest cached co
```kotlin
override suspend fun refreshContent()
```

Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Returns a `ContentCardSchemaData` object for the given proposition id.

#### Parameters

- _propositionId_ - the proposition id to use as a key in the `ContentCardSchemaData` map.
* _propositionId_ - the proposition id to use as a key in the `ContentCardSchemaData` map.

#### Returns

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Callback to invoke when a content card is displayed.

#### Parameters

- _aepUI_ - The [AepUI](./aepui.md) instance that was displayed.
* _aepUI_ - The [AepUI](./aepui.md) instance that was displayed.

#### Syntax

Expand All @@ -57,7 +57,7 @@ Callback to invoke when a content card is dismissed.

#### Parameters

- _aepUI_ - The [AepUI](./aepui.md) instance that was dismissed.
* _aepUI_ - The [AepUI](./aepui.md) instance that was dismissed.

#### Syntax

Expand All @@ -75,9 +75,9 @@ Callback to invoke when a content card is interacted with.

#### Parameters

- _aepUI_ - The [AepUI](./aepui.md) instance that was interacted with.
- _interactionId_ - An optional string identifier for the interaction event.
- _actionUrl_ - An optional URL associated with the interaction.
* _aepUI_ - The [AepUI](./aepui.md) instance that was interacted with.
* _interactionId_ - An optional string identifier for the interaction event.
* _actionUrl_ - An optional URL associated with the interaction.

#### Returns

Expand All @@ -91,4 +91,4 @@ A boolean value indicating whether the interaction event was handled. Return `tr

```kotlin
fun onInteract(aepUI: AepUI<*, *>, interactionId: String?, actionUrl: String?): Boolean
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ keywords:
# AepUIEventObserver

Interface for observing events related to AEP UI components. This interface defines a mechanism for handling various types of events triggered by lifecycle changes or user interactions with UI elements, such as display, dismiss, or user interaction events.

## Interface Definition

<CodeBlock slots="heading, code" repeat="1" languages="Kotlin" />
Expand All @@ -36,7 +37,7 @@ Called when an event related to a UI template occurs.

#### Parameters

- _event_ - The event to handle. Implementers can provide specific logic based on the type of UIEvent
* _event_ - The event to handle. Implementers can provide specific logic based on the type of UIEvent

#### Syntax

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Messaging implementation of [AepUIEventObserver](./aepuieventobserver.md) for ha

#### Class Parameters

- _callback_ - An optional [ContentCardUIEventListener](../contentcarduieventlistener.md) to invoke when a content card event occurs.
* _callback_ - An optional [ContentCardUIEventListener](../contentcarduieventlistener.md) to invoke when a content card event occurs.

## Methods

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ keywords:
# AepCardUIState

Class representing the state of an AEP card. This class includes the properties `dismissed` and `displayed` which are common across different card states.

## Class Definition

<CodeBlock slots="heading, code" repeat="1" languages="Kotlin" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ keywords:
# SmallImageCardUIState

Class which implements [AepCardUIState](./aepcarduistate.md) and represents the UI state of a Small Image template card.

## Class Definition

<CodeBlock slots="heading, code" repeat="1" languages="Kotlin" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ Class representing the style for a column within an AEP UI composable.
| modifier | [Modifier](https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier)? | The modifier for the column. |
| verticalArrangement | [Arrangement.Vertical](https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/Arrangement.Vertical)? | The vertical arrangement for the column. |
| horizontalAlignment | [Alignment.Horizontal](https://developer.android.com/reference/kotlin/androidx/compose/ui/Alignment.Horizontal?hl=en)? | The horizontal alignment for the column. |

Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ val smallImageCardStyleRow = SmallImageUIStyle.Builder()
)
.titleAepTextStyle(AepTextStyle(textStyle = TextStyle(Color.Green)))
.build()
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Interface representing a generic UI template in AEP.

## Methods

### getType
### getType

Gets the type of the UI template.

Expand All @@ -31,4 +31,4 @@ Gets the type of the UI template.

``` kotlin
fun getType(): AepUITemplateType
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ keywords:

# AepUITemplateType

An enumeration of the different types of content card templates supported by the Messaging framework.
An enumeration of the different types of content card templates supported by the Messaging 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 @@ -31,7 +31,7 @@ Class which implements [AepUITemplateType](./aepuitemplatetype) and represents a

## Methods

### getType
### getType

Returns the type of this template, which is `AepUITemplateType.SMALL_IMAGE`.

Expand All @@ -43,4 +43,4 @@ Returns the type of this template, which is `AepUITemplateType.SMALL_IMAGE`.

``` kotlin
override fun getType() = AepUITemplateType.SMALL_IMAGE
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,3 @@ Represents a click UIAction that can be performed on a UI component.
``` kotlin
data class Click(val id: String, val actionUrl: String?) : UIAction()
```

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ keywords:
# UIEvent

Represents different types of UI events that can be triggered by the user interaction on the UI templates.

#### Class Parameters

| Parameter | Type | Description |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Note - only content cards for which the user has qualified are returned by the g
## Display Content Cards

The Content Card user interface is implemented using Jetpack Compose, which is the recommended toolkit for Android development. To display content cards in your app, pass the `AepUI` objects returned by the `getContentCardUI` API to the appropriate Content Card composable. The currently supported composables are:

1. SmallImageCard composable for SmallImageUI

### Display Content Cards in Compose UI application
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,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 `ContentCardUIEventListener` interface:

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

## Implement ContentCardUIEventListener

Expand Down Expand Up @@ -94,9 +94,9 @@ private fun AepContentCardList(viewModel: AepContentCardViewModel) {

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="Kotlin" />

Expand Down

0 comments on commit aac561b

Please sign in to comment.