JetLime icon indicating copy to clipboard operation
JetLime copied to clipboard

Jetlime Extended Event breaks custom point type?

Open Ashkan-san opened this issue 9 months ago • 2 comments

Hey there, I'm trying to use the extended event type to display a simple date text composable on the left side of a vertical column. but using that breaks my current custom event point type i created. it removes the color and filling. is that a bug?

Ashkan-san avatar Mar 23 '25 19:03 Ashkan-san

Let me look into this. Do you have a sample code?

pushpalroy avatar Mar 29 '25 21:03 pushpalroy

Sure, it looks something like this. I think the issue might be that since I use JetLimeExtendedEvent, but JetLimeDefaults for the styling, the styles are not getting applied correctly?

JetLimeColumn(
        modifier = Modifier
            .fillMaxWidth()
            .heightIn(max = 500.dp),
        itemsList = ItemsList(entries),
        style = JetLimeDefaults.columnStyle(
            itemSpacing = 32.dp,
        )
    ) { index, item, position ->
        JetLimeExtendedEvent(
            style = JetLimeEventDefaults.eventStyle(
                position = position,
                pointStrokeWidth = 0.dp,
                pointRadius = 16.dp,
                pointColor = item.status.getColor(),
                pointFillColor = item.status.getColor(),
                pointStrokeColor = item.status.getColor(),
                pointType = EventPointType.custom(
                    icon = rememberVectorPainter(item.status.getIcon(true)),
                    tint = contentColorFor(item.status.getColor()),
                )
            ),
            additionalContent = {
                Text(
                    text = item.timestamp.formatDayMonth(),
                    style = MaterialTheme.typography.bodySmall,
                )
            }
        ) {
            Column(
                verticalArrangement = Arrangement.spacedBy(4.dp),
            ) {
                Text(
                    text = stringResource(item.status.getLabel(mediaType)),
                    fontWeight = FontWeight.Bold,
                )

                item.rating?.let {
                    MiniStarRatingBar(
                        rating = item.rating,
                        starColor = contentColorFor(item.status.getColor()),
                    )
                }

                Column {
                    item.reviewTitle?.let {
                        Text(
                            text = it,
                            style = MaterialTheme.typography.titleMedium,
                            fontWeight = FontWeight.Bold,
                        )
                    }

                    item.reviewDescription?.let {
                        Text(
                            text = it,
                            style = MaterialTheme.typography.titleSmall,
                        )
                    }
                }
            }
        }
}

Ashkan-san avatar Mar 30 '25 10:03 Ashkan-san

@pushpalroy hey, any chance this could be fixed? would really appreciate it! :)

Ashkan-san avatar Jul 21 '25 22:07 Ashkan-san

Yes, working on it. 👍🏻

pushpalroy avatar Aug 09 '25 20:08 pushpalroy

Fixed in v4.0.0. 👍🏻

pushpalroy avatar Aug 10 '25 21:08 pushpalroy