Skip to content

Konfeature plugin redesign#70

Open
EmogurovAnton wants to merge 2 commits intomainfrom
feature/konfeature-plugin-redesign
Open

Konfeature plugin redesign#70
EmogurovAnton wants to merge 2 commits intomainfrom
feature/konfeature-plugin-redesign

Conversation

@EmogurovAnton
Copy link
Copy Markdown
Contributor

No description provided.

@EmogurovAnton EmogurovAnton requested a review from TopHlop April 10, 2026 13:02
Comment on lines +35 to +38
val minHeight by animateDpAsState(
targetValue = if (query.isNotEmpty()) 48.dp else 40.dp,
label = "",
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

А для чего это изменение высоты?

Comment on lines +117 to +118
onValueChange: () -> Unit,
onDismissRequest: () -> Unit,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Тут кажется должно быть onClick, а уже при вызове кнопки передаешь нужную лямбду

Comment on lines +145 to +148
onClick = {
onValueReset()
onDismissRequest()
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

тут тот же комент

Comment on lines +131 to +134
when (item) {
is KonfeatureItem.Config -> "config_${item.name}"
is KonfeatureItem.Value -> "value_${item.key}"
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Лучше бы вынести это в отдельное поле внутри класса item

val overrideCount = state.values.count { value ->
value.configName == item.name && value.isDebugSource
}
ConfigGroupHeader(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

А вот тут логику никак не вынести с ui?

Comment on lines +350 to +362
when {
item.isDebugSource -> SourceLabel(
source = item.sourceName,
isDebug = true,
modifier = modifier,
)

item.sourceName != "Default" -> SourceLabel(
source = item.sourceName,
isDebug = false,
modifier = modifier,
)
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Тут кажется лучше

if (item.isDebugSource || item.sourceName != "Default") {
SourceLabel(
            source = item.sourceName,
            isDebug = item.isDebugSource,
            modifier = modifier,
        )
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Плюс SourceLabel можно и не выносить

internal fun ValueItem(item: KonfeatureItem.Value, onEditClick: (String, Any, Boolean) -> Unit) {
private fun ConfigValueItem(
item: KonfeatureItem.Value,
onEditClick: (String, Any, Boolean) -> Unit,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Может тут нейминг параметров еще указать, а то сходу не понятно (по всему файлу)

Comment on lines +350 to +362
when {
item.isDebugSource -> SourceLabel(
source = item.sourceName,
isDebug = true,
modifier = modifier,
)

item.sourceName != "Default" -> SourceLabel(
source = item.sourceName,
isDebug = false,
modifier = modifier,
)
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Плюс SourceLabel можно и не выносить

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