Repository navigation
Project setup - #16
Merged
Merged
Conversation
Colours from the Growstuff design tokens, Raleway for text and Modak for the wordmark (bundled, so the foss flavour needs no Google font service), and square shapes throughout. Shared pieces for the bold low-vision look: 4px black rules, the brown top bar, big outlined buttons, area rows and tags, and stroke icons drawn from the designs. A placeholder launcher icon uses the sprout.
The app can't sign in to growstuff.org until the server has OAuth, so every repository is a fake for now. The fakes read JSON:API documents from assets/fixtures, written in the same shape as the /api/v1 responses, through a small JSON:API layer and mappers that the real Retrofit version can reuse. Fixture dates are shifted so that their "today" is today on the phone, and changes are kept in memory. The fixtures include some things the API doesn't serve yet: the signed-in member, a garden's location and area, a job's finished_at, and job ideas.
Keep trailing commas and one parameter per line, as Compose code usually does, with lines up to 120 characters. Rename Color.kt and Icons.kt to match the objects they hold, and wrap the few lines that were too long.
The first screens from the Growstuff Android designs, running on the fake repositories: - Sign in: lets you straight in for now, with links to create an account, the privacy policy and the source. - Home: hello, then my gardens, my friends and my jobs, and sign out. - My jobs: to do and done, grouped by when they're due. Ticking a job off bursts flowers (skipped when animations are off) and offers an undo. A ticked job stays put until the tab changes. Add a job from the bar at the bottom. - My gardens: what's growing and ready to harvest, and pull down to "water" (refresh). - My friends: a placeholder for now. From medium width up, as on a tablet, home and the chosen area sit side by side. Things the app can't do yet, such as job ideas and adding a garden, open the website.
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved navigation, accessibility, and data-state correctness issues affect the initial app experience.
7 open issues
Dashed API attributes are not mapped to snake case · New Restored navigation ignores missing session state · New Two-pane breakpoint leaves insufficient menu width · New Window resizing loses the active navigation screen · New Undo timeout ignores accessibility recommended duration · New Date grouping does not update at local midnight · New Tapping the selected tab resets local state · New
What changed in this PR
Establishes the initial Kotlin and Jetpack Compose Android app, with fixture-backed functionality while server-side OAuth remains unavailable.
Changes:
- Adds sign-in, home, jobs, gardens, and adaptive phone/tablet layouts.
- Introduces repository interfaces, JSON:API fixtures, and unit tests.
- Configures Gradle, build automation, dependency updates, and licensing documentation.
| File | Description |
|---|---|
| settings.gradle.kts | Configures repositories, toolchain resolution, and app module. |
| README.md | Documents features, limitations, building, and installation. |
| NOTICE | Lists third-party materials and licenses. |
| licenses/OFL-Raleway.txt | Includes the Raleway font license. |
| licenses/OFL-Modak.txt | Includes the Modak font license. |
| gradlew.bat | Adds the Windows Gradle launcher. |
| gradlew | Adds the POSIX Gradle launcher. |
| gradle/wrapper/gradle-wrapper.properties | Configures the Gradle distribution. |
| gradle/libs.versions.toml | Centralizes dependency and plugin versions. |
| gradle.properties | Sets shared build options. |
| build.gradle.kts | Declares root build plugins. |
| app/src/test/kotlin/org/growstuff/android/ui/jobs/JobsViewModelTest.kt | Tests job completion, undo, and creation. |
| app/src/test/kotlin/org/growstuff/android/ui/jobs/JobGroupsTest.kt | Tests job grouping and ordering. |
| app/src/test/kotlin/org/growstuff/android/data/JsonApiMappersTest.kt | Tests garden and job mapping. |
| app/src/test/kotlin/org/growstuff/android/data/FixtureFiles.kt | Provides fixed-clock test fixtures. |
| app/src/main/res/values/themes.xml | Defines the Android window theme. |
| app/src/main/res/values/strings.xml | Adds interface text and plurals. |
| app/src/main/res/values/colors.xml | Defines platform resource colors. |
| app/src/main/res/mipmap-anydpi/ic_launcher.xml | Defines the adaptive launcher icon. |
| app/src/main/res/drawable/sign_in_garden.xml | Adds sign-in artwork. |
| app/src/main/res/drawable/ic_launcher_foreground.xml | Adds launcher foreground artwork. |
| app/src/main/kotlin/org/growstuff/android/ui/theme/Type.kt | Defines fonts and typography. |
| app/src/main/kotlin/org/growstuff/android/ui/theme/Theme.kt | Configures the Compose theme and control dimensions. |
| app/src/main/kotlin/org/growstuff/android/ui/theme/GrowstuffColors.kt | Defines shared interface colors. |
| app/src/main/kotlin/org/growstuff/android/ui/signin/SignInScreen.kt | Implements the sign-in landing screen. |
| app/src/main/kotlin/org/growstuff/android/ui/Links.kt | Centralizes external page URLs. |
| app/src/main/kotlin/org/growstuff/android/ui/jobs/JobsViewModel.kt | Manages job tabs, completion, undo, and creation. |
| app/src/main/kotlin/org/growstuff/android/ui/jobs/JobsScreen.kt | Renders job lists and controls. |
| app/src/main/kotlin/org/growstuff/android/ui/jobs/JobGroups.kt | Groups jobs by due date and completion. |
| app/src/main/kotlin/org/growstuff/android/ui/jobs/FlowerBurst.kt | Adds job-completion animation. |
| app/src/main/kotlin/org/growstuff/android/ui/home/HomeScreen.kt | Implements the home navigation menu. |
| app/src/main/kotlin/org/growstuff/android/ui/GrowstuffApp.kt | Connects session state, navigation, and adaptive layouts. |
| app/src/main/kotlin/org/growstuff/android/ui/gardens/GardensViewModel.kt | Manages garden refresh state. |
| app/src/main/kotlin/org/growstuff/android/ui/gardens/GardensScreen.kt | Displays gardens and planting summaries. |
| app/src/main/kotlin/org/growstuff/android/ui/friends/FriendsScreen.kt | Adds a friends placeholder screen. |
| app/src/main/kotlin/org/growstuff/android/ui/components/GrowstuffIcons.kt | Defines shared vector icons. |
| app/src/main/kotlin/org/growstuff/android/ui/components/Blocks.kt | Provides reusable controls and layout components. |
| app/src/main/kotlin/org/growstuff/android/MainActivity.kt | Hosts Compose with edge-to-edge rendering. |
| app/src/main/kotlin/org/growstuff/android/GrowstuffApplication.kt | Initializes application dependencies. |
| app/src/main/kotlin/org/growstuff/android/data/Repositories.kt | Defines session, jobs, and gardens interfaces. |
| app/src/main/kotlin/org/growstuff/android/data/Models.kt | Defines application data models. |
| app/src/main/kotlin/org/growstuff/android/data/JsonApiMappers.kt | Maps API resources into application models. |
| app/src/main/kotlin/org/growstuff/android/data/jsonapi/JsonApi.kt | Adds JSON:API parsing and resource helpers. |
| app/src/main/kotlin/org/growstuff/android/data/fake/Fixtures.kt | Loads fixtures and shifts dates. |
| app/src/main/kotlin/org/growstuff/android/data/fake/FakeRepositories.kt | Implements in-memory fixture-backed repositories. |
| app/src/main/kotlin/org/growstuff/android/AppContainer.kt | Wires repositories and the shared clock. |
| app/src/main/assets/fixtures/member.json | Supplies a sample member. |
| app/src/main/assets/fixtures/jobs.json | Supplies jobs and linked resources. |
| app/src/main/assets/fixtures/job_ideas.json | Supplies suggested jobs. |
| app/src/main/assets/fixtures/gardens.json | Supplies gardens and plantings. |
| app/src/main/AndroidManifest.xml | Declares the application and launcher activity. |
| app/proguard-rules.pro | Adds serializer retention rules. |
| app/build.gradle.kts | Configures Android variants, dependencies, and tests. |
| .gitignore | Excludes credentials, generated files, and caches. |
| .github/workflows/build.yml | Automates checks, builds, and artifact uploads. |
| .github/dependabot.yml | Schedules dependency updates. |
| .editorconfig | Defines formatting and Kotlin style settings. |
Review effort: Balanced
|
|
||
| fun many(name: String): List<ResourceIdentifier> = relationships[name]?.identifiers().orEmpty() | ||
|
|
||
| private fun attribute(name: String): JsonElement? = attributes[name]?.takeUnless { it is JsonNull } |
| } | ||
| } | ||
|
|
||
| NavHost(nav, startDestination = if (member == null) SignInRoute else HomeRoute) { |
| } | ||
| if (twoPanes) { | ||
| Row(Modifier.fillMaxSize()) { | ||
| home(Modifier.widthIn(max = 420.dp).weight(0.4f)) |
Comment on lines
+118
to
+119
| } else { | ||
| home(Modifier) |
Comment on lines
+430
to
+433
| LaunchedEffect(job.id) { | ||
| delay(7_000) | ||
| onTimeout() | ||
| } |
| ideas, | ||
| local, | ||
| -> | ||
| val today = LocalDate.now(clock) |
| }.stateIn(viewModelScope, SharingStarted.WhileSubscribed(5_000), JobsUiState()) | ||
|
|
||
| fun showTab(tab: JobsTab) { | ||
| local.value = LocalState(tab = tab) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.