0.3.0
What's Changed
TextField 🧪
TextFields now have a Alert and a Success state and looks more like the current spec for the TextFields.
This is still experimental as there's currently ongoing discussions about the UI.
⚠️ Note that this is a breaking change
- The
leadingIcon
/trailingIcon
are now namedleadingContent
/trailingContent
. - The
isError
boolean parameter now isstate
which accept a TextFieldState that defines if the Textfield is inSuccess
,Error
orAlert
state. - The
error
String param is renamedstateMessage
as it doesn't represent only the error message anymore.
These changes result in this api :
TextField(
value = newEmail,
error = errorMessage,
isError = isErrorEnabled,
onValueChange = onNewEmailChanged,
leadingIcon = { MarkerIcon() },
)
becoming like this:
TextField(
value = newEmail,
stateMessage = errorMessage,
state = if (isErrorEnabled) TextFieldState.Error else null,
onValueChange = onNewEmailChanged,
leadingContent = { MarkerIcon() },
)
Utility
We've added Extension variables on Color
and Typography
to makes usages of dims and highlight easier:
Now instead of writing:
SparkTheme.colors.primary.copy(alpha = alpha = SparkTheme.colors.dim2)
SparkTheme.typographies.body1.copy(fontWeight = FontWeight.Bold)
You can use the simpler
SparkTheme.colors.primary.dim2
SparkTheme.typographies.body1.highlight
But if you're using the Text
API we recommend you to use the provided fontWeight
parameter:
Text(
text = text,
style = SparkTheme.typographies.body2,
fontWeight = FontWeight.Bold,
)
Fixes:
Badges
The Badge had only 2 intents Error and Info. It now has all of them.
Before | After |
Button
The disabled color was following the Material Guideline instead of the spark one, it's now using a DIm3 for the intent color.
Tag
When UI testing a Tag
component, there was an issue trying to find the text inside of it. Indeed Tag descendants were not merged which forced consumers to dig inside it to fetch these informations while this was not needed.
They're now merged so it will be simpler to test this component.
Fixed by @ThibaultChariere
SnackBar
Even if the snackbar is not specified yet we modified its shape to be similar to the one used in Polaris New UI
_Done by @GoUpNorth
Before | After |
⚠️ Breaking changes:
Icons
The deprecated icons are now removed from Spark. please refer to either the Spark Figma Foundation or the icons in your screen Figma.
Other Internals changes
- fix: Rename Colors using Figma tokens by @MarinaRomanova in #500
- feat: Update the catalog app design and add examples by @soulcramer in #373
- fix: Remove isPro param from preview in Catalog App by @MarinaRomanova in #513
New Contributors
- @ThibaultChariere made their first contribution in #511
- @GoUpNorth made their first contribution in #515
Full Changelog: 0.2.0...0.3.0