Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c720861
Migrate JetSnack to use Styles
riggaroo Mar 13, 2026
5a6bcb8
Migrate Text() to a new JetsnackText() composable instead, to be able…
riggaroo Mar 13, 2026
f89e380
Refactor Jetsnack theme to use a unified `JetsnackTheme` class and on…
riggaroo Mar 16, 2026
6a3885c
Run Spotless
riggaroo Mar 16, 2026
169312e
Rename and refactor UI components and theme accessors.
riggaroo Mar 16, 2026
2e57f91
Rename `AppStyles` to `Styles` and refactor styling in components
riggaroo Mar 16, 2026
b733ea8
Update snack components and detail view to use Compose Foundation sty…
riggaroo Mar 17, 2026
d116df3
Enable font family application in textStyleWithFontFamilyFix
riggaroo Mar 17, 2026
252b8f7
Simplify button definition.
riggaroo Mar 18, 2026
8ca8c34
Simplify button definition.
riggaroo Mar 18, 2026
bf00df6
Add minSize to the Button
riggaroo Mar 18, 2026
8d4514e
Add PreviewWrapper.kt
riggaroo Mar 23, 2026
180e40b
Add Button Variants with Loading state.
riggaroo Mar 23, 2026
a8fb371
Implement adaptive button styling using mediaQuery and update previews
riggaroo Mar 23, 2026
b3ab8d9
Refactor theme, styles, and UI components for design consistency
riggaroo Mar 24, 2026
65ff9a4
Introduce the SharedBoundsMorph.kt - to perform morphing shape animat…
riggaroo Mar 24, 2026
969f85e
Ktlint formatting and small tweaks
riggaroo Mar 24, 2026
b99448a
Update Button styles and improve UI layout for interactive states
riggaroo Mar 25, 2026
726f8a9
Check for keyboard and mouse attached, then scale down
riggaroo Mar 25, 2026
6b5873b
Refactor Search Categories to use LazyVerticalGrid
riggaroo Mar 25, 2026
04ef363
Add responsive horizontal padding to JetsnackBottomBar
riggaroo Mar 25, 2026
1ad5519
Migrated Snacks to use one source of truth instead of two. Theming ea…
riggaroo Mar 25, 2026
5e428f5
Small UI tweaks on the Snacks to differentiate between different styles,
riggaroo Mar 25, 2026
edaeace
Disable androidx startup initialization as this is just a small sample
riggaroo Mar 25, 2026
f522832
Media query for sizing
riggaroo Mar 25, 2026
25a11ab
Run spotless
riggaroo Mar 26, 2026
c52e8d6
Fix so that touch events are not propagated through
riggaroo Mar 26, 2026
cae3dc2
Improve search size
riggaroo Mar 26, 2026
37df104
Refactor Cart swipe-to-dismiss and enhance UI component interactions
riggaroo Mar 26, 2026
85393f5
Refactor EllipticalGradient.kt out into separate file
riggaroo Mar 27, 2026
4deb059
Extract SnackCard styles
riggaroo Mar 27, 2026
eee2b78
Add snack size changes on window size scale.
riggaroo Mar 27, 2026
c6a0156
Remove gradients for pressed state
riggaroo Mar 30, 2026
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
4 changes: 4 additions & 0 deletions Jetsnack/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ android {
kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget("17")
freeCompilerArgs.add("-opt-in=androidx.compose.foundation.style.ExperimentalFoundationStyleApi")
}
}
compileOptions {
Expand All @@ -106,6 +107,8 @@ android {
}

dependencies {
implementation(libs.androidx.compose.ui.text.google.fonts)
implementation(libs.androidx.graphics.shapes)
val composeBom = platform(libs.androidx.compose.bom)
implementation(composeBom)
androidTestImplementation(composeBom)
Expand Down Expand Up @@ -144,4 +147,5 @@ dependencies {

implementation(libs.androidx.glance.appwidget)
implementation(libs.androidx.glance.preview)
implementation(libs.androidx.startup)
}
4 changes: 4 additions & 0 deletions Jetsnack/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
android:theme="@style/Theme.Jetsnack"
android:enableOnBackInvokedCallback="true"
tools:targetApi="33">
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
tools:node="remove" />
<receiver
android:name=".widget.RecentOrdersWidgetReceiver"
android:label="@string/snack_order_widget_name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import kotlin.random.Random
@Immutable
data class SnackCollection(val id: Long, val name: String, val snacks: List<Snack>, val type: CollectionType = CollectionType.Normal)

enum class CollectionType { Normal, Highlight }
enum class CollectionType { Normal, Highlight, Card }

/**
* A fake repo
Expand Down Expand Up @@ -61,6 +61,7 @@ private val popular = SnackCollection(
private val wfhFavs = tastyTreats.copy(
id = Random.nextLong(),
name = "WFH favourites",
type = CollectionType.Card,
)

private val newlyAdded = popular.copy(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

@file:OptIn(ExperimentalComposeUiApi::class)

package com.example.jetsnack.ui

import android.appwidget.AppWidgetManager
Expand All @@ -23,6 +25,8 @@ import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.annotation.RequiresApi
import androidx.compose.ui.ComposeUiFlags
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.glance.appwidget.GlanceAppWidgetManager
import androidx.lifecycle.lifecycleScope
import com.example.jetsnack.widget.RecentOrdersWidgetReceiver
Expand All @@ -33,6 +37,7 @@ class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
enableEdgeToEdge()
super.onCreate(savedInstanceState)
ComposeUiFlags.isMediaQueryIntegrationEnabled = true
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
lifecycleScope.launch(Dispatchers.Default) {
setWidgetPreviews()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ enum class SnackSharedElementType {
Bounds,
Image,
Title,
Tagline,
Background,
Price,
}

object FilterSharedElementKey
Loading