Releases: google/automotive-design-compose
v0.32.0
What's Changed
- Bump webrick from 1.8.1 to 1.8.2 in /docs in the bundler group across 1 directory by @dependabot in #1685
- Update version to 0.32 by @timothyfroehlich in #1687
- Convert Vector to Proto by @timothyfroehlich in #1688
- Fix downloaded image file name after renaming by @yiqunw700 in #1693
- Remove placeholder content support by @yiqunw700 in #1689
- Fix: Use local cargo if available by @timothyfroehlich in #1691
- Update Gradle JVM requirements to require Java 21 by @timothyfroehlich in #1696
- Update to API 35 by @timothyfroehlich in #1710
- Support "ignore auto layout" by @yiqunw700 in #1713
- Fix the non-squoosh renderer not able to close the overlay by @yiqunw700 in #1715
- Dependapool updates for Oct 4 2024 by @timothyfroehlich in #1708
- Update Gradle to 8.10.2 by @timothyfroehlich in #1718
- Add Overlay and Navigation tests for the Interaction design by @timothyfroehlich in #1711
- Make squoosh image customization work by @yiqunw700 in #1720
- Migrate Actions and Reactions to Proto by @timothyfroehlich in #1695
- Update ktfmt to 0.52 and reformat codebase to match by @timothyfroehlich in #1697
- Refactor: Update ViewShape to use proto enums by @timothyfroehlich in #1737
- Bump rexml from 3.3.7 to 3.3.9 in /docs in the bundler group across 1 directory by @dependabot in #1739
- Refactor: Migrate FontStretch and FontWeight to definition/element by @timothyfroehlich in #1738
- ProtoConv: Wrap up most of definition/elements by @timothyfroehlich in #1740
- ProtoConv: Migrate modifier/Blend by @timothyfroehlich in #1741
- ProtoConv: Migrate modifier/Shadow by @timothyfroehlich in #1742
- ProtoConv: modifier/text by @timothyfroehlich in #1743
- ProtoConv: interaction/pointer by @timothyfroehlich in #1758
- ProtoConv: modifier/grid by @timothyfroehlich in #1760
- Dependapool for 10-29-24 by @timothyfroehlich in #1759
- Add support to read dcf file from res/raw by @dipenpradhan in #1778
- Strip whitespace from Figma API key when read from .config file by @timothyfroehlich in #1779
- Fix the tap callback for squoosh component instance by @yiqunw700 in #1777
- Add Gradle init script to allow users of DesignCompose to integrate t… by @timothyfroehlich in #1780
- Fix: Trim whitespace from Figma token when read from file by @timothyfroehlich in #1783
- Update DesignCompose version to v0.33 by @timothyfroehlich in #1784
- Fix #1329: Update taffy to 0.6.1 by @iamralpht in #1330
- Remember user's action to break strings into different translations by @yiqunw700 in #1694
- Add new Cargo fetch tests and remove old mocked pseudo-test by @timothyfroehlich in #1776
- Convert the positioning enums and LayoutView to Proto by @timothyfroehlich in #1774
- Read min/max from figma by @yiqunw700 in #1679
- Fixes #1788: Support the open link interaction in squoosh by @rylin8 in #1789
- Fix mouse out registering a click in squoosh by @rylin8 in #1794
- Refactor: Move meter data to definition package by @timothyfroehlich in #1782
New Contributors
- @dipenpradhan made their first contribution in #1778
Full Changelog: v0.31.0...v0.32.0
v0.32.0-rc01
What's Changed
- Bump webrick from 1.8.1 to 1.8.2 in /docs in the bundler group across 1 directory by @dependabot in #1685
- Update version to 0.32 by @timothyfroehlich in #1687
- Convert Vector to Proto by @timothyfroehlich in #1688
- Fix downloaded image file name after renaming by @yiqunw700 in #1693
- Remove placeholder content support by @yiqunw700 in #1689
- Fix: Use local cargo if available by @timothyfroehlich in #1691
- Update Gradle JVM requirements to require Java 21 by @timothyfroehlich in #1696
- Update to API 35 by @timothyfroehlich in #1710
- Support "ignore auto layout" by @yiqunw700 in #1713
- Fix the non-squoosh renderer not able to close the overlay by @yiqunw700 in #1715
- Dependapool updates for Oct 4 2024 by @timothyfroehlich in #1708
- Update Gradle to 8.10.2 by @timothyfroehlich in #1718
- Add Overlay and Navigation tests for the Interaction design by @timothyfroehlich in #1711
- Make squoosh image customization work by @yiqunw700 in #1720
- Migrate Actions and Reactions to Proto by @timothyfroehlich in #1695
- Update ktfmt to 0.52 and reformat codebase to match by @timothyfroehlich in #1697
- Refactor: Update ViewShape to use proto enums by @timothyfroehlich in #1737
- Bump rexml from 3.3.7 to 3.3.9 in /docs in the bundler group across 1 directory by @dependabot in #1739
- Refactor: Migrate FontStretch and FontWeight to definition/element by @timothyfroehlich in #1738
- ProtoConv: Wrap up most of definition/elements by @timothyfroehlich in #1740
- ProtoConv: Migrate modifier/Blend by @timothyfroehlich in #1741
- ProtoConv: Migrate modifier/Shadow by @timothyfroehlich in #1742
- ProtoConv: modifier/text by @timothyfroehlich in #1743
- ProtoConv: interaction/pointer by @timothyfroehlich in #1758
- ProtoConv: modifier/grid by @timothyfroehlich in #1760
- Dependapool for 10-29-24 by @timothyfroehlich in #1759
- Add support to read dcf file from res/raw by @dipenpradhan in #1778
- Strip whitespace from Figma API key when read from .config file by @timothyfroehlich in #1779
- Fix the tap callback for squoosh component instance by @yiqunw700 in #1777
New Contributors
- @dipenpradhan made their first contribution in #1778
Full Changelog: v0.31.0...v0.32.0-rc01
v0.31.0
New Features
- Animation: Enjoy smoother animations as text and vector sizes now scale dynamically during transitions, enhancing visual appeal and user experience. [#1680, #1641]
- Image Export: Easily export images from Figma designs in various formats, including PNG, JPG, and GIF, streamlining your design workflow. [#1593]
Improvements
- Localization: The image cache now includes locale information, ensuring that images update correctly when the app language changes. [#1678, #1676]
- Animation: Individual animation timelines are now supported, allowing for more precise control over animation sequences. [#1580, #1567]
- User Interface: A new icon button is added to help break strings into two translations, improving text management in the UI. [#1557]
Fixes
- Fix: Resolve issues with animations defined in Figma by ensuring they use the correct animation specs, enhancing consistency and performance. [#1637, #1636]
- Fix: Address crashes in component replacement with AndroidView, ensuring a smoother experience when updating .dcf files. [#1604, #1603]
- Fix: Correct the bitmap cache key for drawable lookups, ensuring images load correctly when changing languages. [#1678, #1676]
v0.31.0-rc01
What's Changed
- Add new .idea file to gitignore - emulatorDisplays by @timothyfroehlich in #1577
- Update versions to v0.31 by @timothyfroehlich in #1578
- Closes #1543: Fix component replacement animations by @rylin8 in #1552
- Allow breaking out strings into two translations by @yiqunw700 in #1557
- Fixes #1574: Use protobuf generated Size struct by @rylin8 in #1584
- Fixes #1575: Use protobuf generated Rectangle struct by @rylin8 in #1586
- Dependapool Updates for 9-3-2024 by @timothyfroehlich in #1592
- Fixes #1546: Change arc rotations to align with node rotations by @rylin8 in #1585
- Modify the fetch tool to load the Figma token from command line, env var and .config file, in that order. by @timothyfroehlich in #1594
- Fixes #1569: Use protobuf generated Color struct by @rylin8 in #1595
- Fixes #1570: Convert NumOrVar, ColorOrVar to use protobuf generated structs by @rylin8 in #1596
- Support individual animation timelines by @rylin8 in #1580
- Fix crash in replacement component with AndroidView by @rylin8 in #1604
- Update localization plugin documentation by @yiqunw700 in #1602
- Refactor Github Workflow Build Tool Setup by @timothyfroehlich in #1612
- Migrate variables to use protobuf generated code. by @rylin8 in #1599
- Add plugin to export images by @yiqunw700 in #1593
- Look up image res for images with the shared plugin data by @yiqunw700 in #1600
- Dependapool Updates for 9-13-24 by @timothyfroehlich in #1625
- Create a lru bitmap cache for loading resource drawables by @yiqunw700 in #1624
- Have Android Studio stop collecting imports into a wildcard. by @timothyfroehlich in #1608
- Issue a warning when parsing reactions with an empty action by @rylin8 in #1629
- Improve DCF Fetching, Update Doc version to 22 by @timothyfroehlich in #1611
- Update the useLocalStringRes to useLocalRes by @yiqunw700 in #1628
- Support explicit variable modes set in Figma with Squoosh by @rylin8 in #1632
- Add checkboxes to select some of the images to download by @yiqunw700 in #1633
- Support shadow colors using Figma variables by @rylin8 in #1626
- Fix animations from Figma by @rylin8 in #1637
- Update protoc to 4.28.2 by @timothyfroehlich in #1639
- Fix regression which caused the test tasks to only run Fetchable tests. by @timothyfroehlich in #1634
- Bump google-protobuf from 4.28.1 to 4.28.2 in /docs in the bundler group across 1 directory by @dependabot in #1638
- Update all Gradle projects to Gradle 8.10.1 by @timothyfroehlich in #1644
- Convert Dimension and DimensionRect to Proto by @timothyfroehlich in #1598
- Update Github Gradle Action to v4.1 by @timothyfroehlich in #1646
- Dependapool Updates for 9/23/24 by @timothyfroehlich in #1662
- Add locale info to the image cache key by @yiqunw700 in #1678
- Update Reference apps to AGP 8.4.2. by @timothyfroehlich in #1645
- Update to Compose 1.7.2 by @timothyfroehlich in #1660
- Updated screenshots by @rylin8 in #1681
- Protobuf conversion: Use proto generated Path type by @rylin8 in #1682
- Add support for animating text and vector sizes by scaling by @rylin8 in #1680
- Remove euclid dependency from dc_bundle by @yiqunw700 in #1661
- Move Stroke, Background to proto generated files by @rylin8 in #1684
- Fix item spacing of list replacement content in squoosh by @rylin8 in #1686
Full Changelog: v0.30.0...v0.31.0-rc01
v0.30.0
What's Changed
- Migrate the simple legacy element types to dc_bundle by @timothyfroehlich in #1293
- Update version for v0.30.x by @timothyfroehlich in #1382
- Continue migrating
figma_import
types todc_bundle
by @timothyfroehlich in #1349 - Closes #1375: Migrate Variables from figma_import to dc_bundle by @rylin8 in #1377
- Have all uses of
figma_schema
types qualify their module by @timothyfroehlich in #1383 - Add simple text stroke support by @yiqunw700 in #1379
- Dependabot updates for Jul 22 2024 by @timothyfroehlich in #1402
- Create a squoosh toggle for validation app by @yiqunw700 in #1385
- Migrate Transforms and ImageKey to dc_bundle by @timothyfroehlich in #1408
- Move structures from toolkit_font_style to dc_bundle by @yiqunw700 in #1409
- Migrate OverflowDirection, StrokeCap to dc_bundle by @rylin8 in #1411
- Migrate the shadow modifiers to dc_bundle by @timothyfroehlich in #1410
- Migrate PointerEvents to dc_bundle by @rylin8 in #1413
- Bump rexml from 3.2.8 to 3.3.2 in /docs in the bundler group across 1 directory by @dependabot in #1404
- Migrate Background to dc_bundle by @timothyfroehlich in #1414
- Move GridSpan and GridLayoutType to dc_bundle by @timothyfroehlich in #1412
- Run
cargo fix
, cleaned up some unused dependencies by @timothyfroehlich in #1416 - Copy FigmaColor to dc_bundle as FloatColor by @yiqunw700 in #1415
- Move Stroke to the dc_bundle crate by @timothyfroehlich in #1417
- Moving binaries to
tools
directory by @oreflow in #1422 - [StepSecurity] Apply security best practices by @step-security-bot in #1423
- Migrate RenderMethod to dc_bundle by @rylin8 in #1420
- Update crates to use package settings from workspace, set version to 0.30.0 by @timothyfroehlich in #1418
- Closes #1380: Add documentation for custom animations by @rylin8 in #1424
- Closes #1369: Support progress bars that move along a vector path by @rylin8 in #1405
- Replace full protobuf implementation with protobuf-lite by @timothyfroehlich in #1425
- Dependapool updates for Jul 26 by @timothyfroehlich in #1440
- Move reaction_schema to dc_bundle by @yiqunw700 in #1421
- Update the localization plugin documentation since we published it by @yiqunw700 in #1442
- Add additional
.idea
files to gitignore by @timothyfroehlich in #1447 - Migrate vector_schema structs to dc_bundle by @rylin8 in #1443
- Migrate the Meter Structs to dc_bundle by @timothyfroehlich in #1458
- Allow explicitly excluding a node from localization by @yiqunw700 in #1444
- Add a group option which allows to use different string resource name for nodes with same text by @yiqunw700 in #1445
- Localize the top level components found in the keywords file only by @yiqunw700 in #1465
- Closes #1463: Support opacity animations by @rylin8 in #1466
- Closes #1470: Fix bug where renamed component instances don't animate by @rylin8 in #1471
- Making figma_import tools arguments public by @oreflow in #1468
- Bump rexml from 3.3.2 to 3.3.3 in /docs in the bundler group across 1 directory by @dependabot in #1467
- Remove Rust/Cargo from Dependabot by @timothyfroehlich in #1480
- Closes #1437: Support Round and Square stroke caps for vector progress bars by @rylin8 in #1438
- Dependapool merge Aug-5 by @timothyfroehlich in #1495
- Add support for url in text in DesignText by @yiqunw700 in #1494
- Migrate remaining basic types to dc_bundle by @timothyfroehlich in #1459
- Update script to fetch test dcf files by @rylin8 in #1500
- Replace the FontStyle and FontFeature Rust types with the Protobuf implementations by @timothyfroehlich in #1403
- Closes #1493: Support progress bar and marker constraints by @rylin8 in #1496
- Replace lecacy TextDecoration with the proto message by @yiqunw700 in #1506
- Closes #1510: Support DesignDocOverride in squoosh by @rylin8 in #1511
- Create Hyperlink proto message and replace legacy Hyperlink by @yiqunw700 in #1507
- Closes #1501: Support TapCallback and key injection in squoosh by @rylin8 in #1502
- Closes #1512: Fix gradient rendering on transformed nodes in squoosh by @rylin8 in #1515
- Update to ndk 27.0.12077973 by @timothyfroehlich in #1535
- Migrate Text, Node and View Styles by @timothyfroehlich in #1519
- Migrate ViewShape/Style/Data and View to dc_bundle by @timothyfroehlich in #1521
- Fix #1503: ensure child composables are drawn, by using Layout ID rather than SquooshResolvedNode identity. by @iamralpht in #1504
- Update to Gradle 8.10 and set build Jvm to 17 by @timothyfroehlich in #1517
- Towards #1215: Improved nested layout in Squoosh, by bridging Rust and Compose layout. by @iamralpht in #1439
- Fix the string resource mismatch by @yiqunw700 in #1513
- Dependabot updates for Aug 19 by @timothyfroehlich in #1538
- Closes #1516: Fix stroke brush size by @rylin8 in #1548
- Closes #1539: Fix animations when there is a component replacement by @rylin8 in #1537
- Migrate FigmaDocInfo and EmbeddedImageMap by @timothyfroehlich in #1540
- Fix the squoosh for TextElide rendering by @yiqunw700 in #1407
- Closes #1550: Support animation delays by @rylin8 in #1551
- Bump rexml from 3.3.5 to 3.3.6 in /docs in the bundler group across 1 directory by @dependabot in #1553
- Migrate the DesignComposeDefinition to dc_bundle by @timothyfroehlich in #1542
- Upgrade androidx.media3 to 1.4.1 by @timothyfroehlich in #1566
- Improve performance by caching text layouts and computed paths. by @iamralpht in #1522
- Fix crash in replacement component with AndroidView by @timothyfroehlich in #1606
- Cherry-pick Gradle actions fix by @timothyfroehlich in #1622
New Contributors
Full Changelog: v0.29.0...v0.30.0
v0.30.0-rc02
What's Changed
- Fix crash in replacement component with AndroidView by @timothyfroehlich in #1606
Full Changelog: v0.30.0-rc01...v0.30.0-rc02
v0.30.0-rc01
What's Changed
- Migrate the simple legacy element types to dc_bundle by @timothyfroehlich in #1293
- Update version for v0.30.x by @timothyfroehlich in #1382
- Continue migrating
figma_import
types todc_bundle
by @timothyfroehlich in #1349 - Closes #1375: Migrate Variables from figma_import to dc_bundle by @rylin8 in #1377
- Have all uses of
figma_schema
types qualify their module by @timothyfroehlich in #1383 - Add simple text stroke support by @yiqunw700 in #1379
- Dependabot updates for Jul 22 2024 by @timothyfroehlich in #1402
- Create a squoosh toggle for validation app by @yiqunw700 in #1385
- Migrate Transforms and ImageKey to dc_bundle by @timothyfroehlich in #1408
- Move structures from toolkit_font_style to dc_bundle by @yiqunw700 in #1409
- Migrate OverflowDirection, StrokeCap to dc_bundle by @rylin8 in #1411
- Migrate the shadow modifiers to dc_bundle by @timothyfroehlich in #1410
- Migrate PointerEvents to dc_bundle by @rylin8 in #1413
- Bump rexml from 3.2.8 to 3.3.2 in /docs in the bundler group across 1 directory by @dependabot in #1404
- Migrate Background to dc_bundle by @timothyfroehlich in #1414
- Move GridSpan and GridLayoutType to dc_bundle by @timothyfroehlich in #1412
- Run
cargo fix
, cleaned up some unused dependencies by @timothyfroehlich in #1416 - Copy FigmaColor to dc_bundle as FloatColor by @yiqunw700 in #1415
- Move Stroke to the dc_bundle crate by @timothyfroehlich in #1417
- Moving binaries to
tools
directory by @oreflow in #1422 - [StepSecurity] Apply security best practices by @step-security-bot in #1423
- Migrate RenderMethod to dc_bundle by @rylin8 in #1420
- Update crates to use package settings from workspace, set version to 0.30.0 by @timothyfroehlich in #1418
- Closes #1380: Add documentation for custom animations by @rylin8 in #1424
- Closes #1369: Support progress bars that move along a vector path by @rylin8 in #1405
- Replace full protobuf implementation with protobuf-lite by @timothyfroehlich in #1425
- Dependapool updates for Jul 26 by @timothyfroehlich in #1440
- Move reaction_schema to dc_bundle by @yiqunw700 in #1421
- Update the localization plugin documentation since we published it by @yiqunw700 in #1442
- Add additional
.idea
files to gitignore by @timothyfroehlich in #1447 - Migrate vector_schema structs to dc_bundle by @rylin8 in #1443
- Migrate the Meter Structs to dc_bundle by @timothyfroehlich in #1458
- Allow explicitly excluding a node from localization by @yiqunw700 in #1444
- Add a group option which allows to use different string resource name for nodes with same text by @yiqunw700 in #1445
- Localize the top level components found in the keywords file only by @yiqunw700 in #1465
- Closes #1463: Support opacity animations by @rylin8 in #1466
- Closes #1470: Fix bug where renamed component instances don't animate by @rylin8 in #1471
- Making figma_import tools arguments public by @oreflow in #1468
- Bump rexml from 3.3.2 to 3.3.3 in /docs in the bundler group across 1 directory by @dependabot in #1467
- Remove Rust/Cargo from Dependabot by @timothyfroehlich in #1480
- Closes #1437: Support Round and Square stroke caps for vector progress bars by @rylin8 in #1438
- Dependapool merge Aug-5 by @timothyfroehlich in #1495
- Add support for url in text in DesignText by @yiqunw700 in #1494
- Migrate remaining basic types to dc_bundle by @timothyfroehlich in #1459
- Update script to fetch test dcf files by @rylin8 in #1500
- Replace the FontStyle and FontFeature Rust types with the Protobuf implementations by @timothyfroehlich in #1403
- Closes #1493: Support progress bar and marker constraints by @rylin8 in #1496
- Replace lecacy TextDecoration with the proto message by @yiqunw700 in #1506
- Closes #1510: Support DesignDocOverride in squoosh by @rylin8 in #1511
- Create Hyperlink proto message and replace legacy Hyperlink by @yiqunw700 in #1507
- Closes #1501: Support TapCallback and key injection in squoosh by @rylin8 in #1502
- Closes #1512: Fix gradient rendering on transformed nodes in squoosh by @rylin8 in #1515
- Update to ndk 27.0.12077973 by @timothyfroehlich in #1535
- Migrate Text, Node and View Styles by @timothyfroehlich in #1519
- Migrate ViewShape/Style/Data and View to dc_bundle by @timothyfroehlich in #1521
- Fix #1503: ensure child composables are drawn, by using Layout ID rather than SquooshResolvedNode identity. by @iamralpht in #1504
- Update to Gradle 8.10 and set build Jvm to 17 by @timothyfroehlich in #1517
- Towards #1215: Improved nested layout in Squoosh, by bridging Rust and Compose layout. by @iamralpht in #1439
- Fix the string resource mismatch by @yiqunw700 in #1513
- Dependabot updates for Aug 19 by @timothyfroehlich in #1538
- Closes #1516: Fix stroke brush size by @rylin8 in #1548
- Closes #1539: Fix animations when there is a component replacement by @rylin8 in #1537
- Migrate FigmaDocInfo and EmbeddedImageMap by @timothyfroehlich in #1540
- Fix the squoosh for TextElide rendering by @yiqunw700 in #1407
- Closes #1550: Support animation delays by @rylin8 in #1551
- Bump rexml from 3.3.5 to 3.3.6 in /docs in the bundler group across 1 directory by @dependabot in #1553
- Migrate the DesignComposeDefinition to dc_bundle by @timothyfroehlich in #1542
- Upgrade androidx.media3 to 1.4.1 by @timothyfroehlich in #1566
- Improve performance by caching text layouts and computed paths. by @iamralpht in #1522
New Contributors
Full Changelog: v0.29.1...v0.30.0-rc01
v0.29.1
DesignCompose 0.29.1 Release Notes
DesignCompose 0.29.1 is a maintenance release that changes the protobuf dependency to protobuf-lite
(#1441).
Please see DesignCompose 0.29.0 Release Notes for new features and fixes in 0.29.0.
Full Changelog: v0.29.0...v0.29.1
v0.29.0
DesignCompose 0.29 Release Notes
DesignCompose 0.29 makes various performance and ergonomic improvements, and introduces several important new features, including Localization, Letter Spacing & Text Decoration, and Rotation Animations (in the Squoosh Renderer Preview). Behind the scenes, the migration to a stable DCF format using protobuf continues, and many dependencies have been updated to ensure that DesignCompose is secure.
API Changes
Use State<T>
instead of @Composable() -> T
Using a State<T>
can have performance benefits because reading the value out of a State<T>
will only cause the closest @Composable
function in the call stack to be recomposed. In this release:
- Visibility can now be customized using
State<Boolean>
- Text can now be customized using
State<String>
instead of@Composable() -> String
- Meter (dial, gauge, progress bar) can now be customized using
MeterState
(as an alias toFloatState
, holding a percentage value between 0 and 100) instead of@Composable() -> Meter
The following example illustrates how to use a State<Boolean>
as the visibility customization type and a State<String>
to replace text in a design element:
@DesignDoc(id = "<your figma doc id>")
interface HelloWorld {
@DesignComponent(node = "#MainFrame")
fun MainFrame(
@Design(node = "#name") showText: State<Boolean>,
@Design(node = "#name") name: State<String>,
)
}
val showText = remember { mutableStateOf(true) }
val name = remember { mutableStateOf("World")}
val count = remember { mutableIntStateOf(0) }
LaunchedEffect(Unit) {
while (true) {
delay(1000)
showText.value = !showText.value
count.intValue += 1
name.value = "World ${count.intValue}"
}
}
HelloWorldDoc.MainFrame(showText = showText, name = name)
Because using State
is more universal than using a Composable function, we have removed the previous @Composable () -> String
customization type.
Localization Support (Preview)
We’ve added initial support for localization in DesignCompose, via a new Figma plugin which works with Android strings.xml
resources. Check out our instructions to give it a try:
The Localization plugin extracts strings from a Figma design, and assigns a string resource name for each text node so that DesignCompose can load the appropriate string resource at runtime. You can also use the plugin to exclude particular nodes from the translation process, and upload an existing strings.xml
file when creating additional designs for an app. Finally, you can use the plugin to change string resource names, and give string resources description and character limits as hints for the translator.
Any feedback would be greatly appreciated – please file tickets!
Letter Spacing and Text Decoration
Letter spacing, underline, and strikethrough text decorations are now supported.
Squoosh Renderer Preview
Variant Custom Animation API
Custom animations can now be programmatically specified in the DesignDocSetting()
function that enables the squoosh animation code path. Populate the new customVariantTransition
parameter with a function that takes a VariantTransitionContext
and returns an AnimationTransition
interface. The context provides some data on variant that is changing, and the AnimationTransition
needs a function animationSpec()
that returns AnimationSpec<Float>
. The SmartAnimationTransition
is the only supported transition at this time. The easiest way to use this is to use a compose function such as androidx.compose.animation.core.tween
.
Here is an example:
DesignDocSettings(
useSquoosh = true,
customVariantTransition = { context ->
if (context.fromComponentSet("MyComponentName")) {
SmartAnimateTransition(
tween(
durationMillis = (2f * 1000.0).roundToInt(),
easing = CubicBezierEasing(0.37f, 0f, 0.63f, 1f)
)
)
} else {
val mass = 1.0f
val stiffness = 20.0f
val critical = sqrt(4.0f * stiffness * mass)
val damping = 30.0f
SmartAnimateTransition(
spring(dampingRatio = damping / critical, stiffness = stiffness)
)
}
}
)
We’re still working on the best way to identify the elements that are being animated. We added functions in VariantTransitionContext that use the node or component name, but this may change in the future.
Rotation Animations
Variants with rotated nodes will now perform rotational animations when switching between them.
Token Support
DesignCompose 0.28 added support for Design Tokens, mapped to Figma Variables (check out our docs!). Fetching variables from Figma requires an Enterprise plan, which meant that DesignCompose users on personal plans were unable to use DesignCompose. 0.29 changes this behavior so that users on non-Organization plans can continue to use DesignCompose, but without the variable to token mapping feature.
v0.29.0-rc01
What's Changed
- Fix #1052: rewrite squoosh animation tree building to not mutate trees. by @iamralpht in #1053
- Add serde serialization traits to all protobuf messages by @timothyfroehlich in #1240
- Closes #1243: Animations keep running after they finish by @rylin8 in #1244
- Closes #1245: Squoosh crashes on startup with no .dcf file by @rylin8 in #1246
- Create the dc_bundle crate by @timothyfroehlich in #1247
- Towards #1213: improve component replacement implementation. by @iamralpht in #1249
- Fixes #1253: Rename protobuf "design" to "definition" by @timothyfroehlich in #1262
- Fixes Collect the View related protobuf messages into a definition/view package #1256 by @timothyfroehlich in #1261
- Fixes #1250: Move design/element/text to the modifier package. by @timothyfroehlich in #1258
- Rename Serialized Design Doc to DesignCompose Definition by @timothyfroehlich in #1260
- Set DesignCompose's next version to 0.29 by @timothyfroehlich in #1283
- Change proto base package name to just "designcompose" by @timothyfroehlich in #1280
- Migrate the styles from layout to dc_bundle. by @timothyfroehlich in #1248
- Fixes #1251: Move Figma/Live Update related messages to a proto live_update package by @timothyfroehlich in #1259
- Migrate FlexWrap to new proto message by @timothyfroehlich in #1210
- Fix Protoc compiler CI failures by @timothyfroehlich in #1289
- Add plugin support for localization by @yiqunw700 in #1171
- Add description and charlimit support in the localization plugin by @yiqunw700 in #1281
- Closes #1139: Add support for a customizations that use a State by @rylin8 in #1298
- Closes #917: Support rotations in squoosh animations by @rylin8 in #1263
- Closes #1316: Add documentation for State customization by @rylin8 in #1319
- Migrate the legacy layout types to dc_bundle by @timothyfroehlich in #1291
- Fixes #1301: Replace customizations functions with State<> by @yiqunw700 in #1324
- Combine Dependabot updates per package-ecosystem by @timothyfroehlich in #1332
- Dependabot: Clean up unnecessary
registries
configuration by @timothyfroehlich in #1333 - Change Dependabot to target the "dependapool" by @timothyfroehlich in #1334
- Fixes 1284: Move DebugNodeManager into its own file by @yiqunw700 in #1297
- Fixes #1317: Support letter spacing and text decoration by @yiqunw700 in #1345
- Have Dependapool track screenshots by @timothyfroehlich in #1367
- Read json customization to exclude text customizations by @yiqunw700 in #1320
- Reduce the size of the sdk-build Action by @timothyfroehlich in #1374
- Fixes #1296: Don't fail live update when user has no access to variables by @yiqunw700 in #1352
- Dependabot Updates 7-16-24 by @timothyfroehlich in #1347
- Closes #1321: Support custom variant animations in code by @rylin8 in #1322
- Fixes #1372: Add localization plugin documentation by @yiqunw700 in #1376
- Fix the documentation image path by @yiqunw700 in #1381
Full Changelog: v0.28.0...v0.29.0-rc01