Commit Graph

83 Commits

Author SHA1 Message Date
Brandon Presley 5a3b926dcf Handle fresh user experience better for Plans - 2.9 🚀
1. Add a button to insert some Exercises if none exist
2. Show a toast for the first plan, explaining you should
  tap it to begin the plan.
2023-11-29 12:55:18 +13:00
Brandon Presley 9ab07c0114 Put selected exercises first when editing a plan - 2.7 🚀
Closes #190
2023-11-22 11:29:12 +13:00
Brandon Presley 0163788175 Set placeholder for plan title 2023-11-21 19:24:40 +13:00
Brandon Presley 15a28a0a81 Replace dragging with buttons in edit plan - 2.5 🚀
Every draggable library I tried was buggy.
2023-11-20 12:42:23 +13:00
Brandon Presley 1b164aaaf1 Remove loading indicator where load times are fast
If the load time is too fast (on a mid-tier device),
then for most people they will see a flicker of a
loading spinner (which looks like a bug). These indicators
would only marginally improve the experience of people with
the slowest devices, but for most people this will just look
like a bug.

I left the indicators in the InsightsPage since those queries
actually do take >=300ms on a mid-tier device.
2023-11-15 15:53:32 +13:00
Brandon Presley 0592a9d695 Fix wrong text color on primary buttons - 1.187 🚀 2023-11-15 13:07:58 +13:00
Brandon Presley ba24649a52 Organize imports 2023-11-15 11:21:49 +13:00
Brandon Presley 6b168cccfe Rename drawer-param-list -> drawer-params 2023-11-15 11:08:00 +13:00
Brandon Presley c507370398 Change style of primary buttons
According to React Native Paper docs, the purpose
of the "contained" mode of button is for the primary
action.

https://callstack.github.io/react-native-paper/docs/components/Button/#mode
2023-11-15 10:51:54 +13:00
Brandon Presley bec564e18b Handle loading of exercises in EditPlan 2023-11-14 14:03:40 +13:00
Brandon Presley 4dd8a2950f Organize state in EditPlan 2023-11-14 13:56:50 +13:00
Brandon Presley 1ac78de724 Fix some database drift 2023-11-13 18:13:23 +13:00
Brandon Presley ef63fcf470 Organize all imports 2023-11-12 17:05:37 +13:00
Brandon Presley 70fec83ec3 Replace long press with vertical drag icon button
Closes #181
2023-11-12 11:45:23 +13:00
Brandon Presley 1ff6a87155 Update names list after re-ordering - 1.174 🚀
Closes #183
2023-11-12 11:28:30 +13:00
Brandon Presley 8988e584ae Rename workout -> exercise
A workout would typically refer to a list of
exercises.
2023-11-09 18:52:50 +13:00
Brandon Presley 2e96398b38 Enable re-ordering of workouts in EditPlan - 1.170 🚀
Closes #176
2023-11-09 13:01:05 +13:00
Brandon Presley 3d54f61a2c Move time.ts -> days.ts 2023-11-06 14:27:27 +13:00
Brandon Presley e8ee4a253e Migrate from Drawer -> Stacks to Stack -> Drawer
This simplifies our codebase greatly by
only having a single stack navigator and
a single drawer navigator. Previously we had
a stack navigator for every main page on the drawer.
2023-10-28 15:59:25 +13:00
Brandon Presley 7928cab4c1 Swap to using MaterialCommunityIcons 2023-10-19 18:28:56 +13:00
Leon Babic 314b09017b
Add title to Plan 2023-08-21 14:25:29 +02:00
Brandon Presley f778426aba Run prettier
Something happened with the deno formatter,
I can't remember what! Hahahahahaahahaha
2023-08-12 15:23:02 +12:00
Brandon Presley 95681c0b3d Save plan before starting it
Also after saving it makes more sense to just
navigate to PlanList instead of calling
navigation.goBack(). This way we can make sure
we have up-to-date data.

The old way would typically lead to us seeing
stale data. E.g.
1. Tap on a plan
2. Tap on edit
3. Change details of the plan
4. Press save
5. See old plan

Now when we save we instead see the original list of plans.
2023-07-31 15:54:32 +12:00
Brandon Presley 85915b9aa0 Retrieve last set when running a plan - 1.145
Closes #162

We should just keep it simple and get the most recent set instead of
trying to figure out what the best kind of maximum would be.
2023-07-23 13:59:11 +12:00
Brandon Presley 3e41c3bbd8 Use outlined buttons instead of contained ones
I like them better! Ahahahahahahahahah
Bwahahahahahahahahahahahahahahahahahah
2023-07-17 16:24:09 +12:00
Brandon Presley 89606b9d21 Fix type errors related to upgrade 2023-07-15 14:38:46 +12:00
Brandon Presley 0beb1397a6 Hide play button from new plans - 1.143
It doesn't make sense to start a plan
that hasn't been created yet.
2023-07-04 11:20:07 +12:00
Brandon Presley 4303fe2cc4 Use deno fmt instead of prettier 2023-06-27 15:16:59 +12:00
Brandon Presley 90db607190 Easily swap between edit/start for plans - 1.137 2023-03-28 12:20:32 +13:00
Brandon Presley 3af3e1faf2 Order plan workouts alphabetically
Closes #150
2023-02-14 16:37:09 +13:00
Brandon Presley 467df629b0 Change edit headers to add when adding 2023-01-08 18:05:59 +13:00
Brandon Presley a9000898f3 Replace children with title for Switch
Apparently, the children prop makes React.memo
not work any more. I read about it in
https://stackoverflow.com/questions/53074551/when-should-you-not-use-react-memo
2022-12-30 19:49:54 +13:00
Brandon Presley 48432188c3 Simplify Switch.tsx 2022-12-24 19:55:38 +13:00
Brandon Presley 521fa0e9d3 Remove margins from buttons
These were for my ios testing, which I might
add back in later.
2022-11-30 18:14:34 +13:00
Brandon Presley c9adaf59ff Remove confusing add workout button from plan 2022-11-16 18:48:16 +13:00
Brandon Presley bc7aca03e8 Remove semicolons from line endings 2022-10-31 17:22:08 +13:00
Brandon Presley b7f1c2192e Pause converting to typeorm due to odd error
ERROR  TypeError: Cannot read property 'getItem' of undefined

This error is located at:
    in FlatList (created by SetList)
    in RCTView (created by View)
    in View (created by Page)
    in Page (created by SetList)
    in SetList (created by SceneView)
...

I found an open issue on the react-native github which seems
related https://github.com/facebook/react-native/issues/31523
but after following all of their suggestions I still have the
same error. I tried:
- Removing @babel/plugin-proposal-class-properties & @babel/plugin-transform-flow-strip-types
- Adding @babel/plugin-transform-flow-strip-types
2022-10-31 13:20:36 +13:00
Brandon Presley e6dcd4a47e Use hermes engine
https://reactnative.dev/docs/hermes
2022-10-28 18:36:47 +13:00
Brandon Presley 80b1a1ef56 Fix single views for new custom headers 2022-10-23 19:13:58 +13:00
Brandon Presley 9bd8fa9353 Replace height percent setting with flex: 1
This way reacts better to changing the screen sizes.
I think there was one bug where the fab wouldn't be
precisely at the bottom of the page depending on the
flat list length.
2022-10-14 18:12:21 +13:00
Brandon Presley 4df5af783c Add missing keys to EditPlan 2022-09-27 12:26:03 +13:00
Brandon Presley 91c0430760 Factor out massive switch 2022-09-26 16:10:13 +13:00
Brandon Presley be5571a965 Fix text color inconsistency in plan editing 2022-09-25 18:11:50 +13:00
Brandon Presley acfd0e698d Minor refactors and renaming 2022-09-25 17:49:26 +13:00
Brandon Presley 71d223f0a1 Add current workout progress to title of set editing
Related to #48

Should be thoroughly tested before closing.
2022-09-24 19:09:58 +12:00
Brandon Presley 39fafa353f Split out some type definitions into their own files 2022-09-24 18:47:31 +12:00
Brandon Presley 85dd2b6d17 Move rest timer and sets per session settings to Workouts
Closes #32
2022-09-21 11:50:20 +12:00
Brandon Presley 0cee774136 Prevent empty plans from being created 2022-09-18 18:45:05 +12:00
Brandon Presley 052d000e12 Make padding & margin consistent everywhere. 2022-09-16 21:07:02 +12:00
Brandon Presley 4b35a526b4 Fix error on editing plan 2022-09-04 17:33:05 +12:00