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

Add Android Content card UI Docs #722

Open
wants to merge 6 commits into
base: android-content-cards
Choose a base branch
from

Conversation

rymorale
Copy link
Contributor

@rymorale rymorale commented Nov 12, 2024

Description

Add Android Content Card UI docs. These docs are based off the Android Messaging repo docs added in adobe/aepsdk-messaging-android#305.

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@PravinPK
Copy link
Contributor

Merged #715 to main branch. @rymorale you can now pull from main branch.

@rymorale rymorale changed the base branch from main to android-content-cards November 21, 2024 18:04
@rymorale rymorale requested a review from amyeoulton November 21, 2024 18:15
Copy link
Collaborator

@amyeoulton amyeoulton left a comment

Choose a reason for hiding this comment

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

  1. There's a general structure we're supposed to follow in documentation where we cannot drop down more than one heading level at a time. For example, and h1 should be followed by and h2. Through this document, headings jump around a lot - often from an h2 to an h4 but sometimes in even greater jumps.

I know the intention here is to be consistent in what is being displayed throughout the documentation (ie. Kotlin sections always being h4s) but this does go against documentation guidelines and should be corrected.

  1. "id" is also used regularly throughout the documentation and should be corrected to "ID". I didn't want to leave notes on every individual instance.

  2. Is AEP a user-facing term for mobile SDKs?

I've left a series of other comments that need attention.

@@ -0,0 +1,77 @@
---
title: Content Card UI
description: These documents guide you to integrating a content card ui message with an Android app.
Copy link
Collaborator

Choose a reason for hiding this comment

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

UI should be capitalized here.

@@ -0,0 +1,165 @@
---
title: AepUI
description: This document contains information regarding the AepUI interface and it's implementations.
Copy link
Collaborator

Choose a reason for hiding this comment

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

should be "its" without the apostrophe.


# AepUI

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:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the second line discussing the library again, or the UI directly? If it's discussing the library, this would make more sense as either "The AEP compose UI library..." or "AEP compose UI...".

Otherwise, disregard.

There is also only a single template listed under here, so templates should be singular.


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`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this is the only template, we should remove the numbering.

fun updateState(newState: S)
```

# Implementing Classes
Copy link
Collaborator

Choose a reason for hiding this comment

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

There should only be one h1 heading per document.

}
```

Refer to this [TestApp](https://github.com/adobe/aepsdk-messaging-android/tree/feature/content-cards/code/testapp) for a complete example of how to display, customize and listen to UI events from content cards in a Compose UI application.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Need a comma after customize here.


#### Retrieve ContentCardSchemaData from the Messaging extension

You may retrieve the `ContentCardSchemaData` for a Content Card using the template id using the [ContentCardMapper](../public-classes/contentcardmapper.md):
Copy link
Collaborator

Choose a reason for hiding this comment

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

having "using" twice in a row here is a little confusing. Perhaps "with the template id using..."


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.
Copy link
Collaborator

Choose a reason for hiding this comment

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

These should both be "returns".


#### Returns

A template of type `T` which is an implementation of the `AepUITemplate` interface
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing a period at the end of this sentence.


Class representing the style for a small image AEP UI.

![Small Image Card Composeable Layout](../../../assets/Android/SmallImageCard composable layout.png)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This image link has spaces in it and will be broken.

@rymorale
Copy link
Contributor Author

  1. There's a general structure we're supposed to follow in documentation where we cannot drop down more than one heading level at a time. For example, and h1 should be followed by and h2. Through this document, headings jump around a lot - often from an h2 to an h4 but sometimes in even greater jumps.

I know the intention here is to be consistent in what is being displayed throughout the documentation (ie. Kotlin sections always being h4s) but this does go against documentation guidelines and should be corrected.

  1. "id" is also used regularly throughout the documentation and should be corrected to "ID". I didn't want to leave notes on every individual instance.
  2. Is AEP a user-facing term for mobile SDKs?

I've left a series of other comments that need attention.

I'll get the heading sizing fixed up and id correctly changed to ID. Thanks for the heads up regarding these two inconsistencies. I think AEP is less widely used so I can replace it with Adobe Experience Platform where it is used.

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.

3 participants