tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 31a11d9151061aa208c4a5a8d306da761c0d1591
parent f3f4d17b08598019ad8c7e46920547528a9660d5
Author: Gabriel Luong <gabriel.luong@gmail.com>
Date:   Tue,  2 Dec 2025 07:24:55 +0000

Bug 1993368 - Part 26: Migrate ListItemTabSurface to use M3 color tokens r=android-reviewers,007

- Use the Media placeholder color for `Modifier.skeletonLoader` found in the Figma
- Card: https://www.figma.com/design/MjufE1X5fvkxZ0YneX4kRd/Android-Library--2025-?node-id=61820-4182&m=dev

Differential Revision: https://phabricator.services.mozilla.com/D274488

Diffstat:
Mmobile/android/fenix/app/src/main/java/org/mozilla/fenix/compose/ListItemTabSurface.kt | 16+++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/compose/ListItemTabSurface.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/compose/ListItemTabSurface.kt @@ -100,7 +100,7 @@ fun ListItemTabSurface( }, ) - Spacer(Modifier.width(FirefoxTheme.layout.space.static100)) + Spacer(modifier = Modifier.width(FirefoxTheme.layout.space.static100)) Column( verticalArrangement = Arrangement.SpaceBetween, @@ -120,7 +120,6 @@ private fun ListItemTabSurfacePreview() { ) { Text( text = "This can be anything", - color = FirefoxTheme.colors.textPrimary, fontSize = 22.sp, ) } @@ -137,7 +136,6 @@ private fun ListItemTabSurfaceWithCustomBackgroundPreview() { ) { Text( text = "This can be anything", - color = MaterialTheme.colorScheme.onSurface, fontSize = 14.sp, ) } @@ -151,22 +149,22 @@ private fun ListItemTabSurfaceWithCustomBackgroundPreview() { * * @param durationMillis The duration in milliseconds of the shimmer animation cycle. * Defaults to `1000`. - * @param color1 The starting color of the gradient animation. Defaults to [Color.LightGray]. - * @param color2 The ending color of the gradient animation. Defaults to [Color.White]. + * @param initialColor The starting color of the gradient animation. + * @param targetColor The ending color of the gradient animation. * * @return A [Modifier] that displays a skeleton loader effect. */ @Composable fun Modifier.skeletonLoader( durationMillis: Int = 1000, - color1: Color = Color.LightGray, - color2: Color = Color.White, + initialColor: Color = MaterialTheme.colorScheme.surfaceContainerHighest, + targetColor: Color = Color.White, ): Modifier { val transition = rememberInfiniteTransition(label = "") val color by transition.animateColor( - initialValue = color1, - targetValue = color2, + initialValue = initialColor, + targetValue = targetColor, animationSpec = infiniteRepeatable( animation = tween(durationMillis, easing = LinearEasing), repeatMode = RepeatMode.Reverse,