From f4ab7c112522bcb278e8939a4e349699fc402b28 Mon Sep 17 00:00:00 2001 From: GerardPaligot Date: Sat, 9 Mar 2024 14:05:18 +0100 Subject: [PATCH] refactor(style): create dedicated module for markdown and permissions. --- gradle/libs.versions.toml | 4 +-- settings.gradle.kts | 2 ++ theme-m3/infos/infos-feature/build.gradle.kts | 1 + .../android/theme/m3/infos/feature/Event.kt | 6 ++--- .../networking-feature/build.gradle.kts | 1 + .../partners/partners-ui/build.gradle.kts | 1 + .../ui/partners/PartnerDetailSection.kt | 6 ++--- .../speakers/speakers-ui/build.gradle.kts | 1 + .../m3/speakers/ui/SpeakerDetailSection.kt | 6 ++--- theme-m3/style/markdown/.gitignore | 1 + theme-m3/style/markdown/build.gradle.kts | 19 ++++++++++++++ .../theme/m3/style/markdown}/MarkdownText.kt | 6 ++--- .../style/markdown}/MarkdownTextDefaults.kt | 6 ++--- .../m3/style/markdown}/MarkdownTextTokens.kt | 2 +- theme-m3/style/permissions/.gitignore | 1 + theme-m3/style/permissions/build.gradle.kts | 19 ++++++++++++++ .../FeatureThatRequiresCameraPermission.kt | 0 ...atureThatRequiresCameraPermissionDenied.kt | 0 ...reThatRequiresCameraPermissionRequested.kt | 0 theme-m3/style/theme/build.gradle.kts | 2 -- .../theme/m3/style/socials/SocialsSection.kt | 25 +++---------------- .../style/socials/SocialsSectionDefaults.kt | 8 ------ .../m3/style/socials/SocialsSectionTokens.kt | 3 --- 23 files changed, 67 insertions(+), 53 deletions(-) create mode 100644 theme-m3/style/markdown/.gitignore create mode 100644 theme-m3/style/markdown/build.gradle.kts rename theme-m3/style/{theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdowns => markdown/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdown}/MarkdownText.kt (85%) rename theme-m3/style/{theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdowns => markdown/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdown}/MarkdownTextDefaults.kt (71%) rename theme-m3/style/{theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdowns => markdown/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdown}/MarkdownTextTokens.kt (81%) create mode 100644 theme-m3/style/permissions/.gitignore create mode 100644 theme-m3/style/permissions/build.gradle.kts rename theme-m3/style/{theme => permissions}/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/permissions/FeatureThatRequiresCameraPermission.kt (100%) rename theme-m3/style/{theme => permissions}/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/permissions/FeatureThatRequiresCameraPermissionDenied.kt (100%) rename theme-m3/style/{theme => permissions}/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/permissions/FeatureThatRequiresCameraPermissionRequested.kt (100%) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 134fe50b1..c6fc150c7 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -15,7 +15,7 @@ apache-xmlgraphics-batik = "1.17" cash-sqldelight = "2.0.1" coil = "2.5.0" detekt = "1.23.4" -font-awesome = "1.0.0" +font-awesome = "1.1.0" google-accompanist = "0.32.0" google-cloud-firestore = "3.7.3" google-cloud-secretmanager = "2.3.10" @@ -79,7 +79,7 @@ compose-linter = { group = "com.slack.lint.compose", name = "compose-lint-checks detekt-gradlePlugin = { group = "io.gitlab.arturbosch.detekt", name = "detekt-gradle-plugin", version.ref = "detekt" } -font-awesome = { group = "br.com.devsrsouza.compose.icons.android", name = "font-awesome", version.ref = "font-awesome" } +font-awesome = { group = "br.com.devsrsouza.compose.icons", name = "font-awesome", version.ref = "font-awesome" } jetbrains-compose-gradlePlugin = { group = "org.jetbrains.compose", name = "compose-gradle-plugin", version.ref = "jetbrains-compose" } jetbrains-kotlin-gradlePlugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "jetbrains-kotlin" } diff --git a/settings.gradle.kts b/settings.gradle.kts index 9f6573af3..ab1397ce3 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -48,7 +48,9 @@ include(":theme-m3:event-list:event-list-feature") include(":theme-m3:event-list:event-list-di") include(":theme-m3:navigation") include(":theme-m3:style:networking") +include(":theme-m3:style:markdown") include(":theme-m3:style:partners") +include(":theme-m3:style:permissions") include(":theme-m3:style:schedules") include(":theme-m3:style:speakers") include(":theme-m3:style:theme") diff --git a/theme-m3/infos/infos-feature/build.gradle.kts b/theme-m3/infos/infos-feature/build.gradle.kts index 713449c98..193ee3973 100644 --- a/theme-m3/infos/infos-feature/build.gradle.kts +++ b/theme-m3/infos/infos-feature/build.gradle.kts @@ -12,6 +12,7 @@ dependencies { implementation(projects.shared.core) implementation(projects.themeM3.infos.infosUi) implementation(projects.themeM3.navigation) + implementation(projects.themeM3.style.permissions) implementation(projects.themeM3.style.theme) implementation(libs.koin.androidx.compose) diff --git a/theme-m3/infos/infos-feature/src/main/kotlin/org/gdglille/devfest/android/theme/m3/infos/feature/Event.kt b/theme-m3/infos/infos-feature/src/main/kotlin/org/gdglille/devfest/android/theme/m3/infos/feature/Event.kt index f16a223a2..3ea9f44ee 100644 --- a/theme-m3/infos/infos-feature/src/main/kotlin/org/gdglille/devfest/android/theme/m3/infos/feature/Event.kt +++ b/theme-m3/infos/infos-feature/src/main/kotlin/org/gdglille/devfest/android/theme/m3/infos/feature/Event.kt @@ -45,11 +45,11 @@ fun Event( title = event.eventInfo.name, pronouns = null, subtitle = event.eventInfo.date, + onLinkClicked = onLinkClicked, + modifier = Modifier.padding(horizontal = 16.dp), isLoading = isLoading, twitterUrl = event.eventInfo.twitterUrl, - linkedinUrl = event.eventInfo.linkedinUrl, - onLinkClicked = onLinkClicked, - modifier = Modifier.padding(horizontal = 16.dp) + linkedinUrl = event.eventInfo.linkedinUrl ) } event.ticket?.let { diff --git a/theme-m3/networking/networking-feature/build.gradle.kts b/theme-m3/networking/networking-feature/build.gradle.kts index 1aa0490c3..a0e707739 100644 --- a/theme-m3/networking/networking-feature/build.gradle.kts +++ b/theme-m3/networking/networking-feature/build.gradle.kts @@ -14,6 +14,7 @@ dependencies { implementation(projects.themeM3.networking.networkingUi) implementation(projects.themeM3.navigation) implementation(projects.themeM3.style.networking) + implementation(projects.themeM3.style.permissions) implementation(projects.themeM3.style.theme) implementation(libs.koin.androidx.compose) diff --git a/theme-m3/partners/partners-ui/build.gradle.kts b/theme-m3/partners/partners-ui/build.gradle.kts index 939df626c..da798f7c2 100644 --- a/theme-m3/partners/partners-ui/build.gradle.kts +++ b/theme-m3/partners/partners-ui/build.gradle.kts @@ -11,6 +11,7 @@ android { dependencies { implementation(projects.shared.uiModels) implementation(projects.themeM3.navigation) + implementation(projects.themeM3.style.markdown) implementation(projects.themeM3.style.partners) implementation(projects.themeM3.style.theme) diff --git a/theme-m3/partners/partners-ui/src/main/kotlin/org/gdglille/devfest/android/theme/m3/partners/ui/partners/PartnerDetailSection.kt b/theme-m3/partners/partners-ui/src/main/kotlin/org/gdglille/devfest/android/theme/m3/partners/ui/partners/PartnerDetailSection.kt index 4cbae5e6c..190becd2f 100644 --- a/theme-m3/partners/partners-ui/src/main/kotlin/org/gdglille/devfest/android/theme/m3/partners/ui/partners/PartnerDetailSection.kt +++ b/theme-m3/partners/partners-ui/src/main/kotlin/org/gdglille/devfest/android/theme/m3/partners/ui/partners/PartnerDetailSection.kt @@ -11,7 +11,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import org.gdglille.devfest.android.theme.m3.style.Conferences4HallTheme -import org.gdglille.devfest.android.theme.m3.style.markdowns.MarkdownText +import org.gdglille.devfest.android.theme.m3.style.markdown.MarkdownText import org.gdglille.devfest.android.theme.m3.style.partners.items.PartnerItem import org.gdglille.devfest.android.theme.m3.style.placeholder import org.gdglille.devfest.android.theme.m3.style.previews.ThemedPreviews @@ -44,12 +44,12 @@ fun PartnerDetailSectionVertical( title = partnerItemUi.name, pronouns = null, subtitle = null, + onLinkClicked = onLinkClicked, isLoading = isLoading, twitterUrl = partnerItemUi.twitterUrl, githubUrl = null, linkedinUrl = partnerItemUi.linkedinUrl, - websiteUrl = partnerItemUi.siteUrl, - onLinkClicked = onLinkClicked + websiteUrl = partnerItemUi.siteUrl ) Spacer(modifier = Modifier.height(8.dp)) MarkdownText( diff --git a/theme-m3/speakers/speakers-ui/build.gradle.kts b/theme-m3/speakers/speakers-ui/build.gradle.kts index 6553d4066..e2041ea4c 100644 --- a/theme-m3/speakers/speakers-ui/build.gradle.kts +++ b/theme-m3/speakers/speakers-ui/build.gradle.kts @@ -10,6 +10,7 @@ android { dependencies { implementation(projects.shared.uiModels) + implementation(projects.themeM3.style.markdown) implementation(projects.themeM3.style.speakers) implementation(projects.themeM3.style.theme) diff --git a/theme-m3/speakers/speakers-ui/src/main/kotlin/org/gdglille/devfest/android/theme/m3/speakers/ui/SpeakerDetailSection.kt b/theme-m3/speakers/speakers-ui/src/main/kotlin/org/gdglille/devfest/android/theme/m3/speakers/ui/SpeakerDetailSection.kt index 5433c0b7f..c6d998cb1 100644 --- a/theme-m3/speakers/speakers-ui/src/main/kotlin/org/gdglille/devfest/android/theme/m3/speakers/ui/SpeakerDetailSection.kt +++ b/theme-m3/speakers/speakers-ui/src/main/kotlin/org/gdglille/devfest/android/theme/m3/speakers/ui/SpeakerDetailSection.kt @@ -10,7 +10,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import org.gdglille.devfest.android.theme.m3.style.Conferences4HallTheme -import org.gdglille.devfest.android.theme.m3.style.markdowns.MarkdownText +import org.gdglille.devfest.android.theme.m3.style.markdown.MarkdownText import org.gdglille.devfest.android.theme.m3.style.placeholder import org.gdglille.devfest.android.theme.m3.style.previews.ThemedPreviews import org.gdglille.devfest.android.theme.m3.style.socials.SocialsSection @@ -42,13 +42,13 @@ fun SpeakerDetailSectionVertical( title = speaker.name, pronouns = speaker.pronouns, subtitle = speaker.activity, + onLinkClicked = onLinkClicked, isLoading = isLoading, twitterUrl = speaker.twitterUrl, mastodonUrl = speaker.mastodonUrl, githubUrl = speaker.githubUrl, linkedinUrl = speaker.linkedinUrl, - websiteUrl = speaker.websiteUrl, - onLinkClicked = onLinkClicked + websiteUrl = speaker.websiteUrl ) Spacer(modifier = Modifier.height(8.dp)) MarkdownText( diff --git a/theme-m3/style/markdown/.gitignore b/theme-m3/style/markdown/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/theme-m3/style/markdown/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/theme-m3/style/markdown/build.gradle.kts b/theme-m3/style/markdown/build.gradle.kts new file mode 100644 index 000000000..d20e4340e --- /dev/null +++ b/theme-m3/style/markdown/build.gradle.kts @@ -0,0 +1,19 @@ +plugins { + id("conferences4hall.android.library") + id("conferences4hall.android.library.compose") + id("conferences4hall.quality") +} + +android { + namespace = "org.gdglille.devfest.android.theme.m3.style.markdown" +} + +dependencies { + implementation(projects.themeM3.style.theme) + + implementation(compose.material3) + implementation(compose.preview) + debugImplementation(compose.uiTooling) + + implementation(libs.richtext.commonmark) +} diff --git a/theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdowns/MarkdownText.kt b/theme-m3/style/markdown/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdown/MarkdownText.kt similarity index 85% rename from theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdowns/MarkdownText.kt rename to theme-m3/style/markdown/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdown/MarkdownText.kt index 6543a23b3..cf75a30b3 100644 --- a/theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdowns/MarkdownText.kt +++ b/theme-m3/style/markdown/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdown/MarkdownText.kt @@ -1,4 +1,4 @@ -package org.gdglille.devfest.android.theme.m3.style.markdowns +package org.gdglille.devfest.android.theme.m3.style.markdown import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -15,8 +15,8 @@ import org.gdglille.devfest.android.theme.m3.style.socials.SocialsSectionDefault fun MarkdownText( text: String, modifier: Modifier = Modifier, - bodyColor: Color = SocialsSectionDefaults.bodyColor, - bodyTextStyle: TextStyle = SocialsSectionDefaults.bodyTextStyle + bodyColor: Color = MarkdownTextDefaults.bodyColor, + bodyTextStyle: TextStyle = MarkdownTextDefaults.bodyTextStyle ) { RichTextThemeIntegration( textStyle = { bodyTextStyle }, diff --git a/theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdowns/MarkdownTextDefaults.kt b/theme-m3/style/markdown/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdown/MarkdownTextDefaults.kt similarity index 71% rename from theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdowns/MarkdownTextDefaults.kt rename to theme-m3/style/markdown/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdown/MarkdownTextDefaults.kt index b143ab308..cd97308f7 100644 --- a/theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdowns/MarkdownTextDefaults.kt +++ b/theme-m3/style/markdown/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdown/MarkdownTextDefaults.kt @@ -1,4 +1,4 @@ -package org.gdglille.devfest.android.theme.m3.style.markdowns +package org.gdglille.devfest.android.theme.m3.style.markdown import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.Color @@ -10,9 +10,9 @@ import org.gdglille.devfest.android.theme.m3.style.toTextStyle object MarkdownTextDefaults { val bodyColor: Color @Composable - get() = SocialsSectionTokens.BodyColor.toColor() + get() = MarkdownTextTokens.BodyColor.toColor() val bodyTextStyle: TextStyle @Composable - get() = SocialsSectionTokens.BodyTextStyle.toTextStyle() + get() = MarkdownTextTokens.BodyTextStyle.toTextStyle() } diff --git a/theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdowns/MarkdownTextTokens.kt b/theme-m3/style/markdown/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdown/MarkdownTextTokens.kt similarity index 81% rename from theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdowns/MarkdownTextTokens.kt rename to theme-m3/style/markdown/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdown/MarkdownTextTokens.kt index 278a4aafe..33f1ee707 100644 --- a/theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdowns/MarkdownTextTokens.kt +++ b/theme-m3/style/markdown/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/markdown/MarkdownTextTokens.kt @@ -1,4 +1,4 @@ -package org.gdglille.devfest.android.theme.m3.style.markdowns +package org.gdglille.devfest.android.theme.m3.style.markdown import org.gdglille.devfest.android.theme.m3.style.ColorSchemeTokens import org.gdglille.devfest.android.theme.m3.style.TextStyleTokens diff --git a/theme-m3/style/permissions/.gitignore b/theme-m3/style/permissions/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/theme-m3/style/permissions/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/theme-m3/style/permissions/build.gradle.kts b/theme-m3/style/permissions/build.gradle.kts new file mode 100644 index 000000000..3eaeb9dc6 --- /dev/null +++ b/theme-m3/style/permissions/build.gradle.kts @@ -0,0 +1,19 @@ +plugins { + id("conferences4hall.android.library") + id("conferences4hall.android.library.compose") + id("conferences4hall.quality") +} + +android { + namespace = "org.gdglille.devfest.android.theme.m3.style.permissions" +} + +dependencies { + implementation(projects.themeM3.style.theme) + + implementation(compose.material3) + implementation(compose.preview) + debugImplementation(compose.uiTooling) + + implementation(libs.google.accompanist.permissions) +} diff --git a/theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/permissions/FeatureThatRequiresCameraPermission.kt b/theme-m3/style/permissions/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/permissions/FeatureThatRequiresCameraPermission.kt similarity index 100% rename from theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/permissions/FeatureThatRequiresCameraPermission.kt rename to theme-m3/style/permissions/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/permissions/FeatureThatRequiresCameraPermission.kt diff --git a/theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/permissions/FeatureThatRequiresCameraPermissionDenied.kt b/theme-m3/style/permissions/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/permissions/FeatureThatRequiresCameraPermissionDenied.kt similarity index 100% rename from theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/permissions/FeatureThatRequiresCameraPermissionDenied.kt rename to theme-m3/style/permissions/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/permissions/FeatureThatRequiresCameraPermissionDenied.kt diff --git a/theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/permissions/FeatureThatRequiresCameraPermissionRequested.kt b/theme-m3/style/permissions/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/permissions/FeatureThatRequiresCameraPermissionRequested.kt similarity index 100% rename from theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/permissions/FeatureThatRequiresCameraPermissionRequested.kt rename to theme-m3/style/permissions/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/permissions/FeatureThatRequiresCameraPermissionRequested.kt diff --git a/theme-m3/style/theme/build.gradle.kts b/theme-m3/style/theme/build.gradle.kts index 6ba36e4eb..d151bb374 100644 --- a/theme-m3/style/theme/build.gradle.kts +++ b/theme-m3/style/theme/build.gradle.kts @@ -14,11 +14,9 @@ dependencies { debugImplementation(compose.uiTooling) implementation(compose.materialIconsExtended) - implementation(libs.google.accompanist.permissions) implementation(libs.google.accompanist.placeholder) implementation(libs.jetbrains.kotlinx.collections) implementation(libs.font.awesome) - implementation(libs.richtext.commonmark) } diff --git a/theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/socials/SocialsSection.kt b/theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/socials/SocialsSection.kt index 5e4242cbc..7b18928be 100644 --- a/theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/socials/SocialsSection.kt +++ b/theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/socials/SocialsSection.kt @@ -13,9 +13,6 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.TextStyle import androidx.compose.ui.tooling.preview.Preview -import com.halilibo.richtext.markdown.Markdown -import com.halilibo.richtext.ui.RichText -import com.halilibo.richtext.ui.RichTextThemeIntegration import org.gdglille.devfest.android.theme.m3.style.Conferences4HallTheme import org.gdglille.devfest.android.theme.m3.style.placeholder import org.gdglille.devfest.android.theme.m3.style.toDp @@ -28,7 +25,6 @@ fun SocialsSection( subtitle: String?, onLinkClicked: (url: String) -> Unit, modifier: Modifier = Modifier, - detailed: String? = null, isLoading: Boolean = false, twitterUrl: String? = null, mastodonUrl: String? = null, @@ -38,11 +34,9 @@ fun SocialsSection( titleColor: Color = SocialsSectionDefaults.titleColor, pronounsColor: Color = SocialsSectionDefaults.pronounsColor, subTitleColor: Color = SocialsSectionDefaults.subTitleColor, - bodyColor: Color = SocialsSectionDefaults.bodyColor, titleTextStyle: TextStyle = SocialsSectionDefaults.titleTextStyle, pronounsTextStyle: TextStyle = SocialsSectionDefaults.pronounsTextStyle, - subTitleTextStyle: TextStyle = SocialsSectionDefaults.subTitleTextStyle, - bodyTextStyle: TextStyle = SocialsSectionDefaults.bodyTextStyle + subTitleTextStyle: TextStyle = SocialsSectionDefaults.subTitleTextStyle ) { Column(modifier = modifier.fillMaxWidth()) { Text( @@ -120,19 +114,6 @@ fun SocialsSection( } } } - detailed?.let { - Spacer(modifier = Modifier.height(SocialsSectionTokens.TopBodySpacing.toDp())) - RichTextThemeIntegration( - textStyle = { bodyTextStyle }, - ProvideTextStyle = null, - contentColor = { bodyColor }, - ProvideContentColor = null, - ) { - RichText(modifier = Modifier.placeholder(visible = isLoading)) { - Markdown(detailed) - } - } - } } } @@ -144,11 +125,11 @@ internal fun SocialsSectionPreview() { title = "GĂ©rard Paligot", pronouns = "Him/He", subtitle = null, + onLinkClicked = {}, twitterUrl = "", githubUrl = "", linkedinUrl = "", - websiteUrl = "", - onLinkClicked = {} + websiteUrl = "" ) } } diff --git a/theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/socials/SocialsSectionDefaults.kt b/theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/socials/SocialsSectionDefaults.kt index b7d10b0da..bc342804b 100644 --- a/theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/socials/SocialsSectionDefaults.kt +++ b/theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/socials/SocialsSectionDefaults.kt @@ -30,12 +30,4 @@ object SocialsSectionDefaults { val subTitleTextStyle: TextStyle @Composable get() = SocialsSectionTokens.SubTitleTextStyle.toTextStyle() - - val bodyColor: Color - @Composable - get() = SocialsSectionTokens.BodyColor.toColor() - - val bodyTextStyle: TextStyle - @Composable - get() = SocialsSectionTokens.BodyTextStyle.toTextStyle() } diff --git a/theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/socials/SocialsSectionTokens.kt b/theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/socials/SocialsSectionTokens.kt index e93280f64..ab40a8e4d 100644 --- a/theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/socials/SocialsSectionTokens.kt +++ b/theme-m3/style/theme/src/main/kotlin/org/gdglille/devfest/android/theme/m3/style/socials/SocialsSectionTokens.kt @@ -11,10 +11,7 @@ object SocialsSectionTokens { val SubTitleColor = ColorSchemeTokens.OnSurfaceVariant val PronounsTextStyle = TextStyleTokens.BodyMedium val PronounsColor = ColorSchemeTokens.OnSurfaceColor - val BodyTextStyle = TextStyleTokens.BodyMedium - val BodyColor = ColorSchemeTokens.OnSurfaceColor val BetweenTitleAndSubTitleSpacing = SpacingTokens.SmallSpacing val BetweenTitleAndSocialsSpacing = SpacingTokens.MediumSpacing val BetweenSocialIconsSpacing = SpacingTokens.LargeSpacing - val TopBodySpacing = SpacingTokens.MediumSpacing }