Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
da7ca9d
[Jetsnack] Add interaction to cart.
JolandaVerhoef Oct 27, 2020
be889b9
[Jetsnack] Animate snack count in cart.
JolandaVerhoef Oct 27, 2020
34ff388
[Jetsnack] Apply spotless fixes
JolandaVerhoef Oct 27, 2020
1cb1501
[Jetsnack] Fix review comments
JolandaVerhoef Oct 29, 2020
047af3e
Merge pull request #260 from android/jv/js_cart_state_flow
JolandaVerhoef Oct 29, 2020
4354d04
[Jetsurvey] Styling the questions progress indicator
florina-muntenescu Oct 28, 2020
d75e4c1
[Jetsurvey] Styling Single and Multiple choice questions
florina-muntenescu Oct 31, 2020
77e548d
[Jetsurvey] Adding question description
florina-muntenescu Oct 31, 2020
8cec984
[Jetsurvey] Setting correct border and background colors
florina-muntenescu Nov 2, 2020
13d04f3
[Jetsurvey] Make the entire Row clickable
florina-muntenescu Nov 2, 2020
b2b8816
[Jetsurvey] Adding end padding to description
florina-muntenescu Nov 4, 2020
cc48218
Merge pull request #265 from android/fm/jetsurvey_redesign2
florina-muntenescu Nov 4, 2020
2e132b5
[Jetsurvey] Update to 6953474 snapshot
florina-muntenescu Nov 6, 2020
c87772e
[Owl] Update to snapshot 6953474 & Accompanist Insets.
nickbutcher Nov 6, 2020
b88faed
[Jetsurvey] Removing ContentAlpha.high
florina-muntenescu Nov 6, 2020
5a6895e
Merge pull request #270 from android/nb/owl_alpha07
nickbutcher Nov 6, 2020
f05a667
[Jetchat] Update to snapshot 6953474
JoseAlcerreca Nov 6, 2020
3c14527
[Jetsurvey] Removing unneeded compiler args
florina-muntenescu Nov 6, 2020
308a6ca
[Jetsnack] Update to snapshot 6953474
JolandaVerhoef Nov 6, 2020
b4e0386
Some fixes
JoseAlcerreca Nov 6, 2020
a541a2d
Merge branch 'dev_alpha07' of github.com:android/compose-samples into…
JoseAlcerreca Nov 6, 2020
38877e0
[Rally] Update to snapshot 6953474
JoseAlcerreca Nov 6, 2020
4f6c460
Fixes tests
JoseAlcerreca Nov 6, 2020
d5d46ad
Fixes tests and text field in dark theme
JoseAlcerreca Nov 6, 2020
69126da
Merge pull request #269 from android/fm/jetsurvey_alpha07
florina-muntenescu Nov 6, 2020
b5ad9bf
[Jetsurvey] Take a selfie
florina-muntenescu Nov 3, 2020
b189bf6
[Jetsurvey] 2nd attempt to camera
florina-muntenescu Nov 4, 2020
1bb7948
[Jetsurvey] Saving the image in the uri
florina-muntenescu Nov 6, 2020
f5b360d
[Jetsurvey] Saving the image cleaned up
florina-muntenescu Nov 8, 2020
8c39a94
[Jetsurvey] Updating the take a photo UI
florina-muntenescu Nov 8, 2020
afde277
Update CONTRIBUTING.md
nickbutcher Nov 9, 2020
05521d4
Merge pull request #277 from android/nb/contrib
nickbutcher Nov 9, 2020
ba9954e
[Jetsurvey] Rebase issues
florina-muntenescu Nov 9, 2020
65d752a
[Jetsnack] Fix review comments
JolandaVerhoef Nov 9, 2020
c83c3cf
Merge branch 'dev_alpha07' into jv/js_alpha07
JolandaVerhoef Nov 9, 2020
44b1708
[Jetsurvey] Fixing the way the state is updated when taking a photo
florina-muntenescu Nov 9, 2020
0732eba
[Jetsurvey] Handling the photo uri creation in a different class
florina-muntenescu Nov 9, 2020
0937e24
[Jetcaster] Update to Compose alpha07 snapshot (#278)
chrisbanes Nov 9, 2020
4dcdb9b
[JetNews] bump to alpha07
yrezgui Nov 9, 2020
193caa8
[JetNews] Update imports (alpha07)
yrezgui Nov 9, 2020
b0e28ed
[JetNews] Rearrange imports (alpha07)
yrezgui Nov 9, 2020
24e7bf6
[JetNews] Update test imports (alpha07)
yrezgui Nov 9, 2020
40a4194
[Jetsnack] Update to snapshot 6961312
JolandaVerhoef Nov 10, 2020
e95b96b
[Jetsurvey] Updating to 6961312 snapshot and addressing review comments
florina-muntenescu Nov 10, 2020
b6ed842
[JetNews] Update spanshot to 6953474 (alpha07)
yrezgui Nov 10, 2020
d5cc734
Merge branch 'dev_alpha07' into jv/js_alpha07
JolandaVerhoef Nov 10, 2020
cf59158
[Jetsurvey] Adding the camera feature only for devices 29+
florina-muntenescu Nov 10, 2020
8a44a0b
Merge pull request #279 from android/fm/camera
florina-muntenescu Nov 10, 2020
d0ab6f3
[JetNews] Remove ContentAlpha.high
yrezgui Nov 10, 2020
4dc2d50
Updates to 6964664
JoseAlcerreca Nov 11, 2020
e955700
Updates snapshot to 6964664
JoseAlcerreca Nov 11, 2020
f5e0219
[Jetsnack] Update to snapshot 6964664
JolandaVerhoef Nov 11, 2020
c40635d
Merge branch 'dev_alpha07' into jv/js_alpha07
JolandaVerhoef Nov 11, 2020
01c0804
Merge branch 'dev_alpha07' into dev_alpha07
yrezgui Nov 11, 2020
6fcd168
[Jetsnack] Fix review comment
JolandaVerhoef Nov 11, 2020
7ea8d53
Merge pull request #271 from android/jv/js_alpha07
JolandaVerhoef Nov 11, 2020
9a5d45f
Merge pull request #272 from JoseAlcerreca/jetchat_alpha07
JoseAlcerreca Nov 11, 2020
cb0a46f
Merge branch 'dev_alpha07' into rally_alpha07
JoseAlcerreca Nov 11, 2020
95c442a
[Jetnews] Bring back a forgotten ContentAlpha.medium
yrezgui Nov 11, 2020
0295dce
Merge branch 'dev_alpha07' into dev_alpha07
yrezgui Nov 11, 2020
a68a925
Merge pull request #273 from JoseAlcerreca/rally_alpha07
JoseAlcerreca Nov 11, 2020
00a472b
Merge branch 'dev_alpha07' into dev_alpha07
yrezgui Nov 11, 2020
8534fc2
Merge pull request #280 from yrezgui/dev_alpha07
yrezgui Nov 11, 2020
1239fac
[Crane] Updates to snapshot 6953474 (#268)
manuelvicnt Nov 11, 2020
a5f219b
[All] Updating to Compose alpha07
florina-muntenescu Nov 11, 2020
008e4ae
[All] Updating Accompanist to 0.3.3.1
florina-muntenescu Nov 11, 2020
7701008
Merge pull request #282 from android/fm/update_alpha07
florina-muntenescu Nov 12, 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 @@ -17,7 +17,6 @@
package com.example.jetsnack.ui.components

import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.ProvideTextStyle
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.PaddingValues
Expand All @@ -29,6 +28,7 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.ButtonConstants
import androidx.compose.material.MaterialTheme
import androidx.compose.material.ProvideTextStyle
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package com.example.jetsnack.ui.components

import androidx.compose.animation.animate
import androidx.compose.foundation.ScrollableRow
import androidx.compose.foundation.Text
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.padding
Expand All @@ -30,6 +29,7 @@ import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.Icon
import androidx.compose.material.IconButton
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.rounded.FilterList
import androidx.compose.runtime.Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import androidx.compose.ui.graphics.HorizontalGradient
import androidx.compose.ui.graphics.LinearGradient
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.graphics.TileMode
import androidx.compose.ui.onSizeChanged
import androidx.compose.ui.layout.onSizeChanged
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.IntSize
import androidx.compose.ui.unit.dp
Expand All @@ -48,7 +48,7 @@ fun Modifier.horizontalGradientBackground(
endX = size.width,
colors = colors
)
onDraw {
onDrawBehind {
drawRect(brush = gradient)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package com.example.jetsnack.ui.components

import androidx.compose.runtime.Composable
import androidx.compose.ui.Layout
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.Layout

/**
* A simple grid which lays elements out vertically in evenly sized [columns].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,18 @@
package com.example.jetsnack.ui.components

import androidx.compose.animation.Crossfade
import androidx.compose.foundation.Text
import androidx.compose.foundation.layout.ChainStyle
import androidx.compose.foundation.layout.ConstraintLayout
import androidx.compose.foundation.layout.preferredWidthIn
import androidx.compose.material.AmbientEmphasisLevels
import androidx.compose.material.AmbientContentAlpha
import androidx.compose.material.ContentAlpha
import androidx.compose.material.MaterialTheme
import androidx.compose.material.ProvideEmphasis
import androidx.compose.material.Text
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.AddCircleOutline
import androidx.compose.material.icons.outlined.RemoveCircleOutline
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Providers
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
Expand All @@ -47,7 +48,7 @@ fun QuantitySelector(
ConstraintLayout(modifier = modifier) {
val (qty, minus, quantity, plus) = createRefs()
createHorizontalChain(qty, minus, quantity, plus, chainStyle = ChainStyle.Packed)
ProvideEmphasis(emphasis = AmbientEmphasisLevels.current.medium) {
Providers(AmbientContentAlpha provides ContentAlpha.medium) {
Text(
text = stringResource(R.string.quantity),
style = MaterialTheme.typography.subtitle1,
Expand All @@ -66,21 +67,19 @@ fun QuantitySelector(
linkTo(top = parent.top, bottom = parent.bottom)
}
)
ProvideEmphasis(emphasis = AmbientEmphasisLevels.current.high) {
Crossfade(
current = count,
modifier = Modifier
.constrainAs(quantity) { baseline.linkTo(qty.baseline) }
) {
Text(
text = "$it",
style = MaterialTheme.typography.subtitle2,
fontSize = 18.sp,
color = JetsnackTheme.colors.textPrimary,
textAlign = TextAlign.Center,
modifier = Modifier.preferredWidthIn(min = 24.dp)
)
}
Crossfade(
current = count,
modifier = Modifier
.constrainAs(quantity) { baseline.linkTo(qty.baseline) }
) {
Text(
text = "$it",
style = MaterialTheme.typography.subtitle2,
fontSize = 18.sp,
color = JetsnackTheme.colors.textPrimary,
textAlign = TextAlign.Center,
modifier = Modifier.preferredWidthIn(min = 24.dp)
)
}
JetsnackGradientTintedIconButton(
asset = Icons.Outlined.AddCircleOutline,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.example.jetsnack.ui.components

import androidx.compose.foundation.ScrollableRow
import androidx.compose.foundation.Text
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
Expand All @@ -38,6 +37,7 @@ import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.Icon
import androidx.compose.material.IconButton
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.ArrowForward
import androidx.compose.runtime.Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

package com.example.jetsnack.ui.components

import androidx.compose.foundation.AmbientContentColor
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Box
import androidx.compose.material.AmbientContentColor
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Providers
import androidx.compose.ui.Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

package com.example.jetsnack.ui.home

import androidx.compose.foundation.Text
import androidx.compose.foundation.layout.Column
import androidx.compose.material.Icon
import androidx.compose.material.IconButton
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.material.TopAppBar
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.ExpandMore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package com.example.jetsnack.ui.home
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.lazy.ExperimentalLazyDsl
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
Expand Down Expand Up @@ -66,7 +65,6 @@ private fun Feed(
}
}

@OptIn(ExperimentalLazyDsl::class)
@Composable
private fun SnackCollectionList(
snackCollections: List<SnackCollection>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import androidx.compose.animation.animate
import androidx.compose.animation.animatedFloat
import androidx.compose.animation.core.AnimationSpec
import androidx.compose.animation.core.SpringSpec
import androidx.compose.foundation.Text
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.BoxScope
Expand All @@ -36,6 +35,7 @@ import androidx.compose.foundation.selection.selectable
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.Icon
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.AccountCircle
import androidx.compose.material.icons.outlined.Home
Expand All @@ -46,16 +46,17 @@ import androidx.compose.runtime.onCommit
import androidx.compose.runtime.remember
import androidx.compose.runtime.savedinstancestate.savedInstanceState
import androidx.compose.ui.Alignment
import androidx.compose.ui.Layout
import androidx.compose.ui.MeasureScope
import androidx.compose.ui.Modifier
import androidx.compose.ui.Placeable
import androidx.compose.ui.TransformOrigin
import androidx.compose.ui.draw.clip
import androidx.compose.ui.drawLayer
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.graphics.vector.VectorAsset
import androidx.compose.ui.layout.Layout
import androidx.compose.ui.layout.MeasureResult
import androidx.compose.ui.layout.MeasureScope
import androidx.compose.ui.layout.Placeable
import androidx.compose.ui.layout.id
import androidx.compose.ui.layout.layoutId
import androidx.compose.ui.platform.AnimationClockAmbient
Expand Down Expand Up @@ -316,7 +317,7 @@ private fun MeasureScope.placeTextAndIcon(
width: Int,
height: Int,
@FloatRange(from = 0.0, to = 1.0) animationProgress: Float
): MeasureScope.MeasureResult {
): MeasureResult {
val iconY = (height - iconPlaceable.height) / 2
val textY = (height - textPlaceable.height) / 2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

package com.example.jetsnack.ui.home

import androidx.compose.foundation.Text
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.example.jetsnack.ui.home.cart

import androidx.compose.foundation.Text
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
Expand All @@ -34,12 +33,11 @@ import androidx.compose.foundation.layout.preferredHeightIn
import androidx.compose.foundation.layout.preferredSize
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.layout.wrapContentWidth
import androidx.compose.foundation.lazy.ExperimentalLazyDsl
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.text.LastBaseline
import androidx.compose.material.Icon
import androidx.compose.material.IconButton
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Close
import androidx.compose.runtime.Composable
Expand All @@ -49,6 +47,7 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.RectangleShape
import androidx.compose.ui.layout.LastBaseline
import androidx.compose.ui.platform.ContextAmbient
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextOverflow
Expand Down Expand Up @@ -117,7 +116,6 @@ fun Cart(
}
}

@OptIn(ExperimentalLazyDsl::class)
@Composable
private fun CartContent(
orderLines: List<OrderLine>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.example.jetsnack.ui.home.search

import androidx.compose.foundation.Text
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
Expand All @@ -29,12 +28,13 @@ import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.lazy.LazyColumnForIndexed
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Layout
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.draw.drawShadow
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.Layout
import androidx.compose.ui.unit.Constraints
import androidx.compose.ui.unit.dp
import androidx.ui.tooling.preview.Preview
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.example.jetsnack.ui.home.search

import androidx.compose.foundation.Image
import androidx.compose.foundation.Text
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.ChainStyle
import androidx.compose.foundation.layout.Column
Expand All @@ -34,6 +33,7 @@ import androidx.compose.foundation.lazy.LazyColumnForIndexed
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.Icon
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.Add
import androidx.compose.runtime.Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@

package com.example.jetsnack.ui.home.search

import androidx.compose.foundation.BaseTextField
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.Text
import androidx.compose.foundation.contentColor
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
Expand All @@ -32,15 +29,17 @@ import androidx.compose.foundation.layout.preferredSize
import androidx.compose.foundation.layout.preferredWidth
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.foundation.text.BasicTextField
import androidx.compose.material.CircularProgressIndicator
import androidx.compose.material.Icon
import androidx.compose.material.IconButton
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.ArrowBack
import androidx.compose.material.icons.outlined.Search
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedTask
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.Stable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
Expand All @@ -52,7 +51,6 @@ import androidx.compose.ui.focus.ExperimentalFocus
import androidx.compose.ui.focus.isFocused
import androidx.compose.ui.focusObserver
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.ui.unit.dp
import androidx.ui.tooling.preview.Preview
Expand Down Expand Up @@ -87,7 +85,7 @@ fun Search(
)
JetsnackDivider()

LaunchedTask(state.query.text) {
LaunchedEffect(state.query.text) {
state.searching = true
state.searchResults = SearchRepo.search(state.query.text)
state.searching = false
Expand Down Expand Up @@ -200,12 +198,9 @@ private fun SearchBar(
)
}
}
BaseTextField(
BasicTextField(
value = query,
onValueChange = onQueryChange,
imeAction = ImeAction.Search,
onImeActionPerformed = { /* todo */ },
cursorColor = JetsnackTheme.colors.textPrimary,
modifier = Modifier
.weight(1f)
.focusObserver {
Expand Down
Loading