Commit Graph

57 Commits

Author SHA1 Message Date
Brandon Presley 49b5eb48c6 Refactor MassiveSnack
Instead of using a context for the whole app
use DeviceEventEmitter with root state.
This will probably improve performance,
since I think the react context was
re-rendering the entire DOM tree.
2022-11-01 15:55:37 +13:00
Brandon Presley bc7aca03e8 Remove semicolons from line endings 2022-10-31 17:22:08 +13:00
Brandon Presley e7321b6d8e Add typeorm migrations 2022-10-31 17:05:31 +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 463852e6a6 Prevent double searching everywhere
Also change variable names. Search should represent the
act of searching, rather than the value being typed by the user.
2022-10-28 18:59:54 +13:00
Brandon Presley e6dcd4a47e Use hermes engine
https://reactnative.dev/docs/hermes
2022-10-28 18:36:47 +13:00
Brandon Presley bca65c90e6 Show dates in set edit screen 2022-10-14 18:20:30 +13:00
Brandon Presley 46f0875497 Create useSnackbar custom hook 2022-10-14 17:27:19 +13:00
Brandon Presley 228383ed23 Bottom align save button on set form 2022-10-13 16:32:12 +13:00
Brandon Presley 3cbabb723a Add sessions page
Related to #82
2022-10-05 23:38:52 +13:00
Brandon Presley 6f41f87dc1 Improve readability of SetForm 2022-10-02 17:59:08 +13:00
Brandon Presley b0b804eae1 Use react context for settings
Closes #81
2022-10-01 16:01:07 +13:00
Brandon Presley df45938bc3 Add image to set edit page 2022-10-01 15:35:52 +13:00
Brandon Presley 71c358a532 Move cursor to next input for workouts editing 2022-09-30 15:14:53 +13:00
Brandon Presley 4199bf0058 Fix image not being included for new predicted sets 2022-09-30 13:29:33 +13:00
Brandon Presley 4eaf2c2134 Give new sets no image instead of last sets image
Closes #72
2022-09-30 13:12:11 +13:00
Brandon Presley 66c24a96bd Fix missing key in workouts for SetForm 2022-09-29 13:42:19 +13:00
Brandon Presley 13c4879470 Revert workouts to be text instead of an input
These workouts being an input is confusing because
they are not editable.

Closes #65
2022-09-28 14:22:12 +13:00
Brandon Presley 86509eb211 Prevent commas and single quotes from being entered
Closes #60
2022-09-27 17:41:31 +13:00
Brandon Presley 3e4dfa5c80 Add setting to hide workouts from edit set
Closes #43
2022-09-24 17:23:15 +12:00
Brandon Presley 24d4bcea21 Make todays workout read only instead of disabled
Closes #41
2022-09-24 17:16:52 +12:00
Brandon Presley 24c8eb08b9 Prevent keyboard flicker from set name to reps
Closes #42
2022-09-24 15:38:58 +12:00
Brandon Presley 406d8e7738 Prevent blank workouts on new set
Closes #46
2022-09-24 15:33:45 +12:00
Brandon Presley 6677bc092b Submit set when pressing enter on weights 2022-09-21 14:47:27 +12:00
Brandon Presley 0bc644a1ba Add setting to show/hide unit field
Closes #34
2022-09-21 13:51:29 +12:00
Brandon Presley 719560b664 Hide rest minutes and seconds from edit set screen
Feels like there are too many fields on this screen
so we can just leave the defaults for people who don't
care about this feature.
2022-09-21 11:59:14 +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 c02456e27c Remove (kg) and auto capitalization from unit
Closes #25
2022-09-18 18:10:19 +12:00
Brandon Presley 052d000e12 Make padding & margin consistent everywhere. 2022-09-16 21:07:02 +12:00
Brandon Presley e3b3c6ca09 Split out database logic into service files 2022-09-04 16:56:46 +12:00
Brandon Presley 259d36d67f Move all database operations into db.ts 2022-09-04 15:28:21 +12:00
Brandon Presley 607f83955d Replace react context with let statement in db.ts
1. I can't easily import context with my editor.
2. It's extra complexity everyone has to understand.
3. I hate the antichrist.
2022-09-04 14:05:25 +12:00
Brandon Presley ee6cef63ee Remove date editing from SetForm
It looks so messy, and adding libraries to deal with dates
is simply bloat.
2022-09-03 15:26:10 +12:00
Brandon Presley 6b617d974f Replace react-native imports of Text with react-native-paper 2022-09-01 23:43:53 +12:00
Brandon Presley ef2b877b49 Add date editing to Massive input 2022-09-01 13:59:06 +12:00
Brandon Presley 718bb279d9 Add warning for incorrect date format 2022-09-01 13:12:39 +12:00
Brandon Presley d7330067bb Allow text editing of created in SetForm 2022-09-01 13:05:41 +12:00
Brandon Presley 756a2089e9 Prevent race condition with database migrations 2022-08-30 23:21:25 +12:00
Brandon Presley 26f54e43e0 Prevent errors when no sets exist yet 2022-08-30 21:41:49 +12:00
Brandon Presley 27a1f3132f Remove image view from SetForm
1. This doesn't easily fit on the screen with the keyboard open
2. It wasn't editable, while being on an edit screen, so it was
   misleading.
2022-08-29 15:19:07 +12:00
Brandon Presley f6dec0c3b2 Add images to sets 2022-08-28 20:55:12 +12:00
Brandon Presley 925138d6dc Remove unused dependencies 2022-08-28 20:20:58 +12:00
Brandon Presley fd38439756 Change color scheme 2022-08-26 13:54:51 +12:00
Brandon Presley 8ae8de9612 Underline current workout in SetForm 2022-08-25 14:16:30 +12:00
Brandon Presley c54396cb9c Make text inputs outlined 2022-08-25 12:35:09 +12:00
Brandon Presley bc3a39c4b6 Show list of current workouts when adding set 2022-08-24 15:36:49 +12:00
Brandon Presley 0dcfc8eadf Show next workout on EditSet page 2022-08-24 12:46:47 +12:00
Brandon Presley 1ce9a49224 Focus name field when it's empty 2022-08-23 15:58:44 +12:00
Brandon Presley fd66bd3ab3 Remove date related logic
This kept displaying the wrong date/time for certain timezones.
So i'll just show the actual ISO date we store in the database.
Maybe later i'll figure out what was going on here or use a
date library (probably not).
2022-08-20 16:38:18 +12:00
Brandon Presley 1b2c26e36c Fix selection changing 2022-08-07 15:09:45 +12:00