Commits
[WearOS] Changed activity 'Since' labels to live time tracking
closes thehale/SimpleTimeTracker-WearOS#23
Similar to the list of translators at the end of the settings page
in the phone app.
More text for the tags fits on the secondary label, especially after
@kantahrek's rewrite of "Since" to a live duration.
Requires pulling tag colors from the phone (which
itself requires reconciling the color based on
whether or not the tag is a general tag), then
rendering them in the tag chip.
Also took the liberty to switch the tag chip from
a ToggleChip base to a SplitToggleChip base, which
(1) looks better (i.e. more consistent with the
ActivitiesList) and (2) allows multi-taggers to
start an activity immediately upon selecting one
tag, if desired.
I needed to see both sides of the communication for debugging
today. Committing so the logs are available going forward.
Replace the stock Android icon with the same one used on the
phone.
closes thehale/SimpleTimeTracker-WearOS#20
A Toast requires text which should be localized. An animation is
a better way to indicate progress without needing a verbal
message.
- Delete unused icons
- Extract hard-coded strings
- Add Spanish Translations for WearOS
Effectively reverts e9f977a5ac809073a71acc2226cc8bb219d7e8db
The Jetpack Navigation docs [1] specifically recommend NOT passing
the navController object into any other Composable because it
makes them much more difficult to test.
I also took the liberty to rename `MainNavigator` to
`StartActivityNavigator`. We'll eventually create tiles and
complications which might have different navigation flows.
Choosing a more precise name for the navigator subtly informs
future devs that it's okay to create a new navigator for a new
experience.
[1]: https://developer.android.com/jetpack/compose/navigation#testing
It was previously possible to navigate back to a closed tag list
by swiping back.
This was a poor UX for two reasons:
1. Swiping back doesn't indicate the Activity for which the user is
now picking tags.
2. To close the app via the back action, the user has to swipe back
through **everything**.
Now, swiping back on the ActivitiesScreen will always close the
app.
closes thehale/SimpleTimeTracker-WearOS#14
Removes the need for transformations to and from the string
hex code, improving performance and reducing the chances of
a bug impacting color interpretation.
closes thehale/SimpleTimeTracker-WearOS#24
On the phone, the user can request for activities to be started
immediately after picking one tag, or after picking multiple.
With this commit, that behavior is reflected in the WearOS app.
Additionally, the new Submit button on the TagList allows users
to start the activity from the TagsScreen, but without picking
any tags, so it further satisfies thehale/SimpleTimeTracker-WearOS#13
closes thehale/SimpleTimeTracker-WearOS#16
closes thehale/SimpleTimeTracker-WearOS#17
Means calling Composables only need to provide a click handler.
While adding settings support to the ActivitiesScreen, it became
obvious that screens need access to a navigation controller to
avoid cluttering the `MainNavigation` with business logic.
This commit pushes the NavController into the TagsScreen for
consistency.
The phone app has several settings controlling the behavior of
when to show a tag picker.
This commit implements support for the following settings
- Whether or not to show a tag picker at all
- If a tag picker is allowed, only show it for activities which have
at least one non-general tag.
closes thehale/SimpleTimeTracker-WearOS#15
Handles all the logic for determining whether the watch should
start the activity outright, or request tags first.
Being able to see the exact JSON going back and forth
gives precise insight into the root causes of many problems.
Adds the extra fields to the DTO that will be needed to
implement full support on the watch for the behavioral settings
defined on the phone.
The WearOS app now follows the phone's multitasking setting.
When multi-tasking is disabled, starting a new activity will stop
all other running activities.
When multi-tasking is enabled, starting/stopping an activity
affects only that activity's state.
closes thehale/SimpleTimeTracker-WearOS#18
The DomainAPI was removing stopped activity records without
saving them to the database.
Now, the DomainAPI persists completed records as expected :D
What's more, it also follows the settings for minimum durations
for activity records.
Components are more reusable when they have minimal state
and/or dependency on outside resources.
This commit raises the rpc calls to `ActivitiesScreen` which has
the responsibility for managing the data flow and interactions
between components.
This update also fixes a few bugs:
- Tapping an activity chip will start the activity if it doesn't have
any tags.
- The switches now update automatically after an activity is started or
stopped.
closes thehale/SimpleTimeTracker-WearOS#12
closes thehale/SimpleTimeTracker-WearOS#13
Sets the toggle overlay to a dark color if the activity is stopped,
and uses a light overlay when the activity is running.
Simplifies the usage of all other `remember` functions.
Additionally, it's now easier to obtain an `rpc` instance for direct
RPC requests.
Eventually, there might even be the option of supplying the
same RPC instance to all callers, enabling request
batching/pooling, etc.
Finally, a full cycle, MVP of the wear app!
This commit adds the ability to start activities
on the phone from the wear app. Choose an
activity and the associated tag, and the phone app
will update accordingly.
Of course, the app still has plenty of bugs and
rough edges, but this is a huge milestone!
closes thehale/SimpleTimeTracker-WearOS#5
closes thehale/SimpleTimeTracker-WearOS#8
According to MDN, `PUT` is the verb with the semantics for
replacing the set of resources at a specific path -- what we are
doing for `setCurrentActivities`. This rename reduces semantic
confusion even though it has no impacts on runtime behavior.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT
Requires pulling tag colors from the phone (which
itself requires reconciling the color based on
whether or not the tag is a general tag), then
rendering them in the tag chip.
Also took the liberty to switch the tag chip from
a ToggleChip base to a SplitToggleChip base, which
(1) looks better (i.e. more consistent with the
ActivitiesList) and (2) allows multi-taggers to
start an activity immediately upon selecting one
tag, if desired.
Effectively reverts e9f977a5ac809073a71acc2226cc8bb219d7e8db
The Jetpack Navigation docs [1] specifically recommend NOT passing
the navController object into any other Composable because it
makes them much more difficult to test.
I also took the liberty to rename `MainNavigator` to
`StartActivityNavigator`. We'll eventually create tiles and
complications which might have different navigation flows.
Choosing a more precise name for the navigator subtly informs
future devs that it's okay to create a new navigator for a new
experience.
[1]: https://developer.android.com/jetpack/compose/navigation#testing
It was previously possible to navigate back to a closed tag list
by swiping back.
This was a poor UX for two reasons:
1. Swiping back doesn't indicate the Activity for which the user is
now picking tags.
2. To close the app via the back action, the user has to swipe back
through **everything**.
Now, swiping back on the ActivitiesScreen will always close the
app.
closes thehale/SimpleTimeTracker-WearOS#14
On the phone, the user can request for activities to be started
immediately after picking one tag, or after picking multiple.
With this commit, that behavior is reflected in the WearOS app.
Additionally, the new Submit button on the TagList allows users
to start the activity from the TagsScreen, but without picking
any tags, so it further satisfies thehale/SimpleTimeTracker-WearOS#13
closes thehale/SimpleTimeTracker-WearOS#16
closes thehale/SimpleTimeTracker-WearOS#17
The phone app has several settings controlling the behavior of
when to show a tag picker.
This commit implements support for the following settings
- Whether or not to show a tag picker at all
- If a tag picker is allowed, only show it for activities which have
at least one non-general tag.
closes thehale/SimpleTimeTracker-WearOS#15
Components are more reusable when they have minimal state
and/or dependency on outside resources.
This commit raises the rpc calls to `ActivitiesScreen` which has
the responsibility for managing the data flow and interactions
between components.
This update also fixes a few bugs:
- Tapping an activity chip will start the activity if it doesn't have
any tags.
- The switches now update automatically after an activity is started or
stopped.
closes thehale/SimpleTimeTracker-WearOS#12
closes thehale/SimpleTimeTracker-WearOS#13
Finally, a full cycle, MVP of the wear app!
This commit adds the ability to start activities
on the phone from the wear app. Choose an
activity and the associated tag, and the phone app
will update accordingly.
Of course, the app still has plenty of bugs and
rough edges, but this is a huge milestone!
closes thehale/SimpleTimeTracker-WearOS#5
closes thehale/SimpleTimeTracker-WearOS#8
According to MDN, `PUT` is the verb with the semantics for
replacing the set of resources at a specific path -- what we are
doing for `setCurrentActivities`. This rename reduces semantic
confusion even though it has no impacts on runtime behavior.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT