-
Notifications
You must be signed in to change notification settings - Fork 35
Content Card Container UI Component #538
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
base: content-card-containers
Are you sure you want to change the base?
Content Card Container UI Component #538
Conversation
81521eb
to
00e7269
Compare
…content-card-containers
…content-card-containers
import { Text, View } from "react-native"; | ||
|
||
function UnreadIcon() { | ||
function UnreadIcon({ placement, image }: { placement: string|undefined, image: { url: string; darkUrl?: string | undefined; } | undefined }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Calise is doing this component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just placeholder
const { content, error, isLoading } = useContentCardUI(surface); | ||
|
||
const scheme = useColorScheme(); | ||
const headingColor = Platform.OS === 'ios' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this os condition returns the same either way
const { heading, layout, emptyStateSettings, unread_indicator, isUnreadEnabled } = contentSettings; | ||
|
||
// Derived flags used across renders | ||
const isHorizontal = layout?.orientation === 'horizontal'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these should all be memoized
const styles = StyleSheet.create({ | ||
contentContainer: { | ||
flex: 1, | ||
minHeight: 140, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would not used defined heights/widths here or the other styles. Let the content dictate it or the user
data={content as T[]} | ||
contentContainerStyle={[styles.contentContainer, contentContainerStyle]} | ||
horizontal={settings?.content?.layout?.orientation === "horizontal"} | ||
ItemSeparatorComponent={() => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We dont need a separator component. The user can add one if theyd like
Adding Content Card Container UI Component
Description
Related Issue
https://jira.corp.adobe.com/browse/MOB-24117
Screenshots (if appropriate):
Vertical Layout (w/o Unread Background Color):
Screen.Recording.2025-10-03.at.4.11.23.PM.mov
Horizontal Layout (w/ Unread Background Color):
Screen.Recording.2025-10-03.at.4.06.08.PM.mov
Types of changes
Checklist: