Skip to content

Releases: adevinta/spark-android

0.9.0

23 Apr 14:52
0.9.0
8d7f963
Compare
Choose a tag to compare

Spark

🆕 Chips can now be selectable and closed

Caution

The Filled style has been removed and may break your build if used. You need to see with your ui to know which styles to use instead of this one

Warning

The styles for chips have been deprecated you now need to use either the Chip or the ChipSelectable components for your need and provide the style in argument

If you want to make your Chip closable then you will need to add a callback action in the new onClose parameter.

Screen_recording_20240423_163700.mp4

🆕 BottomSheet now use the spark specs

Caution

This change will most likely break your build since most of the api has changed.
We now use the M3 BottomSheet instead of a fork from a alpha version of it we did when it was only available in M2.

Warning

The BottomSheet currently only accept M3 snackbars, you won't be able to display a SparkSnackbar


  • 🆕 ProgressTracker is now available! it still has a few minor visual bugs but it can be tested by squads on their scope don't hesitate to give us feedbacks!
Screen_recording_20240423_163832.mp4
  • 🆕 TextLinkButton will now use LocalContentColor when using the Surface intent. This will allow you to have a onSurface TextLink when needed
Screen_recording_20240423_164027.mp4
  • 🆕 Popover can now take an intent for its surface color
image
  • 🆕 Image has its emptyIcon and errorIcon parameters open now for special cases
  • 💬 A11y have been translated to german
  • 💄 Rating will now have a lisible color when disabled
image
  • 💄 Badge now use surface instead of onColor for its border color
  • 🐛 Filled and Contrast Button now have a clear disabled state when their content color is dark
Before After
image image
  • 💄 New icons have been added

Catalog App

  • 🎨 Brand colors has been updated to their latest values
  • 🔧 All Configurators are now scrollable

CI

  • 🔧 Decorrelated spotless and ktlint
  • 🆕 Added Paparazzi as a manual workflow
  • 🆕 Ran Lava Vulnerability Scanner on CI workflow
  • 🔧 Moved code formatting tasks first in the contributing list

New Contributors

Full Changelog: 0.8.0...0.9.0

0.8.0

29 Feb 14:10
6883967
Compare
Choose a tag to compare

Spark

  • 🆕 Create the base custom layout for horizontal progress tracker
  • 🆕 Add Slider component
  • 🐛 Fix the Button end icon being squished when content is too long

Catalog App

  • 🎨 Update TextLink configurator colors
  • 🎨 Add Configurator for Progressbar
  • 🚀 Replace deprecated actionsdesk/lfs-warning with composite action

0.7.0

0.6.0

0.5.0

0.4.2

07 Sep 16:12
d5bde39
Compare
Choose a tag to compare

What's Changed

Fix color not being applied on theme update

Before After
Base
Modified

Full Changelog: 0.4.1...0.4.2

0.4.1

17 Aug 16:05
2447b2b
Compare
Choose a tag to compare

What's Changed

Spark

Catalog App

  • 🆕 Now have examples and a configurator for Button, Checkbox, Switch, RadioButton TextField
  • 💄 The launcher icon now has a light and dark variant depending on the theme mode
  • 🐛 The app state is saved on configuration change
  • 🐛 Fix the link to component documentation

New Contributors

Full Changelog: 0.3.1...0.4.1

0.3.1

01 Aug 07:18
0.3.1
6a878c7
Compare
Choose a tag to compare
  • 🆕 Added Basic and Accent intents to all released components.
  • 💄Updated the default color intents to Basic for Tag, Chip, Spinner.
  • 🗑️ Deprecated Primary and Secondary intents, Main and Supportshould be used instead.

0.3.0

11 Jul 14:15
0.3.0
3bf2541
Compare
Choose a tag to compare

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 named leadingContent/trailingContent.
  • The isError boolean parameter now is state which accept a TextFieldState that defines if the Textfield is in Success, Error or Alert state.
  • The error String param is renamed stateMessage 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.
image

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


New Contributors

Full Changelog: 0.2.0...0.3.0

0.2.0

13 Jun 15:46
b312bca
Compare
Choose a tag to compare

What's Changed

Toggles

The Toggles now better respect the spark specification by allowing to specify a label alignment (start/end) and have a new padding.
If this you adapted your UI to align component with a toggle they will be misaligned like here and you
need to check if this impact your screens or not (@android-adlife is concerned about this for sure)

Modals

Badges

image
The Spark badges are now available and replace the previous Material ones.

If you used the Material version one before you'll have to make the following migration:

@Composable
fun From(){
    val count = 200
    Badge(modifier = Modifier.size(36.dp), containerColor = SparkTheme.colors.error) {
        if(count >= 99){
            Text(text = "99+")
        } else {
            Text(text = count.toString())
        }
    }
}

@Composable
fun To(){
    Badge(badgeStyle = BadgeStyle.Medium, intent = BadgeIntent.Danger, count = 200, overflowCount = 99)
}

Chips

image
The Spark chips are now also available and also replace the previous Material ones.

If you used the Material version one before you'll have to make the following migration:

@Composable
fun From(){
    AssistChip(
        onClick = { /* Do something! */ },
        label = { Text("Assist Chip") },
        leadingIcon = {
            Icon(
                Icons.Filled.Settings,
                contentDescription = "Localized description",
                Modifier.size(AssistChipDefaults.IconSize),
            )
        },
    )

}

@Composable
fun To(){
    ChipOutlined(
        text = "Outlined Chip",
        intent = ChipIntent.Primary,
        leadingIcon = SparkIcon.Account.Offers.Outlined,
        enabled = enabled,
    )
}

You might need to change the Chip intent to correspond to your new ui.

Typography

The typographies now use Nunito as default font.

Documentation

New documentation available at https://adevinta.github.io/spark-android/ so you won’t need to search inside the repo to find how to use a component.

Fixes:

Buttons

The Outlined button now has a disabled outline as expected.

Image

The image component have a new loadingPlaceholder parameter to
let you modify the loading placeholder which is useful in cases like the adview gallery where it
would take the whole screen but created flashes when the loading was too quick.

⚠️ Breaking changes:

Icons

The icons have changed to support automations
when their design changes.

We now have a new IconSize type on the Icon component that maps to the Figma icon component parameter so you won't have to look for which size to use.
So you will have to check if you're using a custom size for your icon you'll have to use this new parameter in the future.

Icons now have a new size parameter that you can use to specify the size of the icon (Use the same from Figma).
The size values are now one of the following:

  • IconSize.Small = 16dp
  • IconSize.Medium = 24dp
  • IconSize.Large = 32dp
  • IconSize.ExtraLarge = 40dp

New Contributors

Full Changelog: 0.1.0...0.2.0