Setup Showkase and add some Preview. WIP

This commit is contained in:
Benoit Marty 2022-11-29 15:07:04 +01:00 committed by Benoit Marty
parent 073cd7fd03
commit 6392c57fce
21 changed files with 126 additions and 27 deletions

View file

@ -1,5 +1,7 @@
plugins {
id("io.element.android-compose")
// TODO Move to common config
id("com.google.devtools.ksp") version "1.7.20-1.0.7"
}
android {
@ -16,4 +18,7 @@ dependencies {
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.3")
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
// TODO Move to common config
ksp("com.airbnb.android:showkase-processor:1.0.0-beta14")
}

View file

@ -202,7 +202,7 @@ fun LoginContent(
@Composable
@Preview
private fun LoginContentPreview() {
fun LoginContentPreview() {
ElementXTheme(darkTheme = false) {
LoginContent(
state = LoginViewState(

View file

@ -150,7 +150,7 @@ fun ChangeServerContent(
@Composable
@Preview
private fun ChangeServerContentPreview() {
fun ChangeServerContentPreview() {
ChangeServerContent(
state = ChangeServerViewState(homeserver = "matrix.org"),
)

View file

@ -1,5 +1,7 @@
plugins {
id("io.element.android-compose")
// TODO Move to common config
id("com.google.devtools.ksp") version "1.7.20-1.0.7"
}
android {
@ -19,4 +21,7 @@ dependencies {
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.3")
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
}
// TODO Move to common config
ksp("com.airbnb.android:showkase-processor:1.0.0-beta14")
}

View file

@ -515,7 +515,7 @@ class MessagesItemGroupPositionToMessagesTimelineItemContentProvider :
@Preview(showBackground = true)
@Composable
private fun TimelineItemsPreview(
fun TimelineItemsPreview(
@PreviewParameter(MessagesTimelineItemContentProvider::class)
content: MessagesTimelineItemContent
) {

View file

@ -1,5 +1,7 @@
plugins {
id("io.element.android-compose")
// TODO Move to common config
id("com.google.devtools.ksp") version "1.7.20-1.0.7"
}
android {
@ -17,4 +19,6 @@ dependencies {
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.3")
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
// TODO Move to common config
ksp("com.airbnb.android:showkase-processor:1.0.0-beta14")
}

View file

@ -1,5 +1,7 @@
plugins {
id("io.element.android-compose")
// TODO Move to common config
id("com.google.devtools.ksp") version "1.7.20-1.0.7"
}
android {
@ -17,4 +19,6 @@ dependencies {
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.3")
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
// TODO Move to common config
ksp("com.airbnb.android:showkase-processor:1.0.0-beta14")
}

View file

@ -145,7 +145,7 @@ private fun LazyListState.isScrolled(): Boolean {
@Preview
@Composable
private fun PreviewableRoomListContent() {
fun PreviewableRoomListContent() {
ElementXTheme(darkTheme = false) {
RoomListContent(
roomSummaries = stubbedRoomSummaries(),
@ -162,7 +162,7 @@ private fun PreviewableRoomListContent() {
@Preview
@Composable
private fun PreviewableDarkRoomListContent() {
fun PreviewableDarkRoomListContent() {
ElementXTheme(darkTheme = true) {
RoomListContent(
roomSummaries = stubbedRoomSummaries(),