Skip to content

Commit

Permalink
Code comment cleanup + README and screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
opatry committed Mar 6, 2021
1 parent 1285ebd commit 1fc3867
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 16 deletions.
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,28 @@

## :scroll: Description

TODO
This app lists timers to launch at will for different needs.
Each unit has its own indicator (for hours, minutes and seconds).

## :bulb: Motivation and Context

TODO
The main idea was to bring a really visual way to represent time, using distinct progress for each units with its own nested color circles.
It was tough to deal with time arithmetic and smooth animation each seconds.

I'm kind of satisfied by final visual even if not perfect.
I learn a lot with this challenge #2 (Animation, backdrop (incl. conceal/reveal using `rememberCoroutineScope`), time arithmetic, canvas composable, custom font, `LazyColumn.stickyHeader`).

## :camera_flash: Screenshots

## 🌞 Light Mode
List | Details | Tablet
--- | --- | --- |
<img src="/results/screenshot_1.png" width="260"> | <img src="/results/screenshot_2.png" width="260"> | <img src="/results/screenshot_3.png" width="520">
### 🌞 Light Mode
Active timer | Timers
--- | --- |
<img src="results/screenshot_1.png" width="260"> | <img src="results/screenshot_2.png" width="260">

## 🌚 Dark Mode
List | Details | Tablet
--- | --- | --- |
<img src="/results/screenshot_1_dark.png" width="260"> | <img src="/results/screenshot_2_dark.png" width="260"> | <img src="/results/screenshot_3_dark.png" width="520">
### 🌚 Dark Mode
Active timer | Timers
--- | --- |
<img src="results/screenshot_1_dark.png" width="260"> | <img src="results/screenshot_2_dark.png" width="260">

## License
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ class CounterViewModel(private val mainDispatcher: CoroutineDispatcher = Dispatc

fun start(timer: Timer) {
viewModelScope.launch(mainDispatcher) {
// TODO review poor state & timers modeling
// keep list of timers up to date keeping last used first
_timers.value = buildList {
add(timer)
val timers = _timers.value?.filterNot { it == timer }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ fun TimerCircle(
tickInterval: Duration,
onFABClicked: () -> Unit
) {
// TODO animate card size when reaching 0 to make it wrapping the FAB
Card(
Modifier
.padding(16.dp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ fun TimerLabel(hours: Int, minutes: Int, seconds: Int) {
Text(
// FIXME text "moves" because it's not a monospaced font, how could we make each "bucket" of 2-digits stable in size?
buildAnnotatedString {
// TODO padded string 2 digits, pad number with alpha
// TODO transition anim alpha of pad number when changing from 0 to N or N to 0
withStyle(style = SpanStyle(color = DurationUnit.HOURS.color)) {
append(hours.pad0())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ fun TimerListItem(timer: Timer, onTimerClicked: (Timer) -> Unit) {

Text(
buildAnnotatedString {
// FIXME shouldn't come from string resource for proper localization?
if (timer.name != null) {
append(timer.name)
} else {
Expand Down
Binary file modified results/screenshot_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added results/screenshot_1_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/screenshot_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added results/screenshot_2_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified results/video.mp4
Binary file not shown.

0 comments on commit 1fc3867

Please sign in to comment.