Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
e0d0892
Update AS Canary version & added download link
JetpackDuba Dec 4, 2020
d15fe93
[Jetnews] Update to snapshot 7024175
JolandaVerhoef Dec 10, 2020
119df1d
Updates Crane to 7001724 snapshot
Dec 11, 2020
cf7173a
Removes unused import
Dec 11, 2020
14f883f
[Crane] Updates to 7024175 snapshot
Dec 11, 2020
b6abae4
[Jetnews] Update to snapshot 7030654
JolandaVerhoef Dec 14, 2020
741b5ad
[Jetnews] Apply spotless fixes
JolandaVerhoef Dec 14, 2020
3d0b3bc
[Jetcaster] Upgrade to alpha09 snapshot
yrezgui Dec 14, 2020
17c6687
[Jetnews] Fix swipe to refresh using nested scrolling
JolandaVerhoef Dec 15, 2020
882e0b4
[Crane] Update to snapshot 7033025
JolandaVerhoef Dec 15, 2020
9325b2b
[Jetnews] Upgrade to snapshot 7033025
JolandaVerhoef Dec 15, 2020
77c7e37
[Crane] Spotless fixes
JolandaVerhoef Dec 15, 2020
8faa6b7
[Jetnews] Explain workaround for swipe to refresh
JolandaVerhoef Dec 15, 2020
fd80518
[Jetcaster] Update to 7033025 snapshot
yrezgui Dec 15, 2020
485b9a3
[Jetsnack] Update to snapshot 7033025.
nickbutcher Dec 15, 2020
064ce45
[Jetcaster] Apply Spotless
yrezgui Dec 15, 2020
2c91ab2
[Jetchat] Updates to 7033025
JoseAlcerreca Dec 14, 2020
357372c
[Crane] Update dependencies
JolandaVerhoef Dec 15, 2020
244576b
[Jetchat] Adds nav bar padding to FAB
JoseAlcerreca Dec 15, 2020
57931f9
Merge pull request #323 from android/nb/js_alpha09
nickbutcher Dec 15, 2020
1795edb
[Owl] Update to snapshot 7033025.
nickbutcher Dec 15, 2020
4963947
Removed AS Version from README.md
JetpackDuba Dec 15, 2020
eedf36a
Merge branch 'dev_alpha09' into patch-1
nickbutcher Dec 15, 2020
eb26568
Merge pull request #312 from aeab13/patch-1
nickbutcher Dec 15, 2020
e9086d7
Merge branch 'dev_alpha09' into jetcaster_alpha09
yrezgui Dec 15, 2020
6fbc02a
[Jetcaster] Use trailing lambda
yrezgui Dec 15, 2020
3278466
[Crane] Fix tests
JolandaVerhoef Dec 16, 2020
3d1065c
Merge branch 'dev_alpha09' into jv/js_alpha09
JolandaVerhoef Dec 16, 2020
c619d03
[Jetchat] Test cleanup
JoseAlcerreca Dec 16, 2020
52c1990
Merge branch 'dev_alpha09' into mv/crane_alpha09
JolandaVerhoef Dec 16, 2020
67229f1
[Jetsurvey] Updating to 7033025 snapshot
florina-muntenescu Dec 16, 2020
0b9d1a2
Merge pull request #322 from yrezgui/jetcaster_alpha09
yrezgui Dec 16, 2020
70c88fd
Merge branch 'dev_alpha09' into jetchat_alpha09
JoseAlcerreca Dec 16, 2020
ba5c2fa
Merge branch 'dev_alpha09' into jv/js_alpha09
JolandaVerhoef Dec 16, 2020
c57d56f
Merge branch 'dev_alpha09' into mv/crane_alpha09
JolandaVerhoef Dec 16, 2020
f91fb37
Merge pull request #324 from JoseAlcerreca/jetchat_alpha09
JoseAlcerreca Dec 16, 2020
0ef7f45
[Jetchat] Enables --android flag in ktlint
JoseAlcerreca Dec 16, 2020
c798188
Merge branch 'dev_alpha09' into mv/crane_alpha09
JolandaVerhoef Dec 16, 2020
2e800d7
Merge pull request #316 from android/mv/crane_alpha09
JolandaVerhoef Dec 16, 2020
73d3f51
Merge branch 'dev_alpha09' into jv/js_alpha09
JolandaVerhoef Dec 16, 2020
6c66083
Merge pull request #319 from android/jv/js_alpha09
JolandaVerhoef Dec 16, 2020
8574ab5
Merge branch 'dev_alpha09' into nb/owl_alpha09
JolandaVerhoef Dec 16, 2020
4becf15
Merge pull request #329 from JoseAlcerreca/jetchat_ktlint
JoseAlcerreca Dec 16, 2020
99034f5
Merge pull request #331 from JoseAlcerreca/rally_alpha09
JoseAlcerreca Dec 16, 2020
1991337
Merge pull request #328 from android/fm/jetsurvey_alpha09
florina-muntenescu Dec 16, 2020
a525bfc
Merge branch 'dev_alpha09' into nb/owl_alpha09
JolandaVerhoef Dec 16, 2020
a0b19f4
Merge pull request #327 from android/nb/owl_alpha09
JolandaVerhoef Dec 16, 2020
342a0b1
[All] Update to alpha09
JolandaVerhoef Dec 17, 2020
96c0c6f
[All] Remove maven reference
JolandaVerhoef Dec 17, 2020
f240e6e
Merge pull request #332 from android/jv/alpha09
JolandaVerhoef Dec 17, 2020
a5f658f
Merge branch 'main' into dev_alpha09
chrisbanes Dec 17, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ package com.example.owl.ui

import androidx.activity.ComponentActivity
import androidx.compose.runtime.Providers
import androidx.compose.ui.test.hasLabel
import androidx.compose.ui.test.hasContentDescription
import androidx.compose.ui.test.hasSubstring
import androidx.compose.ui.test.junit4.createAndroidComposeRule
import androidx.compose.ui.test.onNodeWithLabel
import androidx.compose.ui.test.onNodeWithContentDescription
import androidx.compose.ui.test.onNodeWithSubstring
import androidx.compose.ui.test.performClick
import androidx.test.platform.app.InstrumentationRegistry
Expand Down Expand Up @@ -72,7 +72,7 @@ class NavigationTest {
startActivity()
// The first screen should be the onboarding screen.
// Assert that the FAB label for the onboarding screen exists:
composeTestRule.onNodeWithLabel(getOnboardingFabLabel()).assertExists()
composeTestRule.onNodeWithContentDescription(getOnboardingFabLabel()).assertExists()
}

@Test
Expand All @@ -82,7 +82,7 @@ class NavigationTest {

// Navigate to the next screen by clicking on the FAB
val fabLabel = getOnboardingFabLabel()
composeTestRule.onNodeWithLabel(fabLabel).performClick()
composeTestRule.onNodeWithContentDescription(fabLabel).performClick()

// The first course should be shown
composeTestRule.onNodeWithSubstring(courses.first().name).assertExists()
Expand All @@ -95,7 +95,7 @@ class NavigationTest {

// Navigate to the first course
composeTestRule.onNode(
hasLabel(getFeaturedCourseLabel()).and(hasSubstring(courses.first().name))
hasContentDescription(getFeaturedCourseLabel()).and(hasSubstring(courses.first().name))
).performClick()

// Assert navigated to the course details
Expand Down
27 changes: 14 additions & 13 deletions Owl/app/src/main/java/com/example/owl/ui/course/CourseDetails.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.preferredHeight
import androidx.compose.foundation.layout.preferredSize
import androidx.compose.foundation.lazy.LazyRowFor
import androidx.compose.foundation.lazy.LazyRow
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.AmbientContentAlpha
Expand Down Expand Up @@ -298,23 +298,24 @@ private fun RelatedCourses(
vertical = 24.dp
)
)
LazyRowFor(
items = relatedCourses,
LazyRow(
contentPadding = PaddingValues(
start = 16.dp,
bottom = 32.dp,
end = FabSize + 8.dp
)
) { related ->
CourseListItem(
course = related,
onClick = { selectCourse(related.id) },
titleStyle = MaterialTheme.typography.body2,
modifier = Modifier
.padding(end = 8.dp)
.preferredSize(288.dp, 80.dp),
iconSize = 14.dp
)
) {
items(relatedCourses) { related ->
CourseListItem(
course = related,
onClick = { selectCourse(related.id) },
titleStyle = MaterialTheme.typography.body2,
modifier = Modifier
.padding(end = 8.dp)
.preferredSize(288.dp, 80.dp),
iconSize = 14.dp
)
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.Layout
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.accessibilityLabel
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
Expand Down Expand Up @@ -89,7 +89,7 @@ fun FeaturedCourse(
onClick = { selectCourse(course.id) }
)
.semantics {
accessibilityLabel = featuredString
contentDescription = featuredString
}
) {
val (image, avatar, subject, name, steps, icon) = createRefs()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import androidx.compose.ui.draw.scale
import androidx.compose.ui.layout.Layout
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.semantics.accessibilityLabel
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
Expand Down Expand Up @@ -89,7 +89,7 @@ fun Onboarding(onboardingComplete: () -> Unit) {
modifier = Modifier
.navigationBarsPadding()
.semantics {
accessibilityLabel = fabLabel
contentDescription = fabLabel
}
) {
Icon(Icons.Rounded.Explore)
Expand Down
10 changes: 5 additions & 5 deletions Owl/app/src/main/java/com/example/owl/ui/theme/Theme.kt
Original file line number Diff line number Diff line change
Expand Up @@ -148,35 +148,35 @@ object OwlTheme {
/**
* Proxy to [MaterialTheme]
*/
@Composable
val colors: Colors
@Composable
get() = MaterialTheme.colors

/**
* Proxy to [MaterialTheme]
*/
@Composable
val typography: Typography
@Composable
get() = MaterialTheme.typography

/**
* Proxy to [MaterialTheme]
*/
@Composable
val shapes: Shapes
@Composable
get() = MaterialTheme.shapes

/**
* Retrieves the current [Elevations] at the call site's position in the hierarchy.
*/
@Composable
val elevations: Elevations
@Composable
get() = AmbientElevations.current

/**
* Retrieves the current [Images] at the call site's position in the hierarchy.
*/
@Composable
val images: Images
@Composable
get() = AmbientImages.current
}
18 changes: 5 additions & 13 deletions Owl/app/src/main/java/com/example/owl/ui/utils/Scrim.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,14 @@
package com.example.owl.ui.utils

import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.drawWithCache
import androidx.compose.ui.draw.drawWithContent
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.VerticalGradient

/**
* A [Modifier] which draws a vertical gradient
*/
fun Modifier.scrim(colors: List<Color>): Modifier = drawWithCache {
// Use drawWithCache modifier to create and cache the gradient when size is known or changes.
val gradient = VerticalGradient(
colors = colors,
startY = 0f,
endY = size.height
)
onDrawWithContent {
drawContent()
drawRect(brush = gradient)
}
fun Modifier.scrim(colors: List<Color>): Modifier = drawWithContent {
drawContent()
drawRect(Brush.verticalGradient(colors))
}
2 changes: 1 addition & 1 deletion Owl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ buildscript {
}

plugins {
id 'com.diffplug.spotless' version '5.7.0'
id 'com.diffplug.spotless' version '5.8.2'
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@
package com.example.owl.buildsrc

object Versions {
const val ktlint = "0.39.0"
const val ktlint = "0.40.0"
}

object Libs {
const val androidGradlePlugin = "com.android.tools.build:gradle:7.0.0-alpha02"
const val androidGradlePlugin = "com.android.tools.build:gradle:7.0.0-alpha03"
const val junit = "junit:junit:4.13"

object Accompanist {
private const val version = "0.4.0"
private const val version = "0.4.1.compose-7033025-SNAPSHOT"
const val coil = "dev.chrisbanes.accompanist:accompanist-coil:$version"
const val insets = "dev.chrisbanes.accompanist:accompanist-insets:$version"
}

object Kotlin {
private const val version = "1.4.20"
private const val version = "1.4.21"
const val stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$version"
const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$version"
const val extensions = "org.jetbrains.kotlin:kotlin-android-extensions:$version"
Expand All @@ -45,12 +45,12 @@ object Libs {
}

object AndroidX {
const val coreKtx = "androidx.core:core-ktx:1.5.0-alpha04"
const val navigation = "androidx.navigation:navigation-compose:1.0.0-alpha03"
const val coreKtx = "androidx.core:core-ktx:1.5.0-alpha05"
const val navigation = "androidx.navigation:navigation-compose:1.0.0-SNAPSHOT"

object Compose {
const val snapshot = ""
const val version = "1.0.0-alpha08"
const val snapshot = "7033025"
const val version = "1.0.0-SNAPSHOT"

const val animation = "androidx.compose.animation:animation:$version"
const val foundation = "androidx.compose.foundation:foundation:$version"
Expand Down
2 changes: 1 addition & 1 deletion Owl/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-rc-1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists