Skip to content

chore(list-item): update previews to add an edge-to-edge disabled preview - #1468

Open
paulinea wants to merge 2 commits into
developfrom
1467-add-a-specific-preview-with-edge-to-edge-disabled-and-display-untinted-icon-in-the-demo-app-for-list-item
Open

chore(list-item): update previews to add an edge-to-edge disabled preview#1468
paulinea wants to merge 2 commits into
developfrom
1467-add-a-specific-preview-with-edge-to-edge-disabled-and-display-untinted-icon-in-the-demo-app-for-list-item

Conversation

@paulinea

Copy link
Copy Markdown
Member

No description provided.

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

@paulinea
paulinea marked this pull request as ready for review July 31, 2026 16:44
@paulinea
paulinea requested a review from florentmaitre as a code owner July 31, 2026 16:44

@Composable
internal fun PreviewOudsNavigationListItemWithEdgeToEdgeDisabled(theme: OudsThemeContract) = OudsPreview(theme = theme) {
PreviewEnumEntries<OudsControlState>(maxEnumEntriesInEachRow = 1) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The enum should be OudsListItemState instead of OudsControlState. That explains why new snapshots don't take the state into account.

import androidx.compose.runtime.setValue
import androidx.compose.ui.res.stringResource
import com.orange.ouds.app.R
import com.orange.ouds.app.ui.components.listitem.BaseListItemDemoState.IconTint

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This import can be removed because there are some occurrences of BaseListItemDemoState.IconTint that are greyed out in the file.

Same comment for ListItemDemoState.

)
CustomizationFilterChips(
applyTopPadding = true,
label = stringResource(R.string.app_components_listItem_iconTint_tech),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we also update the title of other filter chips where there are only two values (Tinted and Untinted) to app_components_listItem_iconTint_tech instead of app_components_common_icon_tech?

if (iconSize != OudsListItemDefaults.IconSize) {
typedArgument(sizeParameterName, iconSize)
}
if (iconTint != BaseListItemDemoState.IconTint.Tinted) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The painter argument should also be updated according to the value of iconTint.

To do this we can reuse the iconArgument method from ComponentCode.kt, but we need the updated version from #1479 to be able to set the size parameter.

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.

Add a specific preview with edge to edge disabled and display untinted icon in the demo app for List Item

2 participants