mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Remove Showkase from the project.
This commit is contained in:
@@ -22,7 +22,6 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(libs.showkase)
|
||||
testCommonDependencies(libs)
|
||||
testImplementation(libs.test.roborazzi)
|
||||
testImplementation(libs.test.roborazzi.compose)
|
||||
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2025 Element Creations Ltd.
|
||||
* Copyright 2025 New Vector Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
package io.element.android.compound.showkase
|
||||
|
||||
import com.airbnb.android.showkase.annotation.ShowkaseRoot
|
||||
import com.airbnb.android.showkase.annotation.ShowkaseRootModule
|
||||
|
||||
@ShowkaseRoot
|
||||
class CompoundShowkaseRootModule : ShowkaseRootModule
|
||||
+1
-17
@@ -16,19 +16,15 @@ import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.LineHeightStyle
|
||||
import androidx.compose.ui.unit.em
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.airbnb.android.showkase.annotation.ShowkaseTypography
|
||||
import io.element.android.compound.tokens.generated.TypographyTokens
|
||||
|
||||
// 32px (Material) vs 34px, it's the closest one
|
||||
@ShowkaseTypography(name = "M3 Headline Large", group = "Compound")
|
||||
internal val compoundHeadingXlRegular = TypographyTokens.fontHeadingXlRegular
|
||||
|
||||
// both are 28px
|
||||
@ShowkaseTypography(name = "M3 Headline Medium", group = "Compound")
|
||||
internal val compoundHeadingLgRegular = TypographyTokens.fontHeadingLgRegular
|
||||
|
||||
// These are the default M3 values, but we're setting them manually so an update in M3 doesn't break our designs
|
||||
@ShowkaseTypography(name = "M3 Headline Small", group = "Compound")
|
||||
internal val defaultHeadlineSmall = TextStyle(
|
||||
fontFamily = FontFamily.Default,
|
||||
fontWeight = FontWeight.Normal,
|
||||
@@ -40,39 +36,27 @@ internal val defaultHeadlineSmall = TextStyle(
|
||||
)
|
||||
|
||||
// 22px (Material) vs 20px, it's the closest one
|
||||
@ShowkaseTypography(name = "M3 Title Large", group = "Compound")
|
||||
internal val compoundHeadingMdRegular = TypographyTokens.fontHeadingMdRegular
|
||||
|
||||
// 16px both
|
||||
@ShowkaseTypography(name = "M3 Title Medium", group = "Compound")
|
||||
internal val compoundBodyLgMedium = TypographyTokens.fontBodyLgMedium
|
||||
|
||||
// 14px both
|
||||
@ShowkaseTypography(name = "M3 Title Small", group = "Compound")
|
||||
internal val compoundBodyMdMedium = TypographyTokens.fontBodyMdMedium
|
||||
|
||||
// 16px both
|
||||
@ShowkaseTypography(name = "M3 Body Large", group = "Compound")
|
||||
internal val compoundBodyLgRegular = TypographyTokens.fontBodyLgRegular
|
||||
|
||||
// 14px both
|
||||
@ShowkaseTypography(name = "M3 Body Medium", group = "Compound")
|
||||
internal val compoundBodyMdRegular = TypographyTokens.fontBodyMdRegular
|
||||
|
||||
// 12px both
|
||||
@ShowkaseTypography(name = "M3 Body Small", group = "Compound")
|
||||
internal val compoundBodySmRegular = TypographyTokens.fontBodySmRegular
|
||||
|
||||
// 14px both, Title Small uses the same token so we have to declare it twice
|
||||
@ShowkaseTypography(name = "M3 Label Large", group = "Compound")
|
||||
internal val compoundBodyMdMedium_LabelLarge = TypographyTokens.fontBodyMdMedium
|
||||
|
||||
// 12px both
|
||||
@ShowkaseTypography(name = "M3 Label Medium", group = "Compound")
|
||||
internal val compoundBodySmMedium = TypographyTokens.fontBodySmMedium
|
||||
|
||||
// 11px both
|
||||
@ShowkaseTypography(name = "M3 Label Small", group = "Compound")
|
||||
internal val compoundBodyXsMedium = TypographyTokens.fontBodyXsMedium
|
||||
|
||||
internal val compoundTypography = Typography(
|
||||
@@ -88,7 +72,7 @@ internal val compoundTypography = Typography(
|
||||
bodyLarge = compoundBodyLgRegular,
|
||||
bodyMedium = compoundBodyMdRegular,
|
||||
bodySmall = compoundBodySmRegular,
|
||||
labelLarge = compoundBodyMdMedium_LabelLarge,
|
||||
labelLarge = compoundBodyMdMedium,
|
||||
labelMedium = compoundBodySmMedium,
|
||||
labelSmall = compoundBodyXsMedium,
|
||||
)
|
||||
|
||||
@@ -10,7 +10,6 @@ import extension.testCommonDependencies
|
||||
|
||||
plugins {
|
||||
id("io.element.android-compose-library")
|
||||
alias(libs.plugins.ksp)
|
||||
id("kotlin-parcelize")
|
||||
}
|
||||
|
||||
@@ -20,12 +19,6 @@ android {
|
||||
buildFeatures {
|
||||
buildConfig = true
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
getByName("release") {
|
||||
consumerProguardFiles("consumer-rules.keep")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -43,8 +36,5 @@ dependencies {
|
||||
implementation(projects.libraries.testtags)
|
||||
implementation(projects.libraries.uiStrings)
|
||||
|
||||
ksp(libs.showkase.processor)
|
||||
implementation(libs.showkase)
|
||||
|
||||
testCommonDependencies(libs)
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
# Showkase generates this class, and Showkase's ShowkaseBrowserActivity loads it reflectively with
|
||||
# Class.forName(...).getDeclaredConstructor().newInstance(), so its constructor must be kept too.
|
||||
-keep class io.element.android.libraries.designsystem.showkase.DesignSystemShowkaseRootModuleCodegen {
|
||||
<init>();
|
||||
}
|
||||
+2
-2
@@ -14,8 +14,8 @@ import androidx.compose.ui.platform.LocalDensity
|
||||
import androidx.compose.ui.unit.Density
|
||||
|
||||
/**
|
||||
* Showkase does not take into account the `fontScale` parameter of the Preview annotation, so alter the
|
||||
* LocalDensity in the CompositionLocalProvider.
|
||||
* Render the content at the given font scale, by altering the `LocalDensity` in the
|
||||
* CompositionLocalProvider. Useful to preview a Composable at several font scales.
|
||||
*/
|
||||
@Composable
|
||||
fun WithFontScale(fontScale: Float, content: @Composable () -> Unit) {
|
||||
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2025 Element Creations Ltd.
|
||||
* Copyright 2022-2025 New Vector Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
package io.element.android.libraries.designsystem.showkase
|
||||
|
||||
import com.airbnb.android.showkase.annotation.ShowkaseRoot
|
||||
import com.airbnb.android.showkase.annotation.ShowkaseRootModule
|
||||
|
||||
@ShowkaseRoot
|
||||
class DesignSystemShowkaseRootModule : ShowkaseRootModule
|
||||
Reference in New Issue
Block a user