Skip to content

Releases: leboncoin/spark-android

1.4.0-alpha02

29 Jul 15:26
1.4.0-alpha02
5d3de3d

Choose a tag to compare

1.4.0-alpha02 Pre-release
Pre-release

Spark

Switch

  • 🔧 Reverted the removal of contentSide parameter from SwitchLabelled components to maintain backward compatibility

Modal

  • 🐛 Fixed ModalScaffold by removing FLAG_LAYOUT_NO_LIMITS window flag to allow proper scrollable popup behavior when it's used inside it

Full Changelog: 1.4.0-alpha01...1.4.0-alpha02

1.4.0-alpha01

28 Jul 16:00
1.4.0-alpha01
a8ba917

Choose a tag to compare

1.4.0-alpha01 Pre-release
Pre-release

1.4.0-alpha01

2025-07-28

Spark

Checkbox, RadioButton & Switch: API changes

  • The intent parameter for Checkbox, RadioButton, and Switch is now deprecated and will be removed in a future release. We are keeping only the "Basic" and "Error" colors to ensure better visual consistency.
  • Use the new error: Boolean parameter to indicate error/validation state for Checkbox & RadioButton components.
  • The ContentSide parameter will be deprecated in a future release to improve readability and accessibility (a11y). All content will be aligned to the right/end by default for better screen reader support.

Caution

  • If you use a color other than "Basic" or "Error", consider replacing it and use the new error parameter.
  • If you use Start/left content side, update your usage to End/right alignment for improved accessibility.

Full Changelog: 1.3.0...1.4.0-alpha01

1.3.0

17 Jul 14:19
1.3.0
041bbb4

Choose a tag to compare

Spark

🆕 High Color Contrast Support

Note

This feature requires Android 14 (API level 34) or higher to access system contrast settings.

  • ✨ High contrast color themes are now available for both light and dark modes

Call these new methods to get the basic colors in high contrast for light and dark mode:

if (useDarkColors) {
    darkHighContrastSparkColors()
} else {
    lightHighContrastSparkColors()
}

🆕 ComboBox Component

Tip

ComboBox uses the new TextFieldState API for improved state management.

  • Major API Upgrade: ComboBox components now use TextFieldState instead of value/onValueChange pattern (#1572)
  • Enhanced Single Selection: SingleChoiceComboBox with improved filtering and suggestion capabilities
  • Multi-Selection Support: MultiChoiceComboBox with chip-based selection display and management

Example: Real-time Filtering ComboBox

val state = rememberTextFieldState()
var expanded by remember { mutableStateOf(false) }
var searchText by remember { mutableStateOf("") }

val filteredBooks by remember(searchText) {
    derivedStateOf {
        if (searchText.isBlank()) comboBoxSampleValues
        else comboBoxSampleValues.filter { 
            it.title.contains(searchText, ignoreCase = true) 
        }
    }
}

LaunchedEffect(Unit) {
    snapshotFlow { state.text }
        .debounce(300.milliseconds)
        .onEach { queryText -> searchText = queryText.toString() }
        .collect()
}

SingleChoiceComboBox(
    state = state,
    expanded = expanded,
    onExpandedChange = { expanded = it },
    onDismissRequest = { expanded = false },
    label = "Search books",
    placeholder = "Type to search...",
    helper = "Filter books by typing in the search box"
) {
    filteredBooks.forEach { book ->
        DropdownMenuItem(
            text = { Text(book.title) },
            onClick = {
                state.setTextAndPlaceCursorAtEnd(book.title)
                expanded = false
            },
            selected = book.title == state.text
        )
    }
}

Example: Smart Suggestions ComboBox

val state = rememberTextFieldState()
var searchText by remember { mutableStateOf("") }

val suggestedBooks by remember(searchText) {
    derivedStateOf {
        if (searchText.isBlank()) emptyList()
        else comboBoxSampleValues.filter { 
            it.title.contains(searchText, ignoreCase = true) 
        }.take(3) // Limit to top 3 suggestions
    }
}

var showDropdown by remember { mutableStateOf(false) }
val expanded by remember {
    derivedStateOf { showDropdown && suggestedBooks.isNotEmpty() }
}

SingleChoiceComboBox(
    state = state,
    expanded = expanded,
    onExpandedChange = { showDropdown = it },
    onDismissRequest = { 
        searchText = ""
        showDropdown = false 
    },
    label = "Search with suggestions",
    placeholder = "Type to see suggestions...",
    helper = "Get book suggestions as you type"
) {
    suggestedBooks.forEach { book ->
        DropdownMenuItem(
            text = { Text(book.title) },
            onClick = {
                state.setTextAndPlaceCursorAtEnd(book.title)
                searchText = ""
                showDropdown = false
            },
            selected = book.title == state.text
        )
    }
}

🐛 Modal & Dialog Improvements

  • 🐛 Modal components now pass correct insets as padding and don't take space when no footer is available (#1579)
  • 🔧 Improved edge-to-edge support for modals with proper window flag handling
  • 🔧 BottomAppBar now uses heightIn instead of fixed height for better responsive behavior

🔧 Component Updates

  • 🗑️ Remove deprecation on IconToggleButton (#1573)
  • 🔧 Dropdown API enhanced to support both single and multi-selection patterns with improved DropdownMenuItem overloads thanks to the work done in the combobox
  • 🐛 Fixed lint rule stubs used for testing (#1564)
  • 🐛 Fixed popover hidden close button issue (#1570) by @amokhefi
  • ♿ Removed duplicate content description for tab icons to improve accessibility (#1563)

Catalog App

  • 🗑️ Removed brand theming options to simplify the configuration (#1571)
  • 🔧 Improved edge-to-edge modal examples with proper padding and inset handling
  • 💬🇫🇷 The catalog app more text translated to french locale
  • ✨ New stepper example for custom form usage (#1560)
  • ✨ New support for high color contrast themes based on system accessibility settings (#1464)
  • 🎨 The catalog app now includes a contrast level slider to test different contrast configurations

🆕 Animation Enhancements

  • ✨ New AnimatedNullableVisibility overloads that properly handle nullable content during exit animations (#1565)
  • ✨ Added pulse animation modifier for creating pulsating visual effects
  • 🎨 Enhanced animation support in preview environments with new composition locals
  • ✨ Added shared transitions throughout the app to showcase how to use them (#1567)

CI

  • 🚀 Added custom job to simplify required status checks (#1586)
  • 🚀 Enabled Gradle Configuration Cache on CI workflow for improved build performance (#1585)
  • 🚀 Optimized CI workflow by splitting jobs for better parallelization (#1584)
  • 🚀 Migrated publishing from OSSRH to Central Portal (#1581)

New Contributors

Full Changelog: 1.2.2...1.3.0

1.2.2

28 Apr 11:26
1.2.2
81d74de

Choose a tag to compare

What's Changed

2025-04-28

Spark

  • ✨ Introduce SparkExceptionHandler that allow users to control the behavior of some crashable invalid events/states
  • 🐛 Fix Image Icon Size leading to crash
  • 🐛 Image will now signal that it's missing a defined size

Full Changelog: 1.2.1...1.2.2

1.2.1

27 Mar 11:45
1.2.1
155d2e3

Choose a tag to compare

Spark

  • 🐛 Ensure Modifiers are applied only once when using conditional Modifiers

Thanks to @EliottLujan for his contribution!

Full Changelog: 1.2.0...1.2.1

1.2.0

19 Mar 16:00
1.2.0
a017885

Choose a tag to compare

1.2.0

2025-03-19

Spark

  • ✨ New Stepper Component
  • 🗑️ includeFontPadding on Spark typographies is not removed since it's no longer needed since Compose 1.6

Catalog

  • 🔗 The catalog app now supports deeplinks to any pages! This allows us to redirect our user quickly to a component that has been introduced or changed.
  • ✨ Now when a component is being worked on you will see a Work in Progress illustration.
  • ✨ A new Catalog component has been created to simplify the uses & selection of enum for configuration.
  • ✨ A component can now have more than 1 Configurator. This is to avoid configurators that are too complex and won't fit easily into one screen.
  • 🚀 Material transitions can now be tested in the catalog app to showcase & test their behaviour.
  • 🕶️ The screen reader navigation has been improved and we'll continue to improve it globally to meet the same standard as lbc

Full Changelog: 1.1.4...1.2.0

1.1.4

19 Feb 16:50
1.1.4
e363866

Choose a tag to compare

1.1.4

2025-02-19

Spark

  • 🛠️ Modal inEdgeToEdge parameter was applied even when set to false.
  • 🐛 Conditional modifiers were reapplying the chain instead of doing nothing when the predicate was false.

Full Changelog: 1.1.3...1.1.4

1.1.3

29 Jan 13:17
1.1.3
64748ba

Choose a tag to compare

1.1.3

2025-01-29

Spark

  • 🛠 Use latest and simpler workaround to display a Dialog in fullscreen with support to edge-to-edge.
  • 🛠️ Modal inEdgeToEdge parameter now default to false.

Full Changelog: 1.1.2...1.1.3

1.1.2

29 Jan 09:45
1.1.2
94fec02

Choose a tag to compare

1.1.2

2025-01-29

Spark

  • 🐛 Conditional modifiers were not working as expected since they returned an empty modifier instead of modifier chain if the condition was not met. @francoisadam

New Contributors

Full Changelog: 1.1.1...1.1.2

1.1.1

29 Jan 08:31
1.1.1
98705f2

Choose a tag to compare

1.1.1

2025-01-28

Spark

  • 🐛 Fix character counter not displaying if no helper message is provided.
  • 🐛 Image no longer use a BoxWithConstraintas its root component which forbid intrinsic sizes
  • 🐛 Revert Image behavior on sizing with empty/loading/error states.

Full Changelog: 1.1.0...1.1.1