Skip to content

Commit

Permalink
Merge pull request #2291 from HedvigInsurance/new-design/check-placeh…
Browse files Browse the repository at this point in the history
…older-shimmer

New design/check placeholder shimmer
  • Loading branch information
StylianosGakis authored Nov 15, 2024
2 parents c05c9c9 + ad95d8d commit 2fddf97
Show file tree
Hide file tree
Showing 16 changed files with 722 additions and 38 deletions.
1 change: 0 additions & 1 deletion app/design-system/design-system-hedvig/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,5 @@ dependencies {
implementation(projects.coreResources)
implementation(projects.designSystemInternals)
implementation(projects.navigationCore)
implementation(projects.placeholder)
implementation(projects.coreUiData)
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import coil.ImageLoader
import coil.compose.AsyncImage
import coil.compose.AsyncImagePainter
import coil.request.ImageRequest
import com.hedvig.android.placeholder.PlaceholderHighlight
import com.hedvig.android.placeholder.fade
import com.hedvig.android.placeholder.placeholder
import com.hedvig.android.design.system.hedvig.placeholder.PlaceholderHighlight
import com.hedvig.android.design.system.hedvig.placeholder.fade
import com.hedvig.android.design.system.hedvig.placeholder.hedvigPlaceholder

@Composable
internal fun FileContainer(
Expand Down Expand Up @@ -62,7 +62,7 @@ internal fun FileContainer(
},
modifier = modifier
.height(109.dp)
.placeholder(visible = loadedImageIntrinsicSize.value == null, highlight = PlaceholderHighlight.fade())
.hedvigPlaceholder(visible = loadedImageIntrinsicSize.value == null, highlight = PlaceholderHighlight.fade())
.clip(HedvigTheme.shapes.cornerMedium),
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ import com.hedvig.android.design.system.hedvig.HighlightLabelDefaults.HighlightS
import com.hedvig.android.design.system.hedvig.HighlightLabelDefaults.HighlightShade.MEDIUM
import com.hedvig.android.design.system.hedvig.icon.HedvigIcons
import com.hedvig.android.design.system.hedvig.icon.HelipadOutline
import com.hedvig.android.placeholder.PlaceholderHighlight
import com.hedvig.android.placeholder.placeholder
import com.hedvig.android.placeholder.shimmer
import com.hedvig.android.design.system.hedvig.placeholder.PlaceholderHighlight
import com.hedvig.android.design.system.hedvig.placeholder.hedvigPlaceholder
import com.hedvig.android.design.system.hedvig.placeholder.shimmer

@Composable
fun HedvigCard(
Expand Down Expand Up @@ -86,7 +86,7 @@ fun InsuranceCard(
painter = ColorPainter(Color.Black.copy(alpha = 0.3f)),
modifier = Modifier
.matchParentSize()
.placeholder(visible = true, highlight = PlaceholderHighlight.shimmer()),
.hedvigPlaceholder(visible = true, highlight = PlaceholderHighlight.shimmer()),
contentDescription = null,
)
} else {
Expand Down Expand Up @@ -127,14 +127,14 @@ fun InsuranceCard(
HedvigText(
topText,
color = HedvigTheme.colorScheme.textWhite,
modifier = Modifier.placeholder(visible = isLoading, highlight = PlaceholderHighlight.shimmer()),
modifier = Modifier.hedvigPlaceholder(visible = isLoading, highlight = PlaceholderHighlight.shimmer()),
)
Spacer(Modifier.height(4.dp))
HedvigTheme(darkTheme = true) {
HedvigText(
text = bottomText,
color = HedvigTheme.colorScheme.textSecondaryTranslucent,
modifier = Modifier.placeholder(visible = isLoading, highlight = PlaceholderHighlight.shimmer()),
modifier = Modifier.hedvigPlaceholder(visible = isLoading, highlight = PlaceholderHighlight.shimmer()),
)
}
}
Expand Down
Loading

0 comments on commit 2fddf97

Please sign in to comment.