Skip to content

Commit 540158a

Browse files
authored
Feature: Play store screenshots (#24)
* Add stubs. * Added screenshots for dashboard and course exercise list. * Lecture View Screenshot. * Refactor messaging to easily allow messaging screenshots. * Quiz question screenshots. * Quiz screenshots. * More device factors for store screenshots. * Resolve further merge conflict. * Allow play store screenshots. * Cleanup. * Fix compilation error.
1 parent e84664a commit 540158a

File tree

64 files changed

+2167
-346
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+2167
-346
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package de.tum.informatics.www1.artemis.native_app.android
2+
3+
import androidx.compose.foundation.Image
4+
import androidx.compose.foundation.layout.Box
5+
import androidx.compose.foundation.layout.Column
6+
import androidx.compose.foundation.layout.Row
7+
import androidx.compose.foundation.layout.fillMaxSize
8+
import androidx.compose.material3.MaterialTheme
9+
import androidx.compose.material3.Surface
10+
import androidx.compose.material3.Text
11+
import androidx.compose.runtime.Composable
12+
import androidx.compose.ui.Alignment
13+
import androidx.compose.ui.Modifier
14+
import androidx.compose.ui.layout.FixedScale
15+
import androidx.compose.ui.res.painterResource
16+
import androidx.compose.ui.tooling.preview.Preview
17+
18+
@Composable
19+
@Preview(device = "spec:width=1024px,height=500px,dpi=440")
20+
private fun StorePreviewImage() {
21+
Surface {
22+
Box(modifier = Modifier.fillMaxSize()) {
23+
Row(
24+
modifier = Modifier.align(Alignment.Center),
25+
verticalAlignment = Alignment.CenterVertically
26+
) {
27+
Image(
28+
painter = painterResource(id = R.drawable.ic_launcher_foreground),
29+
contentDescription = null,
30+
contentScale = FixedScale(1f)
31+
)
32+
33+
Column {
34+
Text(
35+
text = "Artemis",
36+
style = MaterialTheme.typography.displaySmall
37+
)
38+
Text(
39+
text = "Interactive Learning with Individual Feedback",
40+
style = MaterialTheme.typography.labelSmall
41+
)
42+
}
43+
}
44+
}
45+
}
46+
}

build-logic/convention/src/main/kotlin/AndroidLibraryComposeConventionPlugin.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ class AndroidLibraryComposeConventionPlugin : Plugin<Project> {
88
override fun apply(target: Project) {
99
with(target) {
1010
pluginManager.apply("com.android.library")
11+
1112
val extension = extensions.getByType<LibraryExtension>()
1213
configureCompose(extension)
1314
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package de.tum.informatics.www1.artemis.native_app.core.common.test
2+
3+
interface PlayStoreScreenshotTest

core/data-test/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ android {
1414

1515
dependencies {
1616
implementation(project(":core:data"))
17+
implementation(project(":core:model"))
1718
implementation(libs.kotlinx.coroutines.android)
1819

1920
api(libs.ktor.client.core)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package de.tum.informatics.www1.artemis.native_app.core.data
2+
3+
import de.tum.informatics.www1.artemis.native_app.core.data.service.network.AccountDataService
4+
import de.tum.informatics.www1.artemis.native_app.core.model.account.Account
5+
6+
class AccountDataServiceStub(private val account: Account = Account()) : AccountDataService {
7+
override suspend fun getAccountData(
8+
serverUrl: String,
9+
bearerToken: String
10+
): NetworkResponse<Account> = NetworkResponse.Response(account)
11+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package de.tum.informatics.www1.artemis.native_app.core.data
2+
3+
import de.tum.informatics.www1.artemis.native_app.core.data.NetworkResponse
4+
import de.tum.informatics.www1.artemis.native_app.core.data.service.network.CourseService
5+
import de.tum.informatics.www1.artemis.native_app.core.model.Course
6+
import de.tum.informatics.www1.artemis.native_app.core.model.CourseWithScore
7+
8+
class CourseServiceFake(private val course: CourseWithScore) : CourseService {
9+
10+
constructor(course: Course) : this(
11+
CourseWithScore(
12+
course,
13+
CourseWithScore.TotalScores(
14+
maxPoints = 0f,
15+
reachablePoints = 0f,
16+
studentScores = CourseWithScore.TotalScores.StudentScores(
17+
absoluteScore = 0f,
18+
relativeScore = 0f,
19+
currentRelativeScore = 0f,
20+
presentationScore = 0f
21+
)
22+
)
23+
)
24+
)
25+
26+
override suspend fun getCourse(
27+
courseId: Long,
28+
serverUrl: String,
29+
authToken: String
30+
): NetworkResponse<CourseWithScore> = NetworkResponse.Response(course)
31+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package de.tum.informatics.www1.artemis.native_app.core.data
2+
3+
import de.tum.informatics.www1.artemis.native_app.core.common.ClockWithOffset
4+
import de.tum.informatics.www1.artemis.native_app.core.common.offsetBy
5+
import de.tum.informatics.www1.artemis.native_app.core.data.service.network.ServerTimeService
6+
import kotlinx.coroutines.flow.Flow
7+
import kotlinx.coroutines.flow.flowOf
8+
import kotlinx.datetime.Clock
9+
import kotlin.time.Duration
10+
11+
class ServerTimeServiceStub(
12+
private val serverClock: ClockWithOffset = Clock.System.offsetBy(Duration.ZERO)
13+
) : ServerTimeService {
14+
override fun getServerClock(authToken: String, serverUrl: String): Flow<ClockWithOffset> =
15+
flowOf(serverClock)
16+
}

core/data/src/main/kotlin/de/tum/informatics/www1/artemis/native_app/core/data/service/network/AccountDataService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ import de.tum.informatics.www1.artemis.native_app.core.model.account.Account
66
interface AccountDataService {
77

88
suspend fun getAccountData(serverUrl: String, bearerToken: String): NetworkResponse<Account>
9-
}
9+
}

core/datastore-test/build.gradle.kts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
plugins {
2+
id("artemis.android.library")
3+
id("artemis.android.flavor.library.instanceSelection")
4+
}
5+
6+
android {
7+
namespace = "de.tum.informatics.www1.artemis.native_app.datastore.test"
8+
}
9+
10+
dependencies {
11+
implementation(project(":core:datastore"))
12+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package de.tum.informatics.www1.artemis.native_app.core.datastore
2+
3+
import kotlinx.coroutines.flow.Flow
4+
import kotlinx.coroutines.flow.flowOf
5+
6+
class AccountServiceStub(
7+
override val authenticationData: Flow<AccountService.AuthenticationData> =
8+
flowOf(AccountService.AuthenticationData.LoggedIn("", "Kate Bell"))
9+
) : AccountService {
10+
override suspend fun storeAccessToken(jwt: String, rememberMe: Boolean) = Unit
11+
12+
override suspend fun logout() = Unit
13+
}

0 commit comments

Comments
 (0)