Skip to content
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

Revert Rework SelectableLazyColumn #654

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions foundation/api/foundation.api
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,6 @@ public final class org/jetbrains/jewel/foundation/code/highlighting/NoOpCodeHigh
public fun highlight-C7ITchA (Ljava/lang/String;Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow;
}

public final class org/jetbrains/jewel/foundation/lazy/BasicSelectableLazyColumnKt {
public static final fun BasicSelectableLazyColumn (Landroidx/compose/ui/Modifier;Lorg/jetbrains/jewel/foundation/lazy/SelectionMode;Lorg/jetbrains/jewel/foundation/lazy/SelectableLazyListState;Landroidx/compose/foundation/layout/PaddingValues;ZLkotlin/jvm/functions/Function1;Landroidx/compose/foundation/layout/Arrangement$Vertical;Landroidx/compose/ui/Alignment$Horizontal;Landroidx/compose/foundation/gestures/FlingBehavior;Lorg/jetbrains/jewel/foundation/lazy/tree/KeyActions;Lorg/jetbrains/jewel/foundation/lazy/tree/PointerEventActions;Landroidx/compose/foundation/interaction/MutableInteractionSource;Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;III)V
}

public class org/jetbrains/jewel/foundation/lazy/DefaultMacOsSelectableColumnKeybindings : org/jetbrains/jewel/foundation/lazy/DefaultSelectableColumnKeybindings {
public static final field $stable I
public static final field Companion Lorg/jetbrains/jewel/foundation/lazy/DefaultMacOsSelectableColumnKeybindings$Companion;
Expand Down Expand Up @@ -376,6 +372,10 @@ public final class org/jetbrains/jewel/foundation/lazy/SelectableColumnOnKeyEven
public static fun onSelectPreviousItem (Lorg/jetbrains/jewel/foundation/lazy/SelectableColumnOnKeyEvent;Ljava/util/List;Lorg/jetbrains/jewel/foundation/lazy/SelectableLazyListState;)V
}

public final class org/jetbrains/jewel/foundation/lazy/SelectableLazyColumnKt {
public static final fun SelectableLazyColumn (Landroidx/compose/ui/Modifier;Lorg/jetbrains/jewel/foundation/lazy/SelectionMode;Lorg/jetbrains/jewel/foundation/lazy/SelectableLazyListState;Landroidx/compose/foundation/layout/PaddingValues;ZLkotlin/jvm/functions/Function1;Landroidx/compose/foundation/layout/Arrangement$Vertical;Landroidx/compose/ui/Alignment$Horizontal;Landroidx/compose/foundation/gestures/FlingBehavior;Lorg/jetbrains/jewel/foundation/lazy/tree/KeyActions;Lorg/jetbrains/jewel/foundation/lazy/tree/PointerEventActions;Landroidx/compose/foundation/interaction/MutableInteractionSource;Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;III)V
}

public abstract interface class org/jetbrains/jewel/foundation/lazy/SelectableLazyItemScope : androidx/compose/foundation/lazy/LazyItemScope {
public abstract fun isActive ()Z
public abstract fun isSelected ()Z
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import org.jetbrains.jewel.foundation.lazy.tree.PointerEventActions

/** A composable that displays a scrollable and selectable list of items in a column arrangement. */
@Composable
public fun BasicSelectableLazyColumn(
public fun SelectableLazyColumn(
modifier: Modifier = Modifier,
selectionMode: SelectionMode = SelectionMode.Multiple,
state: SelectableLazyListState = rememberSelectableLazyListState(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import kotlin.time.Duration
import kotlin.time.Duration.Companion.milliseconds
import org.jetbrains.jewel.foundation.lazy.BasicSelectableLazyColumn
import org.jetbrains.jewel.foundation.lazy.SelectableLazyColumn
import org.jetbrains.jewel.foundation.lazy.SelectableLazyItemScope
import org.jetbrains.jewel.foundation.lazy.SelectionMode
import org.jetbrains.jewel.foundation.lazy.itemsIndexed
Expand Down Expand Up @@ -109,7 +109,7 @@ public fun <T> BasicLazyTree(
)
}

BasicSelectableLazyColumn(
SelectableLazyColumn(
modifier = modifier,
state = treeState.delegate,
selectionMode = selectionMode,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ internal class SelectableLazyColumnTest {
val scrollState = SelectableLazyListState(LazyListState())
composeRule.setContent {
Box(modifier = Modifier.requiredHeight(100.dp)) {
BasicSelectableLazyColumn(state = scrollState) {
SelectableLazyColumn(state = scrollState) {
items(items1.size, key = { items1[it] }) {
val itemText = "Item ${items1[it]}"
BasicText(itemText, modifier = Modifier.testTag(itemText))
Expand All @@ -59,7 +59,7 @@ internal class SelectableLazyColumnTest {
val state = SelectableLazyListState(LazyListState())
composeRule.setContent {
Box(modifier = Modifier.requiredHeight(300.dp)) {
BasicSelectableLazyColumn(state = state, modifier = Modifier.testTag("list")) {
SelectableLazyColumn(state = state, modifier = Modifier.testTag("list")) {
items(items.size, key = { items[it] }) {
val itemText = "Item ${items[it]}"
BasicText(itemText, modifier = Modifier.testTag(itemText))
Expand Down Expand Up @@ -115,7 +115,7 @@ internal class SelectableLazyColumnTest {
val state = SelectableLazyListState(LazyListState())
composeRule.setContent {
Box(modifier = Modifier.requiredHeight(300.dp)) {
BasicSelectableLazyColumn(state = state, modifier = Modifier.testTag("list")) {
SelectableLazyColumn(state = state, modifier = Modifier.testTag("list")) {
items(items.size, key = { items[it] }) {
val itemText = "Item ${items[it]}"
BasicText(itemText, modifier = Modifier.testTag(itemText))
Expand Down Expand Up @@ -179,7 +179,7 @@ internal class SelectableLazyColumnTest {
val state = SelectableLazyListState(LazyListState())
composeRule.setContent {
Box(modifier = Modifier.requiredHeight(300.dp)) {
BasicSelectableLazyColumn(state = state, modifier = Modifier.testTag("list")) {
SelectableLazyColumn(state = state, modifier = Modifier.testTag("list")) {
items(items.size, key = { items[it] }) {
val itemText = "Item ${items[it]}"
BasicText(itemText, modifier = Modifier.testTag(itemText))
Expand Down Expand Up @@ -226,7 +226,7 @@ internal class SelectableLazyColumnTest {
composeRule.setContent {
Box(modifier = Modifier.requiredHeight(300.dp)) {
val items = currentItems.value
BasicSelectableLazyColumn(state = state, modifier = Modifier.testTag("list")) {
SelectableLazyColumn(state = state, modifier = Modifier.testTag("list")) {
items(items.size, key = { items[it] }) {
val itemText = "Item ${items[it]}"
BasicText(itemText, modifier = Modifier.testTag(itemText))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ import org.jetbrains.jewel.bridge.medium
import org.jetbrains.jewel.bridge.regular
import org.jetbrains.jewel.bridge.retrieveColorOrUnspecified
import org.jetbrains.jewel.bridge.toComposeColor
import org.jetbrains.jewel.foundation.lazy.SelectableLazyColumn
import org.jetbrains.jewel.foundation.lazy.SelectionMode
import org.jetbrains.jewel.foundation.lazy.items
import org.jetbrains.jewel.foundation.lazy.rememberSelectableLazyListState
Expand All @@ -78,7 +79,6 @@ import org.jetbrains.jewel.ui.component.HorizontalSplitLayout
import org.jetbrains.jewel.ui.component.Icon
import org.jetbrains.jewel.ui.component.IconButton
import org.jetbrains.jewel.ui.component.PopupMenu
import org.jetbrains.jewel.ui.component.SelectableLazyColumn
import org.jetbrains.jewel.ui.component.Text
import org.jetbrains.jewel.ui.component.TextField
import org.jetbrains.jewel.ui.component.Typography
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import androidx.compose.ui.unit.dp
import kotlin.random.Random
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import org.jetbrains.jewel.foundation.lazy.SelectableLazyColumn
import org.jetbrains.jewel.foundation.lazy.SelectionMode
import org.jetbrains.jewel.foundation.lazy.rememberSelectableLazyListState
import org.jetbrains.jewel.foundation.lazy.tree.buildTree
Expand All @@ -40,7 +41,6 @@ import org.jetbrains.jewel.ui.component.GroupHeader
import org.jetbrains.jewel.ui.component.LazyTree
import org.jetbrains.jewel.ui.component.OutlinedButton
import org.jetbrains.jewel.ui.component.RadioButtonChip
import org.jetbrains.jewel.ui.component.SelectableLazyColumn
import org.jetbrains.jewel.ui.component.Text
import org.jetbrains.jewel.ui.component.ToggleableChip
import org.jetbrains.jewel.ui.theme.colorPalette
Expand Down
4 changes: 0 additions & 4 deletions ui/api/ui.api
Original file line number Diff line number Diff line change
Expand Up @@ -721,10 +721,6 @@ public final class org/jetbrains/jewel/ui/component/SelectableIconButtonState$Co
public static synthetic fun of-z9lnavA$default (Lorg/jetbrains/jewel/ui/component/SelectableIconButtonState$Companion;ZZZZZZILjava/lang/Object;)J
}

public final class org/jetbrains/jewel/ui/component/SelectableLazyColumnKt {
public static final fun SelectableLazyColumn (Landroidx/compose/ui/Modifier;Lorg/jetbrains/jewel/foundation/lazy/SelectionMode;Lorg/jetbrains/jewel/foundation/lazy/SelectableLazyListState;Landroidx/compose/foundation/layout/PaddingValues;ZLkotlin/jvm/functions/Function1;Landroidx/compose/foundation/layout/Arrangement$Vertical;Landroidx/compose/ui/Alignment$Horizontal;Landroidx/compose/foundation/gestures/FlingBehavior;Lorg/jetbrains/jewel/foundation/lazy/tree/KeyActions;Lorg/jetbrains/jewel/foundation/lazy/tree/PointerEventActions;Landroidx/compose/foundation/interaction/MutableInteractionSource;Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;III)V
}

public final class org/jetbrains/jewel/ui/component/SliderKt {
public static final fun Slider (FLkotlin/jvm/functions/Function1;Landroidx/compose/ui/Modifier;ZLkotlin/ranges/ClosedFloatingPointRange;ILkotlin/jvm/functions/Function0;Landroidx/compose/foundation/interaction/MutableInteractionSource;Lorg/jetbrains/jewel/ui/component/styling/SliderStyle;Landroidx/compose/runtime/Composer;II)V
}
Expand Down

This file was deleted.