Skip to content

Comments

add isFeatured flag to TwinModelCard for featured model selection for LUX application area pages#461

Merged
kofi-k merged 1 commit intomainfrom
isFeatured-models-flag
Feb 24, 2026
Merged

add isFeatured flag to TwinModelCard for featured model selection for LUX application area pages#461
kofi-k merged 1 commit intomainfrom
isFeatured-models-flag

Conversation

@kofi-k
Copy link
Collaborator

@kofi-k kofi-k commented Feb 23, 2026

Part of #445
The models page needs a filter by application area, then jump to models page with filter enabled feels more complete.

This will be done in a different PR.

@kofi-k kofi-k requested a review from Erikvv February 23, 2026 20:03
modelId = Uuid.parse("3801076e-44db-4b42-a27f-5be2b6c82a5c"),
applicationArea = LuxApplicationArea.LUX_REGION
applicationArea = LuxApplicationArea.LUX_REGION,
isFeatured = true
Copy link
Member

Choose a reason for hiding this comment

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

I prefer to end the last line with a comma too. When you add another property in the future the diff will be 1 line instead of 2.

Copy link
Member

@Erikvv Erikvv left a comment

Choose a reason for hiding this comment

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

👍

@Composable
fun FieldModels(
applicationArea: ApplicationArea
applicationArea: LuxApplicationArea
Copy link
Member

@Erikvv Erikvv Feb 24, 2026

Choose a reason for hiding this comment

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

Personally instead of isFeatured I would have added arguments to this component.

fun FieldModels(
    applicationArea: LuxApplicationArea,
    featuredModels: <TwinModelCardItem>,
    showMoreModelsLink: Boolean,
)

And then call it with the featured models on every page

// on LUX Business page
FieldModels(
    applicationArea = LuxApplicationArea.LUX_BUSINESS,
    featuredModels = listOf(cognizant, preZero),
    showMoreModelsLink = false,
)

Copy link
Member

Choose a reason for hiding this comment

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

But the current approach works too, doesn't need to change.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I like this idea, when i started this, i was avoiding having to call FeildModels on every application area page but seems more of a simple design. I will make the change

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Made this change, finishing this issue

@kofi-k kofi-k force-pushed the isFeatured-models-flag branch from 4a5d7ec to 9f82dad Compare February 24, 2026 09:54
@kofi-k kofi-k merged commit 40d5cb6 into main Feb 24, 2026
4 checks passed
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.

2 participants