Releases: leboncoin/spark-android
1.4.0-alpha02
Spark
Switch
- 🔧 Reverted the removal of
contentSideparameter fromSwitchLabelledcomponents to maintain backward compatibility
Modal
- 🐛 Fixed ModalScaffold by removing
FLAG_LAYOUT_NO_LIMITSwindow 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
1.4.0-alpha01
2025-07-28
Spark
Checkbox, RadioButton & Switch: API changes
- The
intentparameter forCheckbox,RadioButton, andSwitchis 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: Booleanparameter to indicate error/validation state forCheckbox&RadioButtoncomponents. - The
ContentSideparameter 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
errorparameter. - 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
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
TextFieldStateinstead of value/onValueChange pattern (#1572) - ✨ Enhanced Single Selection:
SingleChoiceComboBoxwith improved filtering and suggestion capabilities - ✨ Multi-Selection Support:
MultiChoiceComboBoxwith 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
heightIninstead 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
DropdownMenuItemoverloads 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
AnimatedNullableVisibilityoverloads that properly handle nullable content during exit animations (#1565) - ✨ Added
pulseanimation 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
- @Sildian made their first contribution in #1496
- @martinbonnin made their first contribution in #1617
- @jinqian made their first contribution in #1627
Full Changelog: 1.2.2...1.3.0
1.2.2
What's Changed
2025-04-28
Spark
- ✨ Introduce
SparkExceptionHandlerthat allow users to control the behavior of some crashable invalid events/states - 🐛 Fix
ImageIcon Size leading to crash - 🐛
Imagewill now signal that it's missing a defined size
Full Changelog: 1.2.1...1.2.2
1.2.1
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
1.2.0
2025-03-19
Spark
- ✨ New Stepper Component
- 🗑️
includeFontPaddingon 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
1.1.4
2025-02-19
Spark
- 🛠️ Modal
inEdgeToEdgeparameter 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
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
inEdgeToEdgeparameter now default to false.
Full Changelog: 1.1.2...1.1.3
1.1.2
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
- @francoisadam made their first contribution in #1439
Full Changelog: 1.1.1...1.1.2
1.1.1
1.1.1
2025-01-28
Spark
- 🐛 Fix character counter not displaying if no helper message is provided.
- 🐛
Imageno longer use aBoxWithConstraintas its root component which forbid intrinsic sizes - 🐛 Revert
Imagebehavior on sizing with empty/loading/error states.
Full Changelog: 1.1.0...1.1.1