-
Notifications
You must be signed in to change notification settings - Fork 4
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
ANDROID-15405 -- PosterCard component #398
Conversation
…ontent Composable and reorganizing current composables in package
…PosterCard" implementation. To be updated in future
…ents in order to fit clickable actions
📱 New catalog for testing generated: Download |
📱 New catalog for testing generated: Download |
📱 New catalog for testing generated: Download |
- Added param in "TopAction" component to be able to receive a "testTag". - FIXED problem resize Image()
📱 New catalog for testing generated: Download |
…xed aspect ratio and the height inner content is bigger than aspect ratio height.
📱 New catalog for testing generated: Download |
…ions() subcomposable in order to be more visible
📱 New catalog for testing generated: Download |
…" folder and linking with main README.md library
📱 New catalog for testing generated: Download |
📱 New catalog for testing generated: Download |
📱 New catalog for testing generated: Download |
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.
👍
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.
Waiting for a11y implementation for final review.
…in PosterCard() main component
📱 New catalog for testing generated: Download |
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.
nice job Ɛ>
📱 New catalog for testing generated: Download |
📱 New catalog for testing generated: Download |
📱 New catalog for testing generated: Download |
…)" in corresponding components
) { | ||
with(topActionData) { | ||
Box( | ||
modifier = Modifier |
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 this should be modifier = modifier
and not the parameter applied in the then() at the end. If you want to add some external paddings, alignment to a box... to the TopAction it won't allow you this way it's done in here if I'm not wrong.
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.
You're so right!
verticalAlignment = Alignment.CenterVertically | ||
) { | ||
firstTopAction?.let { | ||
TopAction(topActionData = it, modifier = Modifier.semantics { traversalIndex = 7f }) |
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.
Does traversalIndex work without defining a traversalGroup? I can't find a traversalGroup in the pr and my experience was that it doesn't work, idk.
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 forgot remove that reference to semantics in this composable. Change in next commit
content: @Composable BoxScope.() -> Unit | ||
) { | ||
Box( | ||
modifier = Modifier |
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.
Here also I think the modifier parameter should be the first modifier to apply and not the last one.
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.
Yep, at first, we opted this approach using semantics() previously. Since that if you want to apply semantics() attributes is necessary do it finally in your modifier. But now this is not necessary. I'll change that!
|
||
@Composable | ||
fun PosterCard( | ||
modifier: Modifier = Modifier, |
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.
The modifier should be the first optional parameter in the parameter list; after all required parameters (except for trailing lambda parameters like card content) but before any other parameters with default values.
📱 New catalog for testing generated: Download |
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.
👍
…postercard # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
📱 New catalog for testing generated: Download |
🥅 What's the goal?
First approach about PosterCard component creation according to current Card Spec section.
Links references:
🚧 How do we do it?
PosterCard.kt
file exposes the main component through is provided corresponding implementation.Warning
This implementation does not include the background video
☑️ Checks
🧪 How can I test this?
postercard_sample.webm
postercard_talkback.webm