Compare commits

...

636 Commits

Author SHA1 Message Date
bl00dymarie 4fab8b26cb Setting for ITSAppUsesNonExemptEncryption 2022-08-11 08:29:26 +02:00
bl00dymarie deb9d3d8e8 Bump version number 1.2208.11 2022-08-11 08:20:25 +02:00
bl00dymarie fcc54566fc Merge branch 'fix/replace-app-restart' into 'release'
Replaces closing/restart functionality with a more friendly app state reset

See merge request bloodyhealth/drip!461
2022-08-11 06:16:17 +00:00
Sofiya Tepikin 0118fcd6ce Merge branch 'Chore/Remove-email-and-hence-typo' into 'release'
Chore: Remove email and hence typo from text

See merge request bloodyhealth/drip!459
2022-08-10 14:35:36 +00:00
Sofiya Tepikin 298eeafdba Fixes linter failing 2022-08-10 16:24:37 +02:00
Sofiya Tepikin 77ea075c23 Cleanup 2022-08-10 16:24:37 +02:00
Sofiya Tepikin 38f91c2e25 Reset app state without closing/restarting it 2022-08-10 16:24:37 +02:00
Sofiya Tepikin d9a1cd7895 Prettify files before other changes
Prettify
2022-08-10 16:24:37 +02:00
Sofiya Tepikin e954ddf991 Merge branch 'fix/realm-warning' into 'release'
Fix deprecated way of using writeCopyTo - realm method

See merge request bloodyhealth/drip!460
2022-08-10 14:22:56 +00:00
Sofiya Tepikin 74c570da38 Fix deprecated way of using writeCopyTo - realm method 2022-08-10 14:22:55 +00:00
bl00dymarie 8c99f2c6a3 Remove email and hence typo from text 2022-08-09 13:16:58 +02:00
bl00dymarie 34c1eae991 Merge branch 'fix/empty-password' into 'release'
Fix/empty password

See merge request bloodyhealth/drip!456
2022-08-08 11:33:56 +00:00
bl00dymarie e37d44c506 Bump version number 1.2208.8 2022-08-08 13:31:17 +02:00
Sofiya Tepikin 33dba03c47 Disable button when no input 2022-08-08 12:38:20 +02:00
Sofiya Tepikin a7bdd4b6a6 Prettify enter-new-password 2022-08-08 12:37:20 +02:00
bl00dymarie 1c1d64e719 Bump version to 1.2208.2 2022-08-02 23:07:36 +02:00
Sofiya Tepikin 95ce1b6768 Force light mode for iOS 2022-08-01 12:46:09 +02:00
Sofiya Tepikin f73564a1a4 Merge branch 'Chore/Bump-version-of-the-day-and-potentially-beta-test' into 'master'
Chore/bump version of the day and potentially beta test

See merge request bloodyhealth/drip!413
2022-07-10 17:41:16 +00:00
bl00dymarie 5c235b5197 Update https website link 2022-07-10 19:34:01 +02:00
bl00dymarie 31bcece857 Bump version number 1.2207.10 2022-07-10 19:33:11 +02:00
bl00dymarie aa12f8f249 Merge branch 'fix/donate-button-fork' into 'master'
Cleanup donation button fork on iOS & update the link to the website

Closes #572 and #566

See merge request bloodyhealth/drip!412
2022-07-10 17:27:59 +00:00
Sofiya Tepikin 800b831958 Update the link to our website with the brand new domain 2022-07-10 19:22:30 +02:00
Sofiya Tepikin 3b45a32727 Cleanup donation button fork on iOS 2022-07-10 19:04:30 +02:00
bl00dymarie c311900e27 Merge branch '546-bug-cycle-day-title-covers-navigation-on-upper-right-2' into 'master'
Fix: Make date format more compact for cycle day

Closes #546

See merge request bloodyhealth/drip!411
2022-07-10 16:46:04 +00:00
bl00dymarie 71d81904ad Make date format more compact for cycle day 2022-07-10 18:11:02 +02:00
BloodyMarie 6fb98f7193 Update text for support 2022-07-06 23:08:12 +02:00
BloodyMarie 8721bc484c Feature: Remove donate button for iOS 2022-07-06 23:06:46 +02:00
Sofiya Tepikin 68d8a55034 Merge branch 'fix/weblate-parse-error' into 'master'
Fix weblate parse error

See merge request bloodyhealth/drip!408
2022-07-05 18:13:11 +00:00
Sofiya Tepikin 36a77111ce Fix invalid json file 2022-07-05 16:52:39 +02:00
Sofiya Tepikin 1e504a6143 Merge branch 'feature/Add-privacy-policy' into 'master'
Feature: Adds privacy policy

See merge request bloodyhealth/drip!399
2022-07-03 20:28:39 +00:00
Lisa 2b116c375d Merge branch 'chore/update-husky' into 'master'
Update husky version 6 -> 8

See merge request bloodyhealth/drip!405
2022-07-03 18:08:22 +00:00
Sofiya Tepikin c35afa2dbf Merge branch 'chalkedgoose/rm-flowconfig' into 'master'
Remove .flowconfig

See merge request bloodyhealth/drip!407
2022-07-02 08:51:14 +00:00
Sofiya Tepikin 6b441294d9 Update husky version 7 -> 8 2022-06-30 13:38:04 +02:00
Carlos Alba 99069bac8e Remove .flowconfig 2022-06-26 18:10:40 -07:00
Lisa 3633108006 Merge branch 'chore/add-rn-exit-app-library' into 'master'
Chore: add rn-exit-app-v2 library

See merge request bloodyhealth/drip!401
2022-06-25 10:19:01 +00:00
Sofiya Tepikin 7a6643cc1a Add alert before closing 2022-06-23 21:46:41 +02:00
Sofiya Tepikin f223616ee1 Fork restart functionality for different platforms 2022-06-23 21:40:15 +02:00
BloodyMarie ae2a05f9b0 Add package-lock.json after clear script 2022-06-23 17:42:05 +02:00
Maria Zadnepryanets 81cc3087fd Update wordings to advise user that app will close 2022-06-23 17:42:05 +02:00
Maria Zadnepryanets d8c4278fec Add react-native-exit-app-v2 2022-06-23 17:42:05 +02:00
Sofiya Tepikin e87d569b8b Update husky version 6 -> 7 2022-06-23 17:09:55 +02:00
bl00dymarie 829b4bf242 Merge branch 'chore/Bump-version-number' into 'master'
Chore/bump version number to 1.2206.19

See merge request bloodyhealth/drip!402
2022-06-22 09:58:13 +00:00
BloodyMarie dcf7c07a85 Specify node and npm version 2022-06-21 09:42:16 +02:00
BloodyMarie 4f24357420 Add missing 'key' prop for element in iterator 2022-06-20 16:57:20 +02:00
BloodyMarie 3b187a5a4e Feature: Adds privacy policy 2022-06-19 23:26:06 +02:00
BloodyMarie 5b9d904a02 Update package-lock after rebase 2022-06-19 23:08:36 +02:00
BloodyMarie f018332dcc Prepare for archiving 2022-06-19 23:01:27 +02:00
BloodyMarie 1e94c6d7c9 Bump version number to 1.2206.19 2022-06-19 23:01:24 +02:00
Sofiya Tepikin 40f9ea23f3 Merge branch 'fix/ci-pipeline' into 'master'
Regenerate package-lock.json with correct npm version

See merge request bloodyhealth/drip!403
2022-06-19 18:35:24 +00:00
Sofiya Tepikin 33a657cda4 Regenerate package-lock.json with correct npm version 2022-06-19 18:35:24 +00:00
Sofiya Tepikin 229f864b54 Update .gitlab-ci.yml file 2022-06-19 17:52:02 +00:00
bl00dymarie 09c808f99b Merge branch 'chore/realm-upgrade' into 'master'
Chore/realm upgrade

See merge request bloodyhealth/drip!393
2022-06-19 17:04:30 +00:00
Maria Zadnepryanets 37b607aee2 Bump up the node version of the image in the CI pipline 2022-06-19 19:01:50 +02:00
bl00dymarie f56b94463f Merge branch 'Fix/rename-drip-for-ios' into 'master'
Rename drip to drip.

See merge request bloodyhealth/drip!400
2022-06-19 15:51:34 +00:00
bl00dymarie c2af69cfec Revert README changes 2022-06-19 15:04:05 +00:00
BloodyMarie 8b3a5359e8 Rename to drip. 2022-06-19 16:57:11 +02:00
BloodyMarie 670857f5ff Rename drip to drip. 2022-06-19 16:41:52 +02:00
bl00dymarie 52094573e2 Merge branch 'Fix/Switch-options-in-import-text' into 'master'
Fix: Switch button order to match explainer text

See merge request bloodyhealth/drip!397
2022-06-19 13:34:47 +00:00
bl00dymarie 1f3cdb9438 Merge branch 'chore/start-on-xcode13' into 'chore/realm-upgrade'
Chore/start on xcode13

See merge request bloodyhealth/drip!394
2022-05-26 13:51:33 +00:00
BloodyMarie 6b5ed65e90 Switch button order to match explainer text 2022-05-26 14:22:55 +02:00
Sofiya Tepikin 9940c2c46e Map realm object on the export only 2022-05-01 16:33:57 +02:00
bl00dymarie f7fc81d865 Merge branch '542-bug-styling' into 'master'
Resolve "Bug: Styling"

Closes #542

See merge request bloodyhealth/drip!391
2022-04-30 16:37:49 +00:00
mashazyu 10b9ec8818 Pachage-lock.json update after rebase 2022-04-25 22:05:59 +02:00
mashazyu 712f65e001 Make app buils on Xcode13 2022-04-25 21:59:25 +02:00
Sofiya Tepikin 7d109878fc Fix sex, mood & pain symptoms not showing data on the overview 2022-04-24 22:04:10 +02:00
Sofiya Tepikin bce21ff9a9 Fix when the object from db is empty 2022-04-24 21:48:36 +02:00
Sofiya Tepikin 95b0cc5059 Update readme 2022-04-23 22:17:12 +02:00
Sofiya Tepikin f0e6cae055 Update realm version 3.6.5 -> 10.16.0 2022-04-23 22:16:32 +02:00
BloodyMarie dea67c88f5 Chart styling adaption: Temporarily disbale temp scale settings 2022-04-19 23:20:43 +02:00
BloodyMarie 8a29f08dca Cycle Day styling improvements 2022-04-19 22:40:41 +02:00
BloodyMarie 655f6b31d8 Cycle day styling: Remove new line for better display of mucus 2022-04-19 22:40:41 +02:00
BloodyMarie 0cebe910c4 Remove idle code 2022-04-19 22:40:41 +02:00
BloodyMarie 77c7a57463 Stats styling improvement 2022-04-18 19:50:36 +02:00
bl00dymarie 342f9798b2 Merge branch 'Fix-title-for-picker' into 'master'
Fix: Specify the title for timePicker in IOS

See merge request bloodyhealth/drip!387
2022-04-15 21:22:03 +00:00
bl00dymarie 9cfc93cd8e Merge branch '539-bug-values-for-sex-mood-pain-symptom-boxes-on-overviews-are-not-shown' into 'master'
Revert "Update realm version 3.6.5 -> 5.0.9"

Closes #539

See merge request bloodyhealth/drip!386
2022-04-15 19:45:13 +00:00
BloodyMarie 977ed07d97 Add picker title to labels 2022-04-15 21:40:14 +02:00
BloodyMarie 1813bf82f9 Fix: Specify the title for timePicker in IOS 2022-04-15 21:29:36 +02:00
bl00dymarie 9b5a717c7d Merge branch '540-Temperature-value-cannot-be-entered-with-comma' into 'master'
Resolve "Bug: Temperature value cannot be entered with comma"

Closes #540

See merge request bloodyhealth/drip!390
2022-04-15 19:23:04 +00:00
bl00dymarie 76f81841f4 Merge branch '537-bug-temperature-reminder-on-ios' into 'master'
Fix: Target reminder with correct id

Closes #537

See merge request bloodyhealth/drip!389
2022-04-15 17:29:19 +00:00
Lisa Hillebrand 585017eadd 540 Refactor temperature to functional component 2022-04-15 19:03:18 +02:00
Lisa Hillebrand fe9d9b4fdc 540 Rename method to get previous temperature 2022-04-15 17:41:53 +02:00
bl00dymarie a37607eae6 fix indentation 2022-04-15 14:06:06 +00:00
bl00dymarie 54bc836811 fix indentation 2022-04-15 14:05:41 +00:00
BloodyMarie 992161e3ce Implement review feedback 2022-04-15 16:03:17 +02:00
Lisa 534f554986 Merge branch 'chore/Swap-icon-for-learn-more' into 'master'
Chore: exchange icons for learn more

See merge request bloodyhealth/drip!388
2022-04-15 13:47:33 +00:00
BloodyMarie 407fa834ab Make temp reminder work for android & ios 2022-04-11 22:22:55 +02:00
BloodyMarie 16d2afaf1e Fix: Target reminder with correct id 2022-04-10 23:04:09 +02:00
BloodyMarie 765a8ae3b2 Chore: exchange icons for learn more 2022-04-10 21:23:12 +02:00
BloodyMarie 0eb3c93a17 Revert "Update readme and engines definition in package.json"
This reverts commit cce8e4ef0e.
2022-03-28 00:35:10 +02:00
BloodyMarie 96d7deb47c Revert "Update realm version 3.6.5 -> 5.0.9"
This reverts commit 7d6a577eeb.
2022-03-28 00:34:33 +02:00
bl00dymarie 2a49e43065 Merge branch 'chore/update-styling' into 'master'
Chore/update styling

See merge request bloodyhealth/drip!374
2022-03-26 12:15:59 +00:00
bl00dymarie 6aef594b29 Adding paddingTop to title of symptom box 2022-03-26 13:13:27 +01:00
MariaZ eb53b8b87e Return some button styling to fix button display on simptom edit 2022-03-26 13:13:27 +01:00
MariaZ f34df0233c Increase box size and change back number of lines to display to 4 2022-03-26 13:13:27 +01:00
MariaZ 37e1d54358 More fine-tuning of calendar and symptom box 2022-03-26 13:13:27 +01:00
MariaZ 7faa18bd60 Remove fontratio (I think we don't need it any more) 2022-03-26 13:13:27 +01:00
MariaZ 3c02dd77bb Update buttons styling to make them not that horizontally big 2022-03-26 13:13:27 +01:00
MariaZ 272b1f387d Font size fine-tuning 2022-03-26 13:13:27 +01:00
MariaZ c5aaf1b29b Add note to remove images fix after RN update 2022-03-26 13:13:27 +01:00
MariaZ 2bbcadcf53 Elipsise date on day overview 2022-03-26 13:13:27 +01:00
MariaZ f4ef00d4ea Fix adding images to final build 2022-03-26 13:13:27 +01:00
MariaZ 953e080032 Fix symptom-box text overflow 2022-03-26 13:13:27 +01:00
MariaZ 10fdcecf61 Fix buttons on simptom edit view for small screens 2022-03-26 13:13:27 +01:00
MariaZ cfef925414 Fix styling 2022-03-26 13:13:27 +01:00
MariaZ 7cab47665f Fix today day styling in calendar 2022-03-26 13:13:27 +01:00
MariaZ 9fb08fb66f Fix linter errors 2022-03-26 13:13:27 +01:00
MariaZ 388985034f Update symptom box styling 2022-03-26 13:13:27 +01:00
MariaZ f842ebe13c Update stats page styling 2022-03-26 13:13:27 +01:00
MariaZ 070c1487af Install react-native-size-matters library for better layout 2022-03-26 13:13:27 +01:00
bl00dymarie a624b5c015 Merge branch '535-chore-remove-unsupported-platforms-for-gradle' into 'master'
Chore: Remove unspported platforms for gradle

Closes #535

See merge request bloodyhealth/drip!383
2022-03-26 10:54:00 +00:00
Lisa 7f945c9fdd Merge branch '432-button-for-email-contact-instead-of-hyperlink' into 'master'
Chore: Adds buttons instead of links to about

Closes #432

See merge request bloodyhealth/drip!384
2022-03-26 10:52:09 +00:00
BloodyMarie d6a18bb44d Remove unused file 2022-03-26 11:46:32 +01:00
bl00dymarie 09de52b5df Dot notation 2022-03-26 11:46:32 +01:00
bl00dymarie 1584d2d368 Dot notation 2022-03-26 11:46:32 +01:00
BloodyMarie d1ac12d165 Chore: Implement review feedback 2022-03-26 11:46:32 +01:00
bl00dymarie 03b359019e Chore: Adds buttons instead of links to about 2022-03-26 11:46:29 +01:00
Lisa b93983243e Merge branch '511-use-translation-library-for-license-component' into 'master'
Use translation library for license component

Closes #511

See merge request bloodyhealth/drip!373
2022-03-26 10:21:26 +00:00
bl00dymarie 009b6b38e1 Correct email 2022-03-26 10:19:15 +00:00
bl00dymarie f462b349fc Merge branch 'chore/update-realm' into 'master'
Update realm version 3.6.5 -> 5.0.9

See merge request bloodyhealth/drip!380
2022-03-25 21:48:36 +00:00
bl00dymarie 64124c2fd5 Chore: Remove unspported platforms for gradle 2022-02-06 14:13:40 +01:00
Sofiya Tepikin cce8e4ef0e Update readme and engines definition in package.json 2022-01-23 17:41:50 +01:00
Sofiya Tepikin 7d6a577eeb Update realm version 3.6.5 -> 5.0.9 2022-01-23 17:40:26 +01:00
Lisa dc8f829d34 Merge branch '518-replace-deprecated-babel-parser-for-eslint' into 'master'
518 Replace deprecated eslint parser

Closes #518

See merge request bloodyhealth/drip!378
2021-12-01 10:50:18 +00:00
Lisa Hillebrand 1f5ba4de12 518 Run eslint on missing directories 2021-11-28 16:16:35 +01:00
Lisa Hillebrand fbc561622c 518 Update eslint config 2021-11-28 16:11:15 +01:00
Lisa Hillebrand 426d35ab78 518 Replace deprecated eslint parser 2021-11-28 16:10:48 +01:00
Maria Zadnepryanets 1ec6fd9296 Merge branch 'master' into 'master'
Update README.md to linkt to Version 8 instread of Version 5

See merge request bloodyhealth/drip!379
2021-11-28 13:10:14 +00:00
bkqtnte10 a53c8ce4f7 Update README.md to linkt to Version 8 instread of Version 5 2021-10-20 05:33:54 +00:00
Sofiya Tepikin c6ffdaa46e Merge branch '517-Install-husky-and-prettier-to-format-staged-files' into 'master'
Install husky and prettier to format staged files

Closes #517

See merge request bloodyhealth/drip!377
2021-09-19 14:11:59 +00:00
Lisa 3625d5a4bb Install husky and prettier to format staged files 2021-09-19 14:11:59 +00:00
Maria Zadnepryanets 50d01cbaa4 Merge branch 'chore/add-dependabot-to-repo' into 'master'
Adds dependabot to repo

See merge request bloodyhealth/drip!375
2021-09-19 13:18:46 +00:00
bl00dymarie 1e734082af Merge branch 'chore/update-readme' into 'master'
Add info on nvm requirement and xcode 12.5 fix

See merge request bloodyhealth/drip!372
2021-09-19 12:46:26 +00:00
Maria Zadnepryanets 449c84e75e Add info on nvm requirement and xcode 12.5 fix 2021-09-19 12:46:26 +00:00
bl00dymarie f282e24308 Merge branch 'feature/add-toast-on-ios' into 'master'
Feature: add toast on ios

Closes #321

See merge request bloodyhealth/drip!370
2021-09-19 10:07:58 +00:00
bl00dymarie d1efd1d587 Merge branch '510-replace-metadata-folder-with-redesigned' into 'master'
Resolve "Replace metadata folder with redesigned"

Closes #510

See merge request bloodyhealth/drip!368
2021-09-05 12:17:24 +00:00
MariaZ 4d32c523ff Adds dependabot config 2021-08-29 20:18:51 +02:00
MariaZ d2a452e3c9 Add toast to saving/deleting symptom data 2021-08-29 14:08:37 +02:00
MariaZ 4bff5a3d68 Move toast showing function to helper 2021-08-29 14:03:29 +02:00
MariaZ 233d14968d Package-lock.json commit 2021-08-20 20:10:00 +02:00
Lisa Hillebrand 9596f8e52f 511 Use translation function in license components 2021-08-15 17:37:22 +02:00
Lisa Hillebrand 4f93d30872 511 Rename component 2021-08-15 16:57:04 +02:00
MariaZ f188f018b9 Refactor existing Toast 2021-08-15 16:15:10 +02:00
MariaZ 65d0e4f3a1 Install react-native-simple-toast 2021-08-15 16:07:04 +02:00
emelko c60347badf Update phone screenshots 2021-08-15 14:05:30 +02:00
emelko 6c1fa662f9 Update description text 2021-08-15 14:05:30 +02:00
emelko 0bf7f2525e Update icon and banner 2021-08-15 14:05:30 +02:00
Maria Zadnepryanets 7c70f7454e Merge branch 'chore/add-react-native-clean-project' into 'master'
Chore: add react native clean project

Closes #431

See merge request bloodyhealth/drip!367
2021-08-15 11:56:09 +00:00
Maria Zadnepryanets 4fedb1928c Chore: add react native clean project 2021-08-15 11:56:09 +00:00
Maria Zadnepryanets 87a68ba9c5 Merge branch 'chore/add-instructions-for-ios' into 'master'
Chore: adds instructions on how to run app on ios to readme

Closes #333

See merge request bloodyhealth/drip!358
2021-08-06 15:02:18 +00:00
Maria Zadnepryanets 4b06f03aec Chore: adds instructions on how to run app on ios to readme 2021-08-06 15:02:15 +00:00
Maria Zadnepryanets 948c7c0b24 Merge branch 'ios-launch-screen-and-icons' into 'master'
iOS assets: icons & launch screen

See merge request bloodyhealth/drip!365
2021-08-06 14:58:57 +00:00
sdvig 40083d819f Add ios icons and launch screen 2021-07-30 16:45:57 +02:00
bl00dymarie c5162beb3b Update Twitter handle 2021-07-30 12:12:33 +00:00
Lisa f65d06edb3 Update README.md 2021-06-18 12:07:17 +00:00
bl00dymarie e08c6be97c Merge branch 'weblate-drip-test-component' into 'master'
Translations update from Weblate

See merge request bloodyhealth/drip!362
2021-06-18 11:44:51 +00:00
bl00dymarie ea669c1fac Added translation using Weblate (German) 2021-06-18 13:33:17 +02:00
bl00dymarie 940c7806ee Merge branch '162-Prepare-localization' into 'master'
Resolve "Prepare localization"

Closes #162

See merge request bloodyhealth/drip!361
2021-06-18 11:11:28 +00:00
Lisa Hillebrand 8b8ae0d436 162 Update structure of english translation file 2021-06-18 11:37:00 +02:00
Lisa Hillebrand 3fd9cc0e02 162 Fix lint issue 2021-05-02 22:17:41 +02:00
Lisa Hillebrand 1514e21726 162 Remove component path from translation key 2021-05-02 22:02:07 +02:00
Lisa Hillebrand 0b447178c5 162 Use hook to merge component path with translation key 2021-05-02 21:45:46 +02:00
Lisa Hillebrand f3cabe5ca1 162 Use translation function in home component 2021-05-02 21:35:30 +02:00
Lisa Hillebrand e0f64173bf 162 Refactor Home component to functional component 2021-05-02 21:19:45 +02:00
Lisa Hillebrand 36ce29c346 162 Uppercase home component name 2021-05-02 21:09:21 +02:00
Lisa Hillebrand 4676c50504 162 Add configuration for i18next 2021-05-02 20:51:15 +02:00
Lisa Hillebrand 886a952e53 162 Install dependencies for i18next 2021-05-02 20:48:38 +02:00
Sofiya Tepikin 5b1544c8f4 Merge branch 'feature/ios-launch' into 'master'
Feature/ios launch

See merge request bloodyhealth/drip!351
2021-05-02 16:31:18 +00:00
Sofiya Tepikin f0155b342f Feature/ios launch 2021-05-02 16:31:17 +00:00
Maria Zadnepryanets e532c3d94c Merge branch 'upgrade-rn-and-friends' into 'master'
Upgrade RN and friends

Closes #491

See merge request bloodyhealth/drip!336
2021-04-18 12:55:22 +00:00
Sofiya Tepikin 2535d056b7 Upgrade RN and friends 2021-04-18 12:55:21 +00:00
Maria Zadnepryanets 9ff117ce4d Merge branch '402-give-export-file-more-specific-name' into 'master'
Give exported csv drip-data name

Closes #402

See merge request bloodyhealth/drip!359
2021-04-11 13:22:00 +00:00
emelko 78e4d109c7 Give exported csv drip-data name 2021-03-17 22:12:24 +01:00
bl00dymarie aa2de9e335 Update CONTRIBUTING.md 2021-03-13 17:30:02 +00:00
bl00dymarie e78337a8b3 Update CONTRIBUTING.md 2021-03-13 17:17:48 +00:00
bl00dymarie 448e0a8476 Merge branch 'Release-1.2102.28' into 'master'
Release: 1.2102.28

See merge request bloodyhealth/drip!357
2021-02-28 16:51:08 +00:00
emelko b1d35afc87 Adding back detox 2021-02-28 17:40:31 +01:00
emelko 50a16ee0dd Release: 1.2102.28 2021-02-28 17:09:13 +01:00
bl00dymarie d67c912e1d Merge branch '478-bug-fertility-text-on-home-page-not-correct' into 'master'
Resolve "Bug: fertility text on home page not correct"

Closes #478

See merge request bloodyhealth/drip!355
2021-02-28 16:05:01 +00:00
emelko 5ca129fd47 Adds flexWrap 'wrap' to phase text 2021-02-28 17:03:18 +01:00
emelko 2d4aa722c9 Less space for title 2021-02-20 15:02:39 +01:00
emelko 3d4a3ea7bf Remove wiki link 2021-02-20 15:01:54 +01:00
emelko df732e5acc Adds text for end of 2nd phase before infertility 2021-02-20 13:56:58 +01:00
bl00dymarie 19942d3afc Merge branch 'chore/fix-styling' into 'master'
Chore/fix styling

See merge request bloodyhealth/drip!353
2021-02-17 22:39:40 +00:00
bl00dymarie 8065dad6a0 Merge branch 'p_doub-master-patch-69749' into 'master'
Very small fixes in the README

See merge request bloodyhealth/drip!352
2021-02-14 22:24:25 +00:00
MariaZ 5325f071bd Remove detox for now to fix npm i errors 2021-02-14 20:07:45 +01:00
MariaZ a261154889 Fixes SymptomEditView centering 2021-02-14 19:42:47 +01:00
MariaZ 176b60be89 Update stats layout 2021-02-14 19:42:33 +01:00
Pascal Wengerter 3e918226d2 Very small fixes in the README 2021-01-29 10:18:04 +00:00
Sofiya Tepikin d2b7577fba Merge branch 'fix/incorrect-password-error-not-showing-on-login-screen' into 'master'
Fix/incorrect password error not showing on login screen

Closes #494

See merge request bloodyhealth/drip!349
2021-01-23 12:04:30 +00:00
Maria Zadnepryanets dd18611498 Fix/incorrect password error not showing on login screen 2021-01-23 12:04:30 +00:00
Sofiya Tepikin aa0e5b6836 Merge branch 'fix/bottom-padding-after-input-field' into 'master'
Fix/bottom padding after input field

Closes #493

See merge request bloodyhealth/drip!350
2021-01-23 11:53:34 +00:00
Maria Zadnepryanets 659eb8da31 Fix/bottom padding after input field 2021-01-23 11:53:34 +00:00
Sofiya Tepikin 03905be5f1 Merge branch '490-change-default-temperature-range-to-36-37-5' into 'master'
Changes temp range and default values

Closes #490

See merge request bloodyhealth/drip!348
2021-01-23 10:35:59 +00:00
bl00dymarie 6f36428fd2 Changes temp range and default values 2021-01-23 10:35:59 +00:00
Sofiya Tepikin fcde07f2f5 Merge branch 'fix/invalid-temperature-input' into 'master'
Block invalid input of temperature value

Closes #488

See merge request bloodyhealth/drip!335
2021-01-22 18:17:17 +00:00
Sofiya Tepikin 9dee0bd443 Block invalid input of temperature value 2021-01-13 21:14:06 +01:00
Sofiya Tepikin f1f18e6f93 Merge branch 'Update-tag-creation' into 'master'
Stable release 1.2101.9

See merge request bloodyhealth/drip!334
2021-01-09 16:59:27 +00:00
Sofiya Tepikin 3efc4efcad Merge branch 'rebased-redesign' into 'master'
Rebased redesign

See merge request bloodyhealth/drip!305
2021-01-09 16:57:07 +00:00
emelko 8721a87bb7 Manual version code update to 7 2021-01-09 01:10:56 +01:00
emelko f829b371e6 Release: 1.2101.9 2021-01-09 00:42:11 +01:00
emelko 8e73a64397 Update createVersion tag for production releases 2021-01-08 23:13:50 +01:00
bl00dymarie 199aa198d1 Merge branch 'Add-lisa' into 'rebased-redesign'
Add Lisa as condriputor <3

See merge request bloodyhealth/drip!333
2021-01-08 18:44:37 +00:00
emelko 7616d79687 Add Lisa as condriputor <3 2021-01-08 18:17:49 +01:00
bl00dymarie 83b80e5623 Merge branch '484-update-text-in-app' into 'rebased-redesign'
Adds updated text about credits.

See merge request bloodyhealth/drip!332
2021-01-08 16:47:20 +00:00
emelko 9aba800119 Better wording for prediction text 2021-01-08 17:45:28 +01:00
emelko e5d2a7e4cf Fix drip typo 2021-01-08 17:39:14 +01:00
Sofiya Tepikin 5856dca47b Merge branch 'fix-chart-date-label' into 'rebased-redesign'
Fixes the date label on chart from breaking

See merge request bloodyhealth/drip!331
2021-01-08 16:34:00 +00:00
Sofiya Tepikin e61f8c9483 Fixes the date label on chart from breaking 2021-01-08 16:34:00 +00:00
emelko 5fc2320afe Adds updated text about credits. 2021-01-08 17:25:29 +01:00
Sofiya Tepikin 9a87bf760c Merge branch 'notification-icon' into 'rebased-redesign'
Adds missing notification icon

See merge request bloodyhealth/drip!330
2021-01-08 12:36:58 +00:00
Sofiya Tepikin a51e485545 Adds missing notification icon 2021-01-06 20:11:55 +01:00
Sofiya Tepikin 0d821c7b39 Merge branch 'drip-new-icon' into 'rebased-redesign'
Changes the icon

See merge request bloodyhealth/drip!329
2021-01-03 15:49:45 +00:00
Sofiya Tepikin 97d9e8bd25 Changes the icon 2021-01-03 16:26:07 +01:00
Sofiya Tepikin 3b576e8173 Merge branch 'Add-back-computed-mucus-value' into 'rebased-redesign'
Adds back computed mucus value to be saved

See merge request bloodyhealth/drip!328
2021-01-03 14:13:51 +00:00
emelko 68ef06b93e Adds back computed mucus value to be saved 2021-01-03 15:10:44 +01:00
Sofiya Tepikin a35d757f84 Merge branch 'fix-chart-dots-and-lines' into 'rebased-redesign'
Fix chart dots and lines

See merge request bloodyhealth/drip!327
2021-01-03 12:36:37 +00:00
Sofiya Tepikin 2fb20c0031 Fix chart dots and lines 2021-01-03 12:36:37 +00:00
Maria Zadnepryanets 17266d46dd Merge branch 'fix-highest-scale-value' into 'rebased-redesign'
Fixes error on highes/lowest scale values

See merge request bloodyhealth/drip!326
2020-12-30 17:43:14 +00:00
Sofiya Tepikin 7aff04946e Fixes error on highes/lowest scale values 2020-12-30 18:35:33 +01:00
bl00dymarie 45bc9f6c51 Merge branch '468-removes-extra-grid-line-on-temperature-chart' into 'rebased-redesign'
Fixes extra horizontal grid line on chart

See merge request bloodyhealth/drip!325
2020-12-30 17:04:33 +00:00
mashazyu 97ff3deac3 Fixes extra horizontal grid line on chart 2020-12-30 17:32:34 +01:00
Sofiya Tepikin 08d18c1241 Merge branch 'Adjust-font-colors-of-marked-days-in-calendar' into 'rebased-redesign'
Change font color of marked calendar days

See merge request bloodyhealth/drip!323
2020-12-30 15:07:03 +00:00
Lisa af5c24c466 Change font color of marked calendar days 2020-12-30 15:07:03 +00:00
bl00dymarie 6a7323269a Merge branch '466-bug-temp-hint-for-too-high-or-low-value-shows-at-the-start' into 'rebased-redesign'
No warning msg if there is no temp data

See merge request bloodyhealth/drip!322
2020-12-29 11:12:29 +00:00
emelko 4e6653c54c Check for falsy value 2020-12-22 22:30:54 +01:00
bl00dymarie ab1acf21ba Merge branch '438-stats-page-tuning' into 'rebased-redesign'
Resolve "Stats"

See merge request bloodyhealth/drip!316
2020-12-20 19:11:03 +00:00
Maria Zadnepryanets d25af176d3 Resolve "Stats" 2020-12-20 19:11:03 +00:00
Sofiya Tepikin d375645316 Merge branch '460-fix-note-focus' into 'rebased-redesign'
Adds padding between keyboard and text input

See merge request bloodyhealth/drip!320
2020-12-20 16:26:32 +00:00
mashazyu 80cc9bc73d Update AppTextInput behavior, when Keyboard is visible 2020-12-20 17:20:55 +01:00
emelko 8f6ae97ef9 No warning msg if there is no temp data 2020-12-20 17:18:17 +01:00
Maria Zadnepryanets 8715f53140 Merge branch '464-bug-password-is-shown-in-plain-text' into 'rebased-redesign'
Resolve "Bug: Password is shown in plain text"

See merge request bloodyhealth/drip!321
2020-12-20 12:10:10 +00:00
emelko b00b97d411 Add secureTextEntry to password AppTextInput 2020-12-20 13:06:53 +01:00
Sofiya Tepikin 748b5bcbd1 Merge branch 'Bug-android-back-button-when-navigating-away-from-settings' into 'rebased-redesign'
Fix error occurring when navigating back from settings section

See merge request bloodyhealth/drip!319
2020-12-20 10:48:56 +00:00
Lisa 9e907dad0b Fix error occurring when navigating back from settings section 2020-12-20 10:48:56 +00:00
bl00dymarie 08e01346f3 Merge branch '434-home-page-tuning' into 'rebased-redesign'
Resolve "Redesign fix: Homepage fix"

See merge request bloodyhealth/drip!315
2020-12-20 10:38:11 +00:00
Maria Zadnepryanets ada60a745b Resolve "Redesign fix: Homepage fix" 2020-12-20 10:38:11 +00:00
mashazyu 59aef1126d Updates styling of Stats page 2020-12-13 18:02:39 +01:00
Lisa Hillebrand 8145619f28 Fix error occurring when navigating back from settings section 2020-12-13 18:02:39 +01:00
mashazyu c00e3f2bef Adds padding between keyboard and text input 2020-12-13 18:02:39 +01:00
Maria Zadnepryanets ead6db12a9 Merge branch 'fix-temp-edit-redirect' into 'rebased-redesign'
Fix redirect to TemperatureEditView from reminder

See merge request bloodyhealth/drip!318
2020-12-13 16:15:22 +00:00
Sofiya Tepikin 60cde25f76 Fix redirect to TemperatureEditView from reminder 2020-12-13 15:55:22 +01:00
bl00dymarie 9c9d06f192 Merge branch 'fix-ordinal-suffix' into 'rebased-redesign'
Fix ordinal suffix for numbers greater than 10

See merge request bloodyhealth/drip!306
2020-12-13 13:26:35 +00:00
bl00dymarie d47ae0de0e Merge branch '440-cycle-overview-page-limit-note-size-to-display' into 'rebased-redesign'
Limit line length on text of symptom box

See merge request bloodyhealth/drip!314
2020-12-13 12:20:37 +00:00
bl00dymarie 44b916354d Merge branch '439-settings-menu-update' into 'rebased-redesign'
Updates settings menu styling

See merge request bloodyhealth/drip!317
2020-12-13 12:13:05 +00:00
mashazyu 42bf02a0c7 Updates settings menu styling 2020-12-05 20:45:01 +01:00
Sofiya Tepikin 72bcd34272 Fixes ordinal number suffix on chart date labels 2020-12-05 19:31:30 +01:00
bl00dymarie 89ff4b2cdc Merge branch '449-change-crossed-out-text-for-excluded-values-on-cycle-day-overview' into 'rebased-redesign'
Remove line-through textDecoration for excluded values

See merge request bloodyhealth/drip!312
2020-12-05 11:48:34 +00:00
bl00dymarie 8f34cbc260 Merge branch '458-pont-8-not-shown-in-chart' into 'rebased-redesign'
Resolve "38.8 is not shown on a chart"

See merge request bloodyhealth/drip!313
2020-12-05 11:48:20 +00:00
emelko 295e751217 Limit line length on text of symptom box 2020-12-05 12:47:28 +01:00
mashazyu 45da01ba07 Fixes bug when .8 and .3 labels are not shown in chart 2020-12-05 12:33:11 +01:00
Sofiya Tepikin c270c7a55f Add tests to the getOrdinalSuffix function 2020-12-05 12:12:19 +01:00
Sofiya Tepikin f9eb06f197 Make use of formatWithOrdinalSuffix function 2020-12-05 12:12:19 +01:00
Sofiya Tepikin 9d3c332453 Fix getOrdinalSuffix and add a formatting function 2020-12-05 12:12:19 +01:00
Julia Friesel e5418c32e2 Fix ordinal suffix for numbers greater than 10 2020-12-05 12:12:19 +01:00
emelko fbfc4d6621 Remove line-through textDecoration for excluded values 2020-12-05 12:10:33 +01:00
Sofiya Tepikin 77908afd60 Merge branch '437-cycle-day-overview-fix' into 'rebased-redesign'
Resolve "Cycle day overview"

See merge request bloodyhealth/drip!307
2020-12-05 11:08:57 +00:00
Maria Zadnepryanets 750ceeaaf4 Resolve "Cycle day overview" 2020-12-05 11:08:57 +00:00
Maria Zadnepryanets 5af29f9628 Merge branch '436-chart-fix' into 'rebased-redesign'
Resolve "Chart"

See merge request bloodyhealth/drip!308
2020-12-05 10:15:12 +00:00
Maria Zadnepryanets cf63fbb37c Resolve "Chart" 2020-12-05 10:15:12 +00:00
Maria Zadnepryanets 1f83621e7d Merge branch 'Make-clickable-areas-bigger' into 'rebased-redesign'
Increase hitSlop of menu icon and navigation arrows

See merge request bloodyhealth/drip!309
2020-12-05 10:08:24 +00:00
Lisa 3778c1454f Increase hitSlop of menu icon and navigation arrows 2020-12-05 10:08:24 +00:00
Maria Zadnepryanets 59ee05eb1f Merge branch 'fix-dev-tools' into 'rebased-redesign'
Fixes the dev tools

See merge request bloodyhealth/drip!311
2020-11-18 18:15:58 +00:00
Sofiya Tepikin 7916bae848 Roll back alert dialog styling 2020-11-16 20:41:24 +01:00
emelko b429954ad2 Update home page with more color contrast for grey 2020-09-20 15:53:34 +02:00
emelko 4f4dc85f8c Sets calendar pastScrollRange to 10 years 2020-09-20 15:02:51 +02:00
emelko 6de05f0d70 Fix unlocking app with password 2020-09-20 14:49:17 +02:00
Sofiya Tepikin 99a2bf256d Fix linter issue 2020-08-22 14:19:29 +02:00
Sofiya Tepikin 14c2d17a20 Fix react-native-vector-icon 2020-08-22 14:13:52 +02:00
Sofiya Tepikin b91547032d Fix styles issue 2020-08-22 14:13:27 +02:00
bl00dymarie 0451b078ad Update README.md 2020-08-22 12:00:52 +00:00
Maria Zadnepryanets 5a555f5965 Calendar redesign 2020-08-22 13:08:24 +02:00
Maria Zadnepryanets 885da5c293 Symptom view redesign 2020-08-22 13:08:23 +02:00
Maria Zadnepryanets ef16cfd041 Redesign chart 2020-08-22 13:06:50 +02:00
mashazyu 550b1e6314 Post-review updates 2020-08-22 13:06:50 +02:00
mashazyu 0c3bfdfced Fix after rebase 2020-08-22 13:06:50 +02:00
mashazyu c367a1e233 Introduces RN Alert component styling update 2020-08-22 13:06:50 +02:00
mashazyu 3d2d659b54 Introduces PasswordPrompt component redesign 2020-08-22 13:06:50 +02:00
mashazyu cbe9f3947d Adds isSideMenuEnabled prop to Header component 2020-08-22 13:06:50 +02:00
mashazyu 1f5d869b17 Adds contentContainerStyle prop to AppPage component 2020-08-22 13:06:50 +02:00
mashazyu 9d6c0aa65c Introduces Stats page redesign 2020-08-22 13:06:50 +02:00
mashazyu fe5f734cff Refactors AppText and Segment components 2020-08-22 13:06:50 +02:00
mashazyu 111475b2e3 Introduces License page redesign 2020-08-22 13:06:50 +02:00
mashazyu c2e7bf8761 Updates SymptomSection component to fix lint rule 2020-08-22 13:06:50 +02:00
mashazyu 579c4af869 Styling fix of DataManagement component 2020-08-22 13:06:50 +02:00
mashazyu 7afaa1e156 Adds disabled prop to Button, style change name in AppSwitch component 2020-08-22 13:06:50 +02:00
mashazyu 61ca71fd1f Fixes AppLoadingView component centering 2020-08-22 13:06:50 +02:00
mashazyu bba25aeaac Sets default button type to small and moves action names to config file 2020-08-22 13:06:50 +02:00
mashazyu 45cff710c8 Separates TemperatureSlider component, adds minor post-review changes 2020-08-22 13:06:50 +02:00
mashazyu 42bc91d9c2 Removes extra space 2020-08-22 13:06:50 +02:00
mashazyu 6c89e642b4 Updates variable name to improve code readibility 2020-08-22 13:06:50 +02:00
mashazyu 9d7121f5d6 Updates button activity definition when entering new password 2020-08-22 13:06:50 +02:00
mashazyu eff15e67ee Introduces style definition update of Button component 2020-08-22 13:06:50 +02:00
mashazyu 1575aa29cd Separates TemperatureReminder component 2020-08-22 13:06:50 +02:00
mashazyu 08deb87df4 Introduces NFP section redesign, upgrades slider version 2020-08-22 13:06:50 +02:00
mashazyu f2706f509a Introduces data management section redesign 2020-08-22 13:05:17 +02:00
mashazyu a68ec248b0 Introduces password management section redesign 2020-08-22 13:05:17 +02:00
mashazyu 842e8a2a24 Introduces AppTextInput and Button components styling update 2020-08-22 13:05:17 +02:00
mashazyu c090e14835 Introduces Reminders page redesign 2020-08-22 13:05:17 +02:00
mashazyu 29d76d19b1 Introduces Home component redesign 2020-08-22 13:05:17 +02:00
mashazyu b6c0fd0dce SideMenu fix 2020-08-22 13:05:17 +02:00
mashazyu 1077f878ae AppIcon fix 2020-08-22 13:05:17 +02:00
mashazyu cec8dbaf38 Introduces bottom menu redesign (Menu component) 2020-08-22 13:05:17 +02:00
mashazyu b9d85042ef AppIcon props update 2020-08-22 13:05:17 +02:00
mashazyu f0caffacdd Moves MenuItem component from Header to separate file, naming update 2020-08-22 13:05:17 +02:00
mashazyu bf4446c742 Moves Logo component to separate file 2020-08-22 13:05:17 +02:00
mashazyu 4d6f0db30a Moves Segment stiles to local file, separates MenuItem component. 2020-08-22 13:05:17 +02:00
mashazyu ce92b0af33 Introduces Header redesign along with some global styles changes 2020-08-22 13:05:17 +02:00
mashazyu e101ecb8d1 Introduces SettingsMenu component redesign 2020-08-22 13:05:17 +02:00
mashazyu e609d51528 Removes unnecessary spaces 2020-08-22 13:05:17 +02:00
mashazyu e80d8880b0 Moves unique styles of AppPage component to local file 2020-08-22 13:05:17 +02:00
mashazyu 3de92b9f77 Moves unique styles of AppTextInput to local file and does some cleanup 2020-08-22 13:05:17 +02:00
mashazyu 652bc1ffe2 Moves unique styles of Button component from common to local file 2020-08-22 13:05:17 +02:00
mashazyu 1a46e1bb2e Moves unique style of Link component from common to local file 2020-08-22 13:05:17 +02:00
mashazyu fb519c4380 Moves unique styles of Segment component from common files to local one 2020-08-22 13:05:17 +02:00
mashazyu 78d4077fb4 Renames FramedSegment to Segment 2020-08-22 13:05:17 +02:00
mashazyu 6fb1c7cce9 Fix color naming 2020-08-22 13:05:17 +02:00
mashazyu 4f30db69f3 Introduces License and About components redesign 2020-08-22 13:05:17 +02:00
mashazyu 3f8f6dbbe6 Introduces AppLoading, AppTextInput, Button components redesign 2020-08-22 13:05:17 +02:00
mashazyu 8c1c72ccc9 Introduces AppText, Link and FramedSegment redesign 2020-08-22 13:05:17 +02:00
mashazyu 1fc7bc17b9 AppLoading/AppText/AppTextInput/Button/FramedSegment/Link -> ./common 2020-08-22 13:05:17 +02:00
mashazyu d3e795a51f Forbids landscape orientation for app 2020-08-22 13:05:17 +02:00
Sofiya Tepikin 4f736d5fe2 Adds new font 2020-08-22 13:05:17 +02:00
bl00dymarie afb53a6f82 Update RELEASE.md 2020-08-01 12:14:03 +00:00
Sofiya Tepikin b798f12266 Update RELEASE.md 2020-08-01 11:58:15 +00:00
bl00dymarie 9d05b27d32 Update RELEASE.md 2020-08-01 11:56:38 +00:00
bl00dymarie 2f7aba0137 Update README.md 2020-08-01 11:51:58 +00:00
bl00dymarie 722981d224 Update README.md 2020-08-01 11:50:26 +00:00
bl00dymarie ab45d2f1ca Add new RELEASE file 2020-08-01 11:48:31 +00:00
Sofiya Tepikin b974ba1d7e Merge branch 'androidx-and-sdk29' into 'master'
Update sdk 28 -> 29 and migrate to androidx

See merge request bloodyhealth/drip!302
2020-08-01 11:47:33 +00:00
Sofiya Tepikin 9cf542f4b7 Update sdk 28 -> 29 and migrate to androidx 2020-08-01 11:47:33 +00:00
Sofiya Tepikin 06337a7356 Merge branch 'New-release-12-july-2020' into 'master'
Release: 0.2007.12-beta

See merge request bloodyhealth/drip!301
2020-08-01 11:39:17 +00:00
bl00dymarie 3ac28e527d Release: 0.2007.12-beta 2020-08-01 11:39:17 +00:00
bl00dymarie fd818404d4 Merge branch 'Adds-drips' into 'master'
Adds Mariya & Sofiya as contributors <3

See merge request bloodyhealth/drip!300
2020-07-12 17:17:20 +00:00
emelko a26080ad2a Adds arm64-v8a and x86_64 for supporting 64-bit architecture 2020-07-12 19:14:54 +02:00
emelko bef7b6ae54 Adds Mariya & Sofiya as contributors <3 2020-07-12 19:12:26 +02:00
Sofiya Tepikin 70c13387a9 Merge branch 'update-realm' into 'master'
Update realm version

See merge request bloodyhealth/drip!299
2020-07-12 17:06:22 +00:00
Sofiya Tepikin ef9e7c535b Add clearing of metro cache 2020-07-11 21:23:43 +02:00
Sofiya Tepikin 1d449252c0 Update realm to support 64bit 2020-07-11 21:23:23 +02:00
Maria Zadnepryanets 71247e1c7d Merge branch 'updated-package-lock' into 'master'
Update package-lock.json

See merge request bloodyhealth/drip!298
2020-07-11 11:25:32 +00:00
Sofiya Tepikin 8469edc573 Update package-lock.json 2020-07-11 13:22:35 +02:00
bl00dymarie a7aae0673e Merge branch 'Changes-year-in-copyright-text' into 'master'
Uses built-in JS functionality for getting currentYear, thanks to @sdvig

See merge request bloodyhealth/drip!296
2020-06-19 09:02:58 +00:00
emelko 9d137dfd3a Uses built-in JS functionality for getting currentYear, thanks to @sdvig 2020-06-19 11:00:48 +02:00
bl00dymarie 930ed3fdc5 Merge branch 'Changes-year-in-copyright-text' into 'master'
Sets current year instead of hard coded

See merge request bloodyhealth/drip!295
2020-06-19 08:51:47 +00:00
emelko 240c61e46e Sets current year instead of hard coded 2020-06-06 01:00:31 +02:00
bl00dymarie 0e1b95d313 Update README.md 2020-06-05 22:40:57 +00:00
bl00dymarie 880dd8b843 Update README.md 2020-06-05 19:48:20 +00:00
bl00dymarie 54b30ec229 Update README.md 2020-06-05 19:45:34 +00:00
bl00dymarie dc1164ef03 Update README.md 2020-06-05 19:44:09 +00:00
bl00dymarie be4f50c962 Update README.md 2020-06-05 19:43:38 +00:00
bl00dymarie 91bf76621a Update README.md 2020-06-05 19:43:07 +00:00
Maria Zadnepryanets 37c5821411 Update CHANGELOG.md 2020-05-02 17:33:33 +00:00
Maria Zadnepryanets 4442c229f7 Update CHANGELOG.md 2020-05-02 15:57:21 +00:00
bl00dymarie c0c025cd69 Merge branch 'bug-cannot-enter-note-in-future' into 'master'
Bug fix: allows to enter note in the future

See merge request bloodyhealth/drip!288
2020-05-02 15:22:18 +00:00
Sofiya Tepikin 41e2406727 Merge branch 'fix-go-back-bug' into 'master'
Fixes the error on app exiting on via the device back button

See merge request bloodyhealth/drip!291
2020-04-26 15:25:40 +00:00
Maria Zadnepryanets e11915460c Merge branch '306-chart-displays-sex-dot-even-if-only-contraceptive-options-are-saved' into 'master'
Chart doesn't display sex dot although contraception method 'other' has been already removed

Closes #306

See merge request bloodyhealth/drip!285
2020-04-25 18:13:13 +00:00
Sofiya Tepikin 1413525e91 Fixes the error on app exiting on via the device back button 2020-04-25 19:47:05 +02:00
bl00dymarie 1291fe70bc Merge branch 'patch-1' into 'master'
Update README.md with F-Droid and Google Play Badges

See merge request bloodyhealth/drip!289
2020-04-03 15:38:05 +00:00
Poussinou 908ae9a305 Update README.md 2020-04-03 13:17:16 +00:00
mashazyu 7d46706cf2 Allows to enter note in the future 2020-03-30 18:34:26 +02:00
bl00dymarie f987628ced Update CONTRIBUTING.md 2020-03-28 19:06:07 +00:00
bl00dymarie 052b9bd2aa Update CHANGELOG.md 2020-03-28 19:04:21 +00:00
Maria Zadnepryanets c7740c7c57 Merge branch 'chart-navigation-bug' into 'master'
Chart navigation bug fix.

See merge request bloodyhealth/drip!287
2020-03-28 17:03:41 +00:00
mashazyu 5ec5d02b8d Chart navigation bug fix. 2020-03-28 17:17:21 +01:00
Maria Zadnepryanets 075813c314 Merge branch 'fix-clear-command' into 'master'
Change clear to lowercase to make it case sensitive and executable

See merge request bloodyhealth/drip!286
2020-03-28 16:11:35 +00:00
emelko 098c0e69a5 Change clear to lowercase to make it case sensitive and executable 2020-03-28 17:09:01 +01:00
Cathrin Senst 02db9c1722 fix 306 by setting other-note empty as contraception method 'other' is deactivated 2020-03-28 14:21:34 +01:00
Sofiya Tepikin 297c1cf3d5 Merge branch '183-show-no-temperature-when-not-tracked' into 'master'
Resolve "don't show temperature chart part of chart when temp not tracked"

Closes #183

See merge request bloodyhealth/drip!257
2020-03-28 13:03:51 +00:00
Maria Zadnepryanets ee0b83d1ca Resolve "don't show temperature chart part of chart when temp not tracked" 2020-03-28 13:03:51 +00:00
bl00dymarie 620f5e77da Merge branch '414-bug-darker-color-in-dots-for-sex-and-desire-on-chart-is-missing' into 'master'
Bring in different shades for desire dots on chart

Closes #414

See merge request bloodyhealth/drip!265
2020-03-27 16:15:22 +00:00
emelko 268ec56c88 Bring in different shades for desire dots on chart 2020-03-26 23:30:50 +01:00
Maria Zadnepryanets 9235a57fd7 Merge branch 'cycle-module-tests-split' into 'master'
Splits the rest of the tests without modifying them

See merge request bloodyhealth/drip!274
2020-03-14 14:07:40 +00:00
Sofiya Tepikin c1959962d0 Splits the rest of the tests without modifying them 2020-03-14 14:46:35 +01:00
Maria Zadnepryanets 06edde5340 Merge branch 'get-cycles-before-test' into 'master'
Moves out the test for getCyclesBefore method of cycle module

See merge request bloodyhealth/drip!273
2020-03-14 13:17:30 +00:00
Sofiya Tepikin 5b2dc82218 Moves out the test for getCyclesBefore method of cycle module 2020-03-14 13:17:30 +00:00
Maria Zadnepryanets 9b4da9bd19 Merge branch 'get-previous-cycle-test' into 'master'
Moves out the test for getPReviousCycle method of cycle module

See merge request bloodyhealth/drip!272
2020-03-14 11:40:04 +00:00
Sofiya Tepikin 64a4c8c455 Moves out the test for getPReviousCycle method of cycle module 2020-03-14 11:40:04 +00:00
Sofiya Tepikin 95068e92c4 Merge branch 'lint-rule-react-prop-types-addition' into 'master'
Lint rule react prop types addition

See merge request bloodyhealth/drip!270
2020-03-11 20:19:45 +00:00
Maria Zadnepryanets 47379d7a1e Lint rule react prop types addition 2020-03-11 20:19:45 +00:00
Maria Zadnepryanets 3dbcb41d67 Merge branch 'fix-get-cycle-by-start-day' into 'master'
Adds test and fixes getCycleByStartDate method of cycle module

See merge request bloodyhealth/drip!269
2020-03-11 18:42:04 +00:00
Sofiya Tepikin 8444d466db Merge branch 'eslint-cleanup' into 'master'
Cleans up the eslint rules

See merge request bloodyhealth/drip!271
2020-03-07 09:41:46 +00:00
Sofiya Tepikin f9d2838008 Cleans up the eslint rules 2020-03-05 21:20:59 +01:00
Sofiya Tepikin 9e34c1b8b4 Adds test and fixes getCycleByStartDate method of cycle module 2020-03-05 19:31:52 +01:00
Maria Zadnepryanets e901cae0f5 Merge branch 'get-cycle-day-number-test' into 'master'
Moves out the tests for getCycleDayNumber and organises them

See merge request bloodyhealth/drip!268
2020-03-04 20:53:55 +00:00
Maria Zadnepryanets 21c5ac72a6 Merge branch 'symptom-views-clean-up' into 'master'
Symptom views clean up

See merge request bloodyhealth/drip!267
2020-03-04 20:52:41 +00:00
Sofiya Tepikin 0e0e00948f Moves out the tests for getCycleDayNumber and organises them 2020-03-03 22:13:53 +01:00
Sofiya Tepikin 407bc2e524 Adds propTypes definition 2020-03-03 21:39:14 +01:00
Sofiya Tepikin aab64a433f Gets rid of a top level prop passed down through a tree of components 2020-03-03 21:39:14 +01:00
Sofiya Tepikin 346d7e6dad Cleanups symptom view 2020-03-03 21:39:14 +01:00
Sofiya Tepikin 12b8e5c213 Removes unnecessary prop and defines the missing propTypes 2020-03-03 21:39:14 +01:00
Sofiya Tepikin 9ce7dbf6b6 Merge branch 'home-split' into 'master'
Home split

See merge request bloodyhealth/drip!266
2020-03-02 20:51:04 +00:00
Sofiya Tepikin a9333bd848 Adds propTypes definition 2020-02-29 12:59:17 +01:00
Sofiya Tepikin ec907ab23c Gets rid of the redundant state on Home 2020-02-29 12:55:58 +01:00
Sofiya Tepikin d5b1944988 Moves out home helpers from the component 2020-02-29 12:09:38 +01:00
Sofiya Tepikin 0a86f38472 Moves out HomeElement component 2020-02-29 12:09:38 +01:00
Sofiya Tepikin 49fedcc634 Moves out IconText component 2020-02-29 12:09:38 +01:00
Sofiya Tepikin af562e329c Merge branch 'fix-cycle-day-prop' into 'master'
Fix cycle day prop

See merge request bloodyhealth/drip!264
2020-02-29 11:07:57 +00:00
Julia Friesel 6badd97f2c Update .eslintrc 2020-02-29 07:22:01 +00:00
Sofiya Tepikin 1c0c2276de Resets the date in store for today date when navigating home 2020-02-26 21:11:56 +01:00
Sofiya Tepikin f789a7990f Sets initial value of date in the store 2020-02-26 21:11:56 +01:00
Sofiya Tepikin aa2165590b Removes redundant state and corrects the cycle day prop 2020-02-26 21:11:56 +01:00
Julia Friesel 17815fcefe Merge branch 'use-updated-sympto' into 'master'
Use updated sympto

Closes #409

See merge request bloodyhealth/drip!253
2020-02-25 06:28:57 +00:00
Julia Friesel b42cbc8826 Use new published sympto 2020-02-25 07:26:43 +01:00
Julia Friesel 76101eec74 Merge branch 'navigation-state' into 'master'
Navigation state

See merge request bloodyhealth/drip!247
2020-02-17 13:39:34 +00:00
Julia Friesel 9fbc3e7e2a Merge branch 'no-multi-space' into 'master'
Adds linter rule for no multi spaces

See merge request bloodyhealth/drip!263
2020-02-17 13:05:44 +00:00
Sofiya Tepikin e88f26dc16 Fixes missing navigation state on exiting the app 2020-02-16 16:26:37 +01:00
Sofiya Tepikin d054187485 Adds linter rule for no multi spaces 2020-02-16 12:37:19 +01:00
Julia Friesel 856f6216ee Add e2e test device config for Nexus 5 2020-02-11 09:36:31 +01:00
Sofiya Tepikin c7f0c1cb6f Merge branch 'ios-integration' into 'master'
Ios integration

See merge request bloodyhealth/drip!258
2020-02-09 12:09:46 +00:00
Sofiya Tepikin c7882eb619 Merge branch 'fix-linter-warning' into 'master'
Fix linter warning

See merge request bloodyhealth/drip!261
2020-02-07 13:35:28 +00:00
Julia Friesel 28356d6664 Merge branch '413-bug-cycle-start-not-detected-if-day-before-period-excluded' into 'master'
Resolve "Bug: cycle start not detected if day before period excluded"

Closes #413

See merge request bloodyhealth/drip!259
2020-02-07 13:29:34 +00:00
Sofiya Tepikin 882f183c8e Removes linter complaint about react version not being specified 2020-02-07 14:16:21 +01:00
Sofiya Tepikin 7b69719e22 Removes linter warning 2020-02-07 14:16:07 +01:00
Julia Friesel 62df30de8a De-duplicate line 2020-02-07 09:53:11 +01:00
Sofiya Tepikin 8cad357e60 Fixes navigation logic 2020-02-05 19:50:40 +01:00
Sofiya Tepikin 026a9c17c3 Add go back functionality 2020-02-04 20:45:23 +01:00
Sofiya Tepikin e66ca3f8db Adds navigation tree to define the hierarchy 2020-02-04 20:45:23 +01:00
Sofiya Tepikin e479b93638 Moves navigation to the state 2020-02-04 20:45:23 +01:00
Sofiya Tepikin f444de0b87 Removes the lowercasing to the header title component 2020-02-04 20:45:23 +01:00
Julia Friesel ae0d909407 Remove now superfluous check for bleeding symptom 2020-02-04 12:18:24 +01:00
Julia Friesel 963e0ffea0 Add remaining tests for maybeSetNewCycleStart 2020-02-04 12:11:23 +01:00
Julia Friesel 009c8fa0f2 Add test for deleted bleeding value 2020-02-04 11:51:35 +01:00
Julia Friesel 7b8292ab6a Extract maybeSetNewCycleStart into own module 2020-02-04 11:51:07 +01:00
Julia Friesel 446c5d4600 Set new cycle start when bleeding value excluded 2020-02-03 11:04:20 +01:00
Sofiya Tepikin 1c7856081e Changes the name of the main component 2020-02-02 21:37:58 +01:00
Sofiya Tepikin cb13222780 Makes drip work on iOS 2020-02-02 21:09:36 +01:00
Sofiya Tepikin e52736f8a1 Adds a handy script to clear builds/cache/etc 2020-02-02 20:15:42 +01:00
Julia Friesel 580f1e79ba Merge branch '410-mucus-max-value-not-showing' into 'master'
Fix bug - not showing maximum value of mucus in chart

Closes #410

See merge request bloodyhealth/drip!256
2019-11-25 15:00:35 +00:00
mashazyu 45ee67e4d8 Fix bug - not showing maximum value of mucus in chart 2019-11-22 16:15:45 +01:00
Julia Friesel 51c96b5b37 Merge branch 'chart-refactoring-part-2' into 'master'
Chart refactoring part 2

See merge request bloodyhealth/drip!255
2019-11-22 12:00:49 +00:00
mashazyu 2ecb2e7647 Move calculations functions to helpers file 2019-11-21 22:23:56 +01:00
mashazyu c24284a57d Move YAxis & HorizontalGrid components in a common conditional expression 2019-11-21 22:21:47 +01:00
mashazyu 36ae949f31 Move auxiliary functions from day-column.js component file to helpers file 2019-11-21 22:01:13 +01:00
mashazyu 796d995aad Move Surface element to TemperatureColumn component 2019-11-21 21:57:09 +01:00
mashazyu 767a2c9709 Introduces CycleDayLabel component 2019-11-21 21:54:29 +01:00
mashazyu fe1ec38b68 Introduces TemperatureColumn component 2019-11-21 21:41:01 +01:00
mashazyu 71e4c6d11e Introduces ChartLine component 2019-11-21 21:09:48 +01:00
Julia Friesel 765916e7fe Merge branch 'chart-refactoring-part-1' into 'master'
Chart refactoring part 1

See merge request bloodyhealth/drip!254
2019-11-18 14:18:10 +00:00
mashazyu 03a235d8cb Formatting fix 2019-11-17 20:39:00 +01:00
mashazyu 0adbf3436b Introduces SymptomCell component 2019-11-17 20:38:29 +01:00
mashazyu 09129adba3 Introduces HorizontalGrid component 2019-11-17 19:57:47 +01:00
mashazyu ed66395318 Moves out chart (data modelling) helpers to a separate file 2019-11-17 19:47:25 +01:00
mashazyu bc04f6a24b Introduces Tick & TickList components 2019-11-17 19:37:19 +01:00
mashazyu 3598dd5b80 Introduces ChartLegend component 2019-11-17 17:46:21 +01:00
mashazyu 270b823c20 Introduces SymptomIcon component 2019-11-17 17:28:02 +01:00
mashazyu 34a0e15e66 Rafactors symptom color definition 2019-11-17 17:15:56 +01:00
mashazyu 02ca733147 Introduces YAxis component 2019-11-17 16:54:33 +01:00
Julia Friesel f00010e1ca Merge branch '368-display-incomplete-mucus-and-cervix' into 'master'
make graph display for incomplete mucus and cervix values

Closes #368

See merge request bloodyhealth/drip!245
2019-11-15 17:52:27 +00:00
Julia Friesel 1d8350c468 Use updated sympto 2019-11-15 18:24:54 +01:00
Sofiya Tepikin e14bd690dc Fixes typo, and removes a redundant line 2019-11-15 17:52:12 +01:00
mashazyu 7514b01cf4 Naming update: isFertile>isClosedAndHard, getSymptomColorIndex>symptomColorMethods; update of symptom index retrieval for the sake of readibility 2019-11-15 17:37:17 +01:00
mashazyu f376602843 Naming update, change switch to object, fertility logic review 2019-11-15 17:37:17 +01:00
mashazyu 889e0e36d7 make graph display for incomplete mucus and cervix values 2019-11-15 17:37:17 +01:00
Julia Friesel 5d3950ca5c Merge branch 'update-to-0.59.10' into 'master'
Update to 0.59.10 - or all to avoid updating the README :D

See merge request bloodyhealth/drip!250
2019-11-15 16:20:11 +00:00
Sofiya Tepikin 3d53af8012 Fixes some warnings on build 2019-11-14 17:39:31 +01:00
Sofiya Tepikin 6175738fec Updates the RN version to 0.59.10 2019-11-14 17:15:36 +01:00
Julia Friesel 71c5a0b51b Re-add missing build script 2019-11-10 10:43:53 +01:00
Sofiya Tepikin 23ba5115d2 Updates the RN version to 0.59 2019-11-08 20:00:05 +01:00
Julia Friesel 3dd235f8d9 Move metadata directory to root of project. So fdroid can find it. 2019-09-22 19:26:14 +02:00
Sofiya Tepikin 1c25ad3046 Merge branch 'header-refactoring' into 'master'
Refactors the header

See merge request bloodyhealth/drip!246
2019-09-15 13:02:08 +00:00
Sofiya Tepikin 48d519d557 Cleans the console.log 2019-09-15 14:50:37 +02:00
Sofiya Tepikin e0091497e4 Adds test for data deletion 2019-09-15 13:52:29 +02:00
Sofiya Tepikin 5d436630d3 Refactors the header 2019-09-15 13:52:29 +02:00
Sofiya Tepikin 20595c6c3a Merge branch 'composition-instead-inheritance' into 'master'
Replaces the inheritance with composition pattern in the Symptom view

See merge request bloodyhealth/drip!241
2019-09-14 17:36:41 +00:00
Sofiya Tepikin 8ce840306a Replaces the inheritance with composition pattern in the Symptom view 2019-09-13 10:32:09 +02:00
Maria Zadnepryanets c74c5d372c Merge branch 'data-input-e2e-test' into 'master'
Adds e2e symptom data input tests and necessary testIDs to the existing components

See merge request bloodyhealth/drip!244
2019-09-02 16:39:35 +00:00
mashazyu c0235d148b Adds e2e symptom data input tests and necessary testIDs to the existing components 2019-09-02 18:04:57 +02:00
Sofiya Tepikin 85b5b4d387 Merge branch 'simplify-temperature-view' into 'master'
Simplifies the temperature edit view

See merge request bloodyhealth/drip!243
2019-09-01 15:51:18 +00:00
Sofiya Tepikin 2f25c5cffe Splits the temperature view to simplify it 2019-09-01 15:04:16 +02:00
Maria Zadnepryanets 3f7b58b04c Update README.md 2019-08-27 08:56:39 +00:00
Maria Zadnepryanets e9fd961913 Update README.md 2019-08-27 08:55:29 +00:00
Sofiya Tepikin c3a2eea3a5 Merge branch 'hotfix-cycleday-data' into 'master'
Fixes the cycle day data is not being passed to the symptom view

See merge request bloodyhealth/drip!242
2019-08-24 14:58:21 +00:00
Sofiya Tepikin 525defa1c9 Fixes the cycle day data is not being passed to the symptom view 2019-08-22 21:03:11 +02:00
Sofiya Tepikin 16cc2cef5c Merge branch 'redux-on-detox' into 'master'
Redux

See merge request bloodyhealth/drip!238
2019-08-21 19:54:17 +00:00
Sofiya Tepikin 29a076e5a2 Fixes the date not being set on changing cycle day, and adds a test for this case 2019-08-21 21:35:18 +02:00
Sofiya Tepikin c226923759 Starts using redux store for storing the date 2019-08-21 21:34:17 +02:00
Sofiya Tepikin 216a9044cd Redux initial setup 2019-08-21 21:28:54 +02:00
bl00dymarie 2d1ab273a0 Merge branch '403-add-how-to-e2e-test-to-readme' into 'master'
Adds e2e test setup to README

Closes #403

See merge request bloodyhealth/drip!239
2019-08-17 14:29:00 +00:00
emelko a7d6cdc8cc Implements review feedback 2019-08-13 12:13:29 +09:00
Sofiya Tepikin e2270ea1e2 Merge branch 'simplify-cycle-day-overview' into 'master'
Splits <CycleDayOverView /> to smaller components, to simplify it

See merge request bloodyhealth/drip!240
2019-08-12 19:02:33 +00:00
Sofiya Tepikin d2d5d2f41f Splits <CycleDayOverView /> to smaller components, to simplify it 2019-08-09 21:33:26 +02:00
Sofiya Tepikin 8a528d5529 Merge branch 'detox' into 'master'
Introducing detox - the tool for e2e testing

See merge request bloodyhealth/drip!237
2019-08-08 18:44:25 +00:00
emelko 82cf26334f Adds e2e test setup to README 2019-08-06 19:03:11 +02:00
Sofiya Tepikin 917bd8f7c4 Adding more tests 2019-07-31 12:56:47 +02:00
Sofiya Tepikin 48778c1959 Adds initial tests 2019-07-21 21:16:59 +02:00
Sofiya Tepikin 7e807dba7f Introducing detox 2019-07-21 16:17:16 +02:00
Julia Friesel 888be9531d Move app store metadata for here from fdroiddata repo 2019-07-15 09:31:59 +02:00
Julia Friesel 2539918d0c Merge branch '334-check-for-min-android-version-to-use-drip-with' into 'master'
Resolve "Check for min Android version to use drip with"

Closes #334

See merge request bloodyhealth/drip!235
2019-06-28 05:38:34 +00:00
Julia Friesel a9e84b9255 Set minSdk to Marshmallow (earlier versions don't work) 2019-06-26 11:00:29 +02:00
Julia Friesel 5b2cd1c8f4 Merge branch '390-bug-temperature-timestamp-can-be-deleted' into 'master'
Only show timestamp when it has a value

Closes #390

See merge request bloodyhealth/drip!234
2019-06-25 18:17:42 +00:00
Julia Friesel 6628543141 Only show timestamp when it has a value 2019-06-23 11:46:20 +02:00
Julia Friesel 6065470b2f Merge branch 'reopening-after-back-fix' into 'master'
Fixes reopenning after back button

Closes #388

See merge request bloodyhealth/drip!231
2019-06-19 07:54:47 +00:00
Sofiya Tepikin e4209e28b7 Refactors App wrapper component 2019-06-19 00:02:58 +02:00
Sofiya Tepikin fa20e84bfe Fixes reopenning after back button 2019-06-18 23:53:17 +02:00
Sofiya Tepikin a152b497fb Merge branch '391-bug-home-screen-not-centered' into 'master'
Resolve "bug: home screen not centered"

Closes #391

See merge request bloodyhealth/drip!232
2019-06-18 21:48:18 +00:00
Julia Friesel c11b80d7fa Make home screen centered 2019-06-17 06:38:55 +02:00
Julia Friesel b21938fdd8 Add release wizard 2019-06-14 17:52:08 +02:00
Julia Friesel c7f1a029a3 Update nodejs-mobile to fix security issue 2019-06-08 09:07:48 +02:00
Julia Friesel e8b0d60fdd release: 0.1905.29-beta 2019-05-29 13:30:46 +02:00
bl00dymarie 5e32f4d7dc Merge branch 'Bugfix-password-crash' into 'master'
Makes sure style is an array for it to spread

See merge request bloodyhealth/drip!230
2019-05-29 10:58:07 +00:00
emelko 8008c8e2cc Makes sure style is an array for it to spread 2019-05-29 12:25:00 +02:00
Julia Friesel 2cc5ffb50f Run gradle clean before assembleRelease 2019-05-29 08:16:09 +02:00
emelko e7949377a2 release: 0.1905.28-beta 2019-05-28 16:06:56 +02:00
bl00dymarie 592f2b3e16 Merge branch '386-bug-fertility-text-is-missing-on-homescreen' into 'master'
Make sure fertility text is displayed on home screen

Closes #386

See merge request bloodyhealth/drip!228
2019-05-28 08:17:12 +00:00
Julia Friesel 7506e911f7 Merge branch '377-put-donation-button-in-app' into 'master'
Resolve "put donation button in app"

Closes #377

See merge request bloodyhealth/drip!229
2019-05-28 08:08:50 +00:00
emelko 09bbfe8a7d Displays all the text for Home Elements;
Shortens margin btw Home Elements;
Adds missing "visit" to text
2019-05-28 09:38:34 +02:00
Julia Friesel bb1bd949c3 Add donation section to about 2019-05-28 09:03:43 +02:00
bl00dymarie 406b71250e Merge branch '384-bug-header-title-in-settings-moves-up' into 'master'
Gets rid of hidden icon in back button header

Closes #384

See merge request bloodyhealth/drip!227
2019-05-28 06:39:59 +00:00
bl00dymarie 6228cd8953 Merge branch 'Space-between-info-icon-and-text' into 'master'
Make uniform info icon and leave some space

See merge request bloodyhealth/drip!223
2019-05-28 06:38:14 +00:00
bl00dymarie 2623fedec9 Merge branch '382-bug-cervical-mucus-title-broken-on-symptom-view' into 'master'
Changes fontSize of titles in SymptomBoxes;

Closes #382

See merge request bloodyhealth/drip!226
2019-05-28 06:37:44 +00:00
bl00dymarie bfdad895ce Merge branch '375-change-description-of-mucus-and-cervix-on-cycle-day-overview' into 'master'
Adds more descriptive mucus and cervix labels for cycle day overview

Closes #375

See merge request bloodyhealth/drip!221
2019-05-28 06:36:35 +00:00
emelko dce8138e12 Gets rid of hidden icon in back button header 2019-05-27 23:42:37 +02:00
emelko 7864ebfc41 Adds subcategories of cevix and mucus as labels 2019-05-27 22:42:23 +02:00
emelko 442bcc5cee Adds subcategory names to the selected options 2019-05-27 17:49:39 +02:00
emelko e8aac6d41e Changes fontSize of titles in SymptomBoxes;makes sure it stays in 1 line 2019-05-27 16:51:38 +02:00
Julia Friesel 2bbe737101 Fix delete button 2019-05-26 19:27:55 +02:00
Julia Friesel 8856b3f1bc Merge branch '381-real-autosave' into 'master'
Resolve "real autosave"

Closes #381

See merge request bloodyhealth/drip!225
2019-05-26 12:23:16 +00:00
emelko aadc36f45c Get rid of extra styling for non functional info icon 2019-05-26 13:04:20 +02:00
Julia Friesel 6c56b6f83c Clean up 2019-05-26 12:47:22 +02:00
Julia Friesel 018ec3bcda Add autosave for temperate 2019-05-26 09:04:51 +02:00
Julia Friesel bc358bd9ed Auto save whenever symptom view updates 2019-05-26 07:39:15 +02:00
Julia Friesel f8eef66810 Merge branch '359-delete-data-bug-fix' into 'master'
Resolve "Bug: Settings > Manage your data > Delete app data"

Closes #359

See merge request bloodyhealth/drip!224
2019-05-26 04:08:54 +00:00
bl00dymarie ac2bad1de0 Merge branch '376-consider-rename-mucus-into-cervical-mucus' into 'master'
Specifying mucus as cervical mucus

Closes #376

See merge request bloodyhealth/drip!222
2019-05-25 21:38:47 +00:00
mashazyu 6cbfcb9d64 Fixes delete data bug 2019-05-25 17:45:02 +02:00
emelko 39df9c2ec0 Make uniform info icon and leave some space 2019-05-25 12:37:14 +02:00
emelko 138f1d28b3 Align droplet text on homescreen 2019-05-25 12:08:42 +02:00
bl00dymarie e2abc4dbeb Merge branch 'marie-move-info-button-out-of-header-to-body' into 'master'
Move info button out of header to body

See merge request bloodyhealth/drip!217
2019-05-25 09:35:31 +00:00
Julia Friesel 0cfc85933c Make info modal only as big as it needs to be 2019-05-25 09:17:39 +02:00
Julia Friesel c6fd5e6db2 Make sure info icon is always well pressable 2019-05-25 07:09:36 +02:00
emelko 8e57febf9e Specifying mucus as cervical mucus 2019-05-24 22:50:40 +02:00
bl00dymarie ed38a5b450 Merge branch '362-rearrange-home-screen-elements' into 'master'
Resolve "Rearrange home screen elements"

Closes #362

See merge request bloodyhealth/drip!220
2019-05-24 10:28:33 +00:00
Julia Friesel 16b3199892 Make sure drop text is always positioned correctly 2019-05-24 11:23:12 +02:00
emelko d13a776970 Position icon text for droplet 2019-05-23 22:07:46 +02:00
emelko 418b9c0f5d Styling for homescreen elements to breathe 2019-05-23 17:23:36 +02:00
Julia Friesel c35f333daa Merge branch 'import-alert-buttons-order' into 'master'
Changes order of buttons in the import alert

Closes #372

See merge request bloodyhealth/drip!219
2019-05-22 15:40:40 +00:00
Julia Friesel 668acb4afe simple way to rearrange home screen 2019-05-22 17:30:53 +02:00
emelko ac0690ec9f Set show more on homescreen to default and get rid of more/less switch 2019-05-22 17:27:31 +02:00
Julia Friesel cef2e850d7 Don't render delete icon, instead of just setting it invisible 2019-05-21 17:32:51 +02:00
Julia Friesel 4b469f2f49 Make isDeleteIconActive more readable 2019-05-21 17:08:26 +02:00
Julia Friesel b0b2e8ceb5 Merge branch '365-show-incomplete-symptom-in-day-view' into 'master'
Resolve "show incomplete symptom in day view"

Closes #365

See merge request bloodyhealth/drip!218
2019-05-21 14:22:04 +00:00
Julia Friesel 82a9bf0a0f Update README.md 2019-05-21 14:20:45 +00:00
Sofiya Tepikin 417083b0c1 Changes order of buttons in the import alert 2019-05-20 17:16:05 +02:00
Julia Friesel 25ed0d168e Remove formatting improvements that clutter up the diff 2019-05-20 15:17:27 +02:00
Julia Friesel d7b599d03b Fix cervix value display on overview 2019-05-20 06:44:34 +02:00
Julia Friesel 3f52cae04b Fix mucus value display on overview 2019-05-20 06:32:58 +02:00
Julia Friesel 59c3636139 Don't show delete icon just because symptom info is open 2019-05-20 06:08:46 +02:00
Julia Friesel 472d793627 Clean up markup 2019-05-19 19:00:05 +02:00
Julia Friesel 43b98ed9a5 Merge branch '364-delete-or-clear-button-that-is-visible-as-soon-as-any-value-is-selected-saved' into 'master'
Resolve "delete or clear button that is visible as soon as any value is selected/saved"

Closes #364

See merge request bloodyhealth/drip!216
2019-05-19 16:52:02 +00:00
Julia Friesel 69d2517dd2 Use own modal instead of alert for symptom info 2019-05-19 18:44:12 +02:00
Julia Friesel 0f6567e66b Merge branch '345-move-info-button-out-of-header-to-body' into marie-move-info-button-out-of-header-to-body 2019-05-19 17:53:14 +02:00
emelko c81f7d6291 Gets rid of trailing spaces 2019-05-19 13:09:21 +02:00
emelko e9c18add5e Gets rid of old info symptom screen 2019-05-19 12:57:07 +02:00
emelko 4071c30b8b [WIP] Adds info button to body as alert for:
* mood, pain, temperature
2019-05-19 12:56:52 +02:00
emelko ff1afcb8dc Adds info button to the body as alert 2019-05-19 12:56:08 +02:00
Julia Friesel d2c0891a68 Try out moving it to body 2019-05-18 06:40:36 +02:00
Julia Friesel a557733d30 For temperature, only show delete button when certain fields active 2019-05-17 16:47:31 +02:00
Julia Friesel 0f7ab6c803 Let symptom views overwrite isDeleteIconActive method 2019-05-17 16:09:49 +02:00
Julia Friesel b7088c44f2 Show or hide delete button based on entered data 2019-05-17 12:07:54 +02:00
Julia Friesel 00294ff6f6 Remove unused style 2019-05-17 11:54:50 +02:00
Julia Friesel 1d61675ef7 Ask before deleting entry 2019-05-17 11:01:50 +02:00
Julia Friesel 6a8d22f9f0 Change icon to trash can 2019-05-17 10:56:36 +02:00
emelko 6811b5a692 Replace info icon in header with delete 2019-05-16 16:10:17 +02:00
Julia Friesel 9ff37e2874 Merge branch '371-bug-back-navigation-doesn-t-wait-for-temperature-range-warning' into 'master'
Await alert result before navigating back

Closes #371 and #373

See merge request bloodyhealth/drip!215
2019-05-14 17:29:15 +00:00
Julia Friesel f022fb6b8a Await alert result before navigating back 2019-05-14 13:37:35 +02:00
Julia Friesel 37564621e0 Merge branch '363-alert-for-cervix-and-mucus-when-trying-to-navigate-away-and-one-value-is-missing' into 'master'
Basic auto save

Closes #363

See merge request bloodyhealth/drip!214
2019-05-13 18:56:40 +00:00
Julia Friesel 5057e1a38e Address MR change requests 2019-05-13 20:41:57 +02:00
Julia Friesel e781919434 Reset inadvertently changed file 2019-05-13 20:34:13 +02:00
Julia Friesel 3715e0c4d2 Filter incomplete mucus values in sympto adapter 2019-05-13 20:30:25 +02:00
Julia Friesel 3ff996e946 Don't crash on missing temperature value 2019-05-13 19:07:46 +02:00
Julia Friesel 6011bd9208 Fix linter problems 2019-05-13 12:55:28 +02:00
Julia Friesel d1e16abe34 Make header back arrow function for auto save 2019-05-13 12:55:28 +02:00
Julia Friesel bc13f5c1e6 Remove action button footer from symptom views 2019-05-13 12:55:28 +02:00
Julia Friesel ecf3ebf16d When nothing entered, delete entry 2019-05-13 12:55:28 +02:00
Julia Friesel 08fd3afc34 Add symptom view component with back button listener 2019-05-13 12:55:28 +02:00
Julia Friesel 2528c03315 Remove save button from footer 2019-05-13 12:55:28 +02:00
Julia Friesel d322e557a3 Remove unused line 2019-05-13 12:55:28 +02:00
Julia Friesel 9fd17d769e Make saving incomplete value possible 2019-05-13 12:55:28 +02:00
Julia Friesel ca68186351 Filter out incomplete cervix value days in sympto adapter 2019-05-13 12:49:37 +02:00
Julia Friesel 8d6f5d637b Update sympto 2019-05-13 12:49:37 +02:00
Julia Friesel c6790fe271 Add migration making mucus and cervix values optional 2019-05-13 12:49:37 +02:00
Julia Friesel 6402370eaf Don't compute nfp mucus value when data missing 2019-05-13 12:49:37 +02:00
Julia Friesel f1ca709f25 Add test for missing mucus vaues 2019-05-13 12:49:37 +02:00
tina 51160b033b Merge branch 'remove_default_permissions' into 'master'
excludes internet and system alert window from default permission

Closes #337

See merge request bloodyhealth/drip!212
2019-05-11 10:35:06 +00:00
tina c4884f8f8f excludes internet and system alert window from default permission 2019-05-10 13:28:59 +02:00
tina 647567abd2 Merge branch '250-check-vertical-line-width-in-chart' into 'master'
Fix line width in chart

Closes #250

See merge request bloodyhealth/drip!205
2019-05-10 11:19:09 +00:00
bl00dymarie f123dbf730 Merge branch '342-bleeding-prediction-on-homescreen' into 'master'
Resolve "Bleeding prediction on homescreen"

Closes #342

See merge request bloodyhealth/drip!202
2019-05-10 11:15:57 +00:00
emelko bc0d36ed54 Adds comment for bleeding prediction ranges 2019-05-10 13:11:36 +02:00
tina 745f874ccf Merge branch 'action_button_as_buttons' into 'master'
makes the action button footer more like buttons

Closes #318

See merge request bloodyhealth/drip!208
2019-05-10 11:02:33 +00:00
emelko ea36d4ec7a Change if statement with conditional operator 2019-05-10 12:59:11 +02:00
Julia Friesel bb5623a621 Merge branch '355-make-update-version-script' into 'master'
Resolve "make release script"

Closes #355

See merge request bloodyhealth/drip!209
2019-05-10 10:38:06 +00:00
tina cf6c601c47 changes action buttons color to teal, rounded corners for buttons in settings 2019-05-10 12:11:09 +02:00
Julia Friesel 8efe906e87 Filter release commits from changelog 2019-05-06 12:21:28 +02:00
Julia Friesel 3924c04e56 Add update-changelog script 2019-05-06 12:21:21 +02:00
Julia Friesel a9401d4a0f Remove square brackets from CHANGELOG. They are parsed as links 2019-05-06 12:21:09 +02:00
Julia Friesel 53ec882e53 Add commit-release and npm scripts 2019-05-06 12:21:09 +02:00
Julia Friesel 7387db4a69 Add update version script from manyverse 2019-05-06 12:21:01 +02:00
Julia Friesel 9ef84f9b31 Update RN to 58 2019-05-06 10:39:48 +02:00
Julia Friesel f9c928d45c Update eslint 2019-05-06 09:59:22 +02:00
Julia Friesel 70860860d5 Merge branch '238-loading-screen-for-data-import' into 'master'
Add loading screen for data import

Closes #238

See merge request bloodyhealth/drip!206
2019-05-06 06:44:54 +00:00
Julia Friesel 6a98b28427 Remove superfluous try/catch 2019-05-06 08:42:43 +02:00
Julia Friesel 9ee7819462 Rename methods 2019-05-06 08:37:26 +02:00
Julia Friesel 5a320e148c Merge branch '348-password-screen' into 'master'
Removes logo and adds header on the main login screen

Closes #348

See merge request bloodyhealth/drip!211
2019-05-03 17:51:47 +00:00
Julia Friesel 767aa23841 Merge branch 'app-page-rendering-update' into 'master'
Improves readability of app page rendering

See merge request bloodyhealth/drip!210
2019-05-03 17:49:00 +00:00
mashazyu 227aa69677 Add loading screen to data import 2019-05-02 18:53:44 +02:00
mashazyu 722c372f2d Fix line width in chart 2019-05-02 14:03:30 +02:00
tina 92e02c48dc Merge branch '347-maxlength-in-temp-input' into 'master'
adds maxLength to temperature input field

Closes #347

See merge request bloodyhealth/drip!207
2019-05-01 16:46:18 +00:00
Sofiya Tepikin 3449746ead Improves readability of app page rendering 2019-05-01 11:26:50 +02:00
Julia Friesel ee52f75927 Update README.md 2019-05-01 05:30:10 +00:00
tina 9c8cc8de2e makes the action button footer more like buttons 2019-05-01 00:04:38 +02:00
tina ea279338e0 adds maxLength to temperature input field 2019-04-30 23:24:44 +02:00
mashazyu f15dc75908 Removes logo and adds header on the main login screen 2019-04-30 20:23:09 +02:00
Julia Friesel c00684ebbb Adjust version name 2019-04-29 13:47:58 +02:00
Julia Friesel d0f4ae5109 Don't build for x86 2019-04-29 12:00:57 +02:00
Julia Friesel 187fbef207 Upgrade nodejs-mobile-rn to latest 2019-04-29 10:28:47 +02:00
Julia Friesel 4c655b13c3 Merge branch 'master' of gitlab.com:bloodyhealth/drip 2019-04-29 08:48:10 +02:00
Julia Friesel 2276b37741 Remove unneeded maven repo and upgrade gradle to 4.10 2019-04-29 08:47:58 +02:00
bl00dymarie 7c5d0b9ae2 Merge branch '344-lowercase-for-symptom-values' into 'master'
Lowercase values for sex, pain and mood

Closes #344

See merge request bloodyhealth/drip!204
2019-04-25 10:14:11 +00:00
emelko b8b2d3d2bf Lowercase values for sex, pain and mood 2019-04-25 11:48:03 +02:00
emelko 3ec4d2218e Adds getTime function for bleedingPredictions reuse; minor style formatting 2019-04-25 11:41:41 +02:00
emelko dc5b34546a Renames function to say what it 'does' 2019-04-25 11:01:33 +02:00
emelko 6577038f22 Rename to predictedBleeding 2019-04-25 10:58:04 +02:00
emelko 93abaf99be Nicer formatting for past bleeding prediction 2019-04-24 12:53:04 +02:00
emelko dd24e6058f Fixes prediction range in drop on homescreen 2019-04-23 20:44:59 +02:00
bl00dymarie ded3a79bbc Merge branch 'temperature-screen-improvement' into 'master'
temperature screen styling update

See merge request bloodyhealth/drip!196
2019-04-23 17:19:49 +00:00
bl00dymarie ab0970e33f Merge branch 'Remove-excessive-permissions' into 'master'
Removes permissions not required for debug or production

See merge request bloodyhealth/drip!201
2019-04-23 17:09:27 +00:00
bl00dymarie 49d5d77a82 Merge branch 'new-tag' into 'master'
0.0.3

See merge request bloodyhealth/drip!200
2019-04-23 06:55:52 +00:00
emelko 0cf8820e94 Removes permissions not required for debug or production 2019-04-22 16:43:13 +02:00
emelko 1ef3585cdc 0.0.3 2019-04-17 16:35:33 +02:00
bl00dymarie 25ff6ca01f Update CHANGELOG.md 2019-04-17 14:33:02 +00:00
bl00dymarie dd648da56f Merge branch 'delete-password-button-fix' into 'master'
Delete password button fix

Closes #327

See merge request bloodyhealth/drip!199
2019-04-17 07:07:19 +00:00
bl00dymarie d1e87835d1 Update CHANGELOG.md 2019-04-16 18:46:44 +00:00
bl00dymarie c715b16e44 Update CHANGELOG.md 2019-04-16 18:36:03 +00:00
mashazyu 31b428fa53 Add proptypes to DeletePassword, ChangePassword and ConfirmWithPassword components 2019-04-15 21:11:24 +02:00
mashazyu a291c78379 Delete password button bug fix 2019-04-15 21:10:09 +02:00
mashazyu c22bff5948 temperature screen styling update 2019-04-14 22:43:57 +02:00
Julia Friesel 772a277315 Merge branch '336-investigate-rn-push-notifications-for-fdroid' into 'master'
Throw out Google services from notification library

Closes #336

See merge request bloodyhealth/drip!198
2019-04-11 16:43:16 +00:00
Julia Friesel a4545fedcf Use RN notifications without Google services 2019-04-10 19:54:04 +02:00
308 changed files with 17305 additions and 13867 deletions
-61
View File
@@ -1,61 +0,0 @@
{
"env": {
"node": true,
"mocha": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018
},
"plugins": [
"react"
],
"rules": {
"quotemark": false,
"ordered-imports": false,
"no-var-requires": false,
"indent": [
"error",
2
],
"no-console": 0,
"eofline": false,
"no-unused-variable": true,
"no-unused-expression": true,
"only-arrow-functions": false,
"space-before-function-paren": 0,
"trailing-comma": [
true,
"never"
],
"object-literal-sort-keys": false,
"semi": [
"warn",
"never"
],
"space-infix-ops": [
"warn"
],
"no-var": "error",
"prefer-const": "error",
"no-trailing-spaces": "error",
"react/prop-types": 0,
"max-len": [
1,
{
"ignoreStrings": true,
"ignoreComments": true,
"ignoreTemplateLiterals": true
}
]
}
}
+33
View File
@@ -0,0 +1,33 @@
module.exports = {
root: true,
extends: ['eslint:recommended', 'plugin:react/recommended'],
env: {
node: true,
mocha: true,
es6: true,
},
parser: '@babel/eslint-parser',
parserOptions: {
requireConfigFile: false,
babelOptions: {
presets: ['@babel/preset-react'],
},
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
},
plugins: ['react'],
settings: {
react: {
version: require('./package.json').dependencies.react,
},
},
rules: {
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-var': 'error',
'prefer-const': 'error',
'react/prop-types': 2,
},
}
+13 -1
View File
@@ -2,6 +2,9 @@
# #
.DS_Store .DS_Store
# VSCode
.vscode/
# Xcode # Xcode
# #
build/ build/
@@ -20,7 +23,8 @@ DerivedData
*.hmap *.hmap
*.ipa *.ipa
*.xcuserstate *.xcuserstate
project.xcworkspace xcshareddata
ios/Index/DataStore
# Android/IntelliJ # Android/IntelliJ
# #
@@ -40,6 +44,7 @@ yarn-error.log
buck-out/ buck-out/
\.buckd/ \.buckd/
*.keystore *.keystore
!debug.keystore
# fastlane # fastlane
# #
@@ -55,6 +60,9 @@ buck-out/
# Bundle artifact # Bundle artifact
*.jsbundle *.jsbundle
# CocoaPods
/ios/Pods/
# RN android release # RN android release
android/app/bin/ android/app/bin/
android/app/release/ android/app/release/
@@ -62,6 +70,10 @@ android/app/src/main/assets/index.android.bundle
android/.project android/.project
android/app/.project android/app/.project
ios/Podfile.lock
android/app/src/main/res/drawable-*
android/app/src/main/assets/*
# nodejs-mobile creates these with every npm install # nodejs-mobile creates these with every npm install
nodejs-assets/nodejs-project/sample-* nodejs-assets/nodejs-project/sample-*
nodejs-assets/build-native-modules-MacOS-helper-script-node.sh nodejs-assets/build-native-modules-MacOS-helper-script-node.sh
+4 -4
View File
@@ -1,12 +1,12 @@
image: node:8 image: node:14
# This folder is cached between builds # This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache # http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache: cache:
paths: paths:
- node_modules/ - node_modules/
test_async: test_async:
script: script:
- npm install - npm install
- npm test - npm test
+16
View File
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
open-pull-requests-limit: 3
reviewers:
- "bl00dymarie"
- "mariyaz"
- "sdvig"
- "LisaHill"
allow:
- dependency-type: direct
- dependency-type: production
rebase-strategy: "auto"
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx pretty-quick --staged
+1
View File
@@ -0,0 +1 @@
engine-strict=true
+1
View File
@@ -0,0 +1 @@
v14.19.3
+4
View File
@@ -0,0 +1,4 @@
module.exports = {
singleQuote: true,
semi: false,
}
+340 -3
View File
@@ -1,12 +1,349 @@
# Changelog # Changelog
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## v1.2102.28
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### Changes
- Temperature range is now between 35 - 39°C and its default values are now set to 35.5 - 37.5°C
### Fixed
- Blocks invalid input of temperature value
- Error message for incorrect password on login screen
- Phase text on home screen for last fertile day
- Styling improvements
## v1.2101.9
### Adds
- Introduces complete redesign of all sections of the app
- Adds new font
- Adds Lisa as condriputor
- Adds updated text about credits.
- Adds missing notification icon
- Adds padding between keyboard and text input
- Adds limit line length on text of symptom box
### Changes
- Updates createVersion tag for production releases
- Better wording for prediction text
- Changes the icon
- Changes font color of marked calendar days
- Updates styling of Stats page
- Updates settings menu styling
- Increases hitSlop of menu icon and navigation arrows
- Sets calendar pastScrollRange to 10 years
- Introduces RN Alert component styling update
- Introduces PasswordPrompt component redesign
- Updates button activity definition when entering new password
- Forbids landscape orientation for app
- Updates README.md
- Updates sdk 28 -> 29 and migrate to androidx
### Fixed
- Fixed drip typo
- Fixed the date label on chart from breaking
- Fixed chart dots and lines
- Fixed error on highes/lowest scale values
- Fixed extra horizontal grid line on chart
- Fixed error occurring when navigating back from settings section
- Fixed redirect to TemperatureEditView from reminder
- Fixed ordinal number suffix on chart date labels
- Fixed bug when .8 and .3 labels are not shown in chart
- Fixed react-native-vector-icon
- Fixed AppLoadingView component centering
## v0.2007-12.beta
### Adds
- Allows chart not to show temperature part, when temperature is not tracked and corresponding refactoring
- Detox support for e2e testing and addition of the e2e tests
- Introduces Redux global state (date and navigation are stored locally now)
- Introduces clear.sh script to the project automising clearing project caches and packages reinstallation
### Changes
- Updates of chart shades for bleeding
- Eslint rule cleanup and addition of new rules (checks for PropTypes definition for React components, multi spaces)
- sympto library upgrade to version 2.2.0
- Preparation for support of drip on iOS devices
- Updates representation of the incomplete mucus and cervix values on chart
- React Native update to 0.59.10
- Refactors of header, cycle day overview, temperature edit view pages
- Setting minimum SDK version to 23 to allow using drip on earlier versions of Android
### Fixed
- Fixed adding notes to the future dates
- Fixed app exiting with error when hitting back button on device
- Fixed Sex symptom showing on y axis of chart even though the contraception method was deleted
- Fixed of the clear.sh file name in package.json
- Fixed of navigation from chart to the cycle day overview
- Bug fix for maximum value of mucus not showing on chart
- Fixed delete button bug on symptom edit page
- Fixed of home screen centering
### Security
- Updates of node.js to fix security issue
## v0.2005.3-beta
- Adds arm64-v8a and x86_64 for supporting 64-bit architecture
- Adds Mariya & Sofiya as contributors &lt;3
- Fixed the error on app exiting on via the device back button
- Updates README.md
- Allows to enter note in the future
- Chart navigation bug fix.
- Changes clear to lowercase to make it case sensitive and executable
- fix 306 by setting other-note empty as contraception method 'other' is deactivated
- Don't show temperature chart part of chart when temp not tracked
- Bring in different shades for desire dots on chart
- Splits the rest of the tests without modifying them
- Moves out the test for getCyclesBefore method of cycle module
- Moves out the test for getPReviousCycle method of cycle module
- Lint rule react prop types addition
- Adds test and fixes getCycleByStartDate method of cycle module
- Moves out the tests for getCycleDayNumber and organises them
- Adds propTypes definition
- Gets rid of a top level prop passed down through a tree of components
- Cleanups symptom view
- Removes unnecessary prop and defines the missing propTypes
- Adds propTypes definition
- Gets rid of the redundant state on Home
- Moves out home helpers from the component
- Moves out HomeElement component
- Moves out IconText component
- Resets the date in store for today date when navigating home
- Sets initial value of date in the store
- Removes redundant state and corrects the cycle day prop
- Use new published sympto
- Fixed missing navigation state on exiting the app
- Adds e2e test device config for Nexus 5
- De-duplicate line
- Fixed navigation logic
- Adds go back functionality
- Adds navigation tree to define the hierarchy
- Moves navigation to the state
- Removes the lowercasing to the header title component
- Remove now superfluous check for bleeding symptom
- Adds remaining tests for maybeSetNewCycleStart
- Adds test for deleted bleeding value
- Extract maybeSetNewCycleStart into own module
- Set new cycle start when bleeding value excluded
- Changes the name of the main component
- Makes drip work on iOS
- Adds a handy script to clear builds/cache/etc
- Fixed bug - not showing maximum value of mucus in chart
- Moves calculations functions to helpers file
- Moves YAxis & HorizontalGrid components in a common conditional expression
- Moves auxiliary functions from day-column.js component file to helpers file
- Moves Surface element to TemperatureColumn component
- Introduces CycleDayLabel component
- Introduces TemperatureColumn component
- Introduces ChartLine component
- Formatting fix
- Introduces SymptomCell component
- Introduces HorizontalGrid component
- Moves out chart (data modelling) helpers to a separate file
- Introduces Tick & TickList components
- Introduces ChartLegend component
- Introduces SymptomIcon component
- Rafactors symptom color definition
- Introduces YAxis component
- Use updated sympto
- Fixed typo, and removes a redundant line
- Naming update: isFertile>isClosedAndHard, getSymptomColorIndex>symptomColorMethods; update of symptom index retrieval for the sake of readibility
- Naming update, change switch to object, fertility logic review
- make graph display for incomplete mucus and cervix values
- Fixed some warnings on build
- Updates the RN version to 0.59.10
- Re-add missing build script
- Updates the RN version to 0.59
- Moves metadata directory to root of project. So fdroid can find it.
- Cleans the console.log
- Adds test for data deletion
- Refactors the header
- Replaces the inheritance with composition pattern in the Symptom view
- Adds e2e symptom data input tests and necessary testIDs to the existing components
- Splits the temperature view to simplify it
- Updates README.md
- Fixed the cycle day data is not being passed to the symptom view
- Fixed the date not being set on changing cycle day, and adds a test for this case
- Starts using redux store for storing the date
- Redux initial setup
- Implements review feedback
- Splits &lt;CycleDayOverView /> to smaller components, to simplify it
- Adds e2e test setup to README
- Adding more tests
- Adds initial tests
- Introduces detox
- Moves app store metadata for here from fdroiddata repo
- Set minSdk to Marshmallow (earlier versions don't work)
- Only show timestamp when it has a value
- Refactors App wrapper component
- Fixed reopenning after back button
- Make home screen centered
- Adds release wizard
- Updates nodejs-mobile to fix security issue
## v0.1905.29-beta
### Changes
- Auto save functionality for all symptoms
- Adds donation section to about
- Clearer labels on cycle day overview
- Rename mucus to cervical mucus
- Set show more on homescreen to default and get rid of more/less switch
- Adds loading screen to data import
- Removes logo and adds header on the main login screen
- Nicer formatting for past bleeding prediction
- Removes permissions not required for debug or production
- Temperature screen styling update
### Fixed
- Styling
- Line width in chart
- Prediction range in drop on homescreen
## v0.1905.28-beta
- Displays all the text for Home Elements; Shortens margin btw Home Elements; Adds missing "visit" to text
- Adds donation section to about
- Gets rid of hidden icon in back button header
- Adds subcategories of cevix and mucus as labels
- Adds subcategory names to the selected options
- Changes fontSize of titles in SymptomBoxes;makes sure it stays in 1 line
- Fixed delete button
- Get rid of extra styling for non functional info icon
- Clean up
- Adds autosave for temperate
- Auto save whenever symptom view updates
- Fixed delete data bug
- Make uniform info icon and leave some space
- Align droplet text on homescreen
- Make info modal only as big as it needs to be
- Make sure info icon is always well pressable
- Specifying mucus as cervical mucus
- Make sure drop text is always positioned correctly
- Position icon text for droplet
- Styling for homescreen elements to breathe
- simple way to rearrange home screen
- Set show more on homescreen to default and get rid of more/less switch
- Don't render delete icon, instead of just setting it invisible
- Make isDeleteIconActive more readable
- Updates README.md
- Changes order of buttons in the import alert
- Remove formatting improvements that clutter up the diff
- Fixed cervix value display on overview
- Fixed mucus value display on overview
- Don't show delete icon just because symptom info is open
- Clean up markup
- Use own modal instead of alert for symptom info
- Gets rid of trailing spaces
- Gets rid of old info symptom screen
- \[WIP] Adds info button to body as alert for: \* mood, pain, temperature
- Adds info button to the body as alert
- Try out moving it to body
- For temperature, only show delete button when certain fields active
- Let symptom views overwrite isDeleteIconActive method
- Show or hide delete button based on entered data
- Remove unused style
- Ask before deleting entry
- Changes icon to trash can
- Replace info icon in header with delete
- Await alert result before navigating back
- Address MR change requests
- Reset inadvertently changed file
- Filter incomplete mucus values in sympto adapter
- Don't crash on missing temperature value
- Make header back arrow function for auto save
- Remove action button footer from symptom views
- When nothing entered, delete entry
- Adds symptom view component with back button listener
- Remove save button from footer
- Remove unused line
- Make saving incomplete value possible
- Filter out incomplete cervix value days in sympto adapter
- Updates sympto
- Adds migration making mucus and cervix values optional
- Don't compute nfp mucus value when data missing
- Adds test for missing mucus vaues
- excludes internet and system alert window from default permission
- Adds comment for bleeding prediction ranges
- Changes if statement with conditional operator
- changes action buttons color to teal, rounded corners for buttons in settings
- Fixed line width in chart
- makes the action button footer more like buttons
- Adds getTime function for bleedingPredictions reuse; minor style formatting
- Renames function to say what it 'does'
- Rename to predictedBleeding
- Nicer formatting for past bleeding prediction
- Fixed prediction range in drop on homescreen
## v0.1905.10-beta
- Filter release commits from changelog
- Adds update-changelog script
- Remove square brackets from CHANGELOG. They are parsed as links
- Adds commit-release and npm scripts
- Adds update version script from manyverse
- Updates RN to 58
- Remove superfluous try/catch
- Rename methods
- Adds loading screen to data import
- Improves readability of app page rendering
- Updates README.md
- adds maxLength to temperature input field
- Removes logo and adds header on the main login screen
- Adjust version name
- Don't build for x86
- Upgrade nodejs-mobile-rn to latest
- Remove unneeded maven repo and upgrade gradle to 4.10
- Lowercase values for sex, pain and mood
- Removes permissions not required for debug or production
- Adds proptypes to DeletePassword, ChangePassword and ConfirmWithPassword components
- Delete password button bug fix
- temperature screen styling update
## v0.0.3 - 2019-04-17
### Changes
- Removes Google services from notification library and use fork of react-native-push-notification: <https://github.com/github:jfr3000/react-native-push-notification>
### Fixed
- Button functionality in settings for password
## v0.0.2 - 2019-04-09
## Second updated beta release version
### Changes
- First day of the week in calendar is now Monday instead of Sunday
- Minor styling consistency
### Fixed
- Typos
- Bleeding value is visible in shortcut from Homescreen
- Delete button for sex, pain and mood
- Dates on chart
## v0.0.1 - 2019-02-15
## [0.0.1] - 2019-02-22
## First beta release version ## First beta release version
### Added (list of core functionality) ### Added (list of core functionality)
- you can track your menstrual bleeding - you can track your menstrual bleeding
- you can track symptoms related to natural family planning (nfp), i.e. basal temperature and mucus or cervix - you can track symptoms related to natural family planning (nfp), i.e. basal temperature and mucus or cervix
- you can use nfp symptoms for fertility awareness (drip implements the sympto-thermal method) - you can use nfp symptoms for fertility awareness (drip implements the sympto-thermal method)
+7 -7
View File
@@ -1,4 +1,4 @@
# Contributing to drip aka CONDRIBUTING # Contributing to drip aka CONDRIPUTING
So good to see you here, hello :wave\_tone1: :wave\_tone2: :wave\_tone3: :wave\_tone4: :wave\_tone5: So good to see you here, hello :wave\_tone1: :wave\_tone2: :wave\_tone3: :wave\_tone4: :wave\_tone5:
@@ -8,24 +8,24 @@ So good to see you here, hello :wave\_tone1: :wave\_tone2: :wave\_tone3: :wave\_
[What should I know before I get started?](#what-should-i-know-before-i-get-started) [What should I know before I get started?](#what-should-i-know-before-i-get-started)
[How can I condribute?](#how-can-i-condribute) [How can I condripute?](#how-can-i-condripute)
[Thank you](#thank-you) [Thank you](#thank-you)
## TL;DR ## TL;DR
You just want to say hello? Send us a [nice email](mailto:bl00dyhealth@mailbox.org?Subject=Nice%20incoming%20mail) :postbox: or tweet :bird: at us [@bl00dyhealth](https://twitter.com/bl00dyhealth). You just want to say hello? Send us a [nice email](mailto:drip@mailbox.org?Subject=Nice%20incoming%20mail) :postbox:, ask to [join our Slack](mailto:drip@mailbox.org?Subject=Join%20Slack) or tweet :bird: at us [@dripberlin](https://twitter.com/dripberlin).
## What should I know before I get started? ## What should I know before I get started?
We have prepared something for **you**: check out our [README](https://gitlab.com/bloodyhealth/drip/blob/master/README.md) for more information on how to set up and install everything you'll need. We have prepared something for **you**: check out our [README](https://gitlab.com/bloodyhealth/drip/blob/master/README.md) for more information on how to set up and install everything you'll need.
[Ping us](mailto:bl00dyhealth@mailbox.org) if you could need some help :helmet\_with\_cross: ! [Ping us](mailto:drip@mailbox.org) if you could need some help :helmet\_with\_cross: !
Let us know if you want to suggest improvements for the README and open a merge request (which is just like Github's pull request) Let us know if you want to suggest improvements for the README and open a merge request (which is just like Github's pull request)
## How can I condribute? ## How can I condripute?
### Your First Code Condribution ### Your First Code Condripution
We are fans of labels, at least for our issues. You can find a list of `newbie` issues [here](https://gitlab.com/bloodyhealth/drip/issues?label_name%5B%5D=Newbie). We are fans of labels, at least for our issues. You can find a list of `newbie` issues [here](https://gitlab.com/bloodyhealth/drip/issues?label_name%5B%5D=Newbie).
If you decide to work on an issue, please click on `Create branch` based on that issue. You can find this as a dropdown option right under `Create merge request`. If you decide to work on an issue, please click on `Create branch` based on that issue. You can find this as a dropdown option right under `Create merge request`.
@@ -54,5 +54,5 @@ To send us a new issue you can also use our [gitlab email](mailto:incoming+blood
![](https://media.giphy.com/media/kPA88elN9kYco/giphy.gif) ![](https://media.giphy.com/media/kPA88elN9kYco/giphy.gif)
Thank you for condributing to open source, thank you for condributing to drip! Thank you for condriputing to open source, thank you for condriputing to drip!
Much love from Bloody Health :heart\_exclamation: Much love from Bloody Health :heart\_exclamation:
+143 -47
View File
@@ -1,106 +1,202 @@
# drip, the open-source cycle tracking app # drip, the open-source cycle tracking app
A menstrual cycle tracking app that's open-source and leaves your data on your phone. Use it to track your menstrual cycle and/or for fertility awareness! A menstrual cycle tracking app that's open-source and leaves your data on your phone. Use it to track your menstrual cycle and/or for fertility awareness!
Find more information on [our website](https://bloodyhealth.gitlab.io/). Find more information on [our website](https://dripapp.org/).
The app is build in React Native and currently developed for Android. [<img src="https://dripapp.org/assets/get.png"
alt="Get it here"
height="55">](https://dripapp.org/release/8.apk)
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png"
alt="Get it on F-Droid"
height="80">](https://f-droid.org/packages/com.drip/)
[<img src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png"
alt="Get it on Google Play"
height="80">](https://play.google.com/store/apps/details?id=com.drip)
Here --> you will find our [contributing guide](https://gitlab.com/bloodyhealth/drip/blob/master/CONTRIBUTING.md). The app is built in React Native and currently developed for Android.
▶ [How to contribute to the project](https://gitlab.com/bloodyhealth/drip/blob/master/CONTRIBUTING.md)
▶ [How to release a new version](https://gitlab.com/bloodyhealth/drip/blob/master/RELEASE.md)
## Development setup ## Development setup
1. Install [Android Studio](https://developer.android.com/studio/) - you'll need it to install some dependencies. #### 1. Android Studio
1. Make sure you are running Node 8 (newer versions wont work). It's easiest to switch Node versions using `nvm`, heres how to do it: Install [Android Studio](https://developer.android.com/studio/) - you'll need it to install some dependencies.
#### 2. Node & npm version
Make sure you are running Node 14 and npm 6.14.17. It's easiest to switch Node versions using `nvm`, here's how to do it:
```
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash $ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
$ nvm install v8 $ nvm install v14.19.3
```
1. Clone this repository: #### 3. Get this repository
Clone it with SSH
```
$ git clone git@gitlab.com:bloodyhealth/drip.git $ git clone git@gitlab.com:bloodyhealth/drip.git
or clone it with HTTPS
$ git clone https://gitlab.com/bloodyhealth/drip.git
and run
$ cd drip $ cd drip
```
and run
```
$ npm install $ npm install
```
1. Open Android Studio and click on "Open an existing Android Studio project". Navigate to the drip repository you cloned and double click the android folder. It detects, downloads and cofigures requirements that might be missing, like the NDK and CMake to build the native code part of the project. Also see the [nodejs-mobile repository](https://github.com/janeasystems/nodejs-mobile) for the necessary prerequisites for your system. #### 4. More requirements from Android Studio
1. Either start a [virtual device in Android Studio](https://developer.android.com/studio/run/emulator) or [set your physical device like your Android phone up](https://developer.android.com/training/basics/firstapp/running-app) to run the app. Open Android Studio and click on "Open an existing Android Studio project". Navigate to the drip repository you cloned and double click the android folder. It detects, downloads and cofigures requirements that might be missing, like the NDK and CMake to build the native code part of the project. Also see the [nodejs-mobile repository](https://github.com/janeasystems/nodejs-mobile) for the necessary prerequisites for your system.
1. Open a terminal and run #### 5. Run the app on Android
```
$ npm run android
```
1. To see logging output, run the following command in another tab: Either start a [virtual device in Android Studio](https://developer.android.com/studio/run/emulator) or [set your physical device like your Android phone up](https://developer.android.com/training/basics/firstapp/running-app) to run the app.
```
$ npm run log
```
1. Run the following command and select enable hot reloading (see https://facebook.github.io/react-native/docs/debugging.html): 1. Open a terminal and run
```
$ adb shell input keyevent 82
```
1. We recommend installing an [ESLint plugin in your editor](https://eslint.org/docs/user-guide/integrations#editors). There's an `.eslintrc` file in this project which will be used by the plugin to check your code for style errors and potential bugs. ```
$ npm run android
```
2. To see logging output, run the following command in another tab:
```
$ npm run log
```
3. Run the following command and select enable hot reloading (see https://facebook.github.io/react-native/docs/debugging.html):
```
$ adb shell input keyevent 82
```
4. We recommend installing an [ESLint plugin in your editor](https://eslint.org/docs/user-guide/integrations#editors). There's an `.eslintrc` file in this project which will be used by the plugin to check your code for style errors and potential bugs.
#### 6. Run app on iOS
Minimum system requirements to run iOS app are as follows:
- MacOS 10.15.7 for Mac users
- Xcode 12.3 (I assume, that only command line tools might be enough)
1. Install XCode dependencies by running the following command from the root project directory:
```
$ cd ios && pod install && cd ..
```
2. To run app either open drip workspace ('drip.xcworkspace' file) with XCode and run "Build" or run the following command:
```
$ npm run ios
```
3. If you are building the app with XCode make sure you are running this as well:
`$ npm start`
### Troubleshooting ### Troubleshooting
#### [MacOS] Java problems #### [MacOS] Java problems
Make sure that you have Java 1.8 by running `java -version`. Make sure that you have Java 1.8 by running `java -version`.
If you don't have Java installed, or your Java version is different, the app may not work. You can try just using Android Studio's Java by prepending it to your `$PATH` in your shell profile: If you don't have Java installed, or your Java version is different, the app may not work. You can try just using Android Studio's Java by prepending it to your `$PATH` in your shell profile:
`$ export PATH="/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin:${PATH}"`
```
$ export PATH="/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin:${PATH}"
```
Now, `which java` should output `/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java`, and the correct Java version should be used. Now, `which java` should output `/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java`, and the correct Java version should be used.
#### [MacOS] Ninja #### [MacOS] Ninja
If `npm` says `CMake was unable to find a build program corresponding to "Ninja".`: If `npm` says `CMake was unable to find a build program corresponding to "Ninja".`:
``` `$ brew install ninja`
$ brew install ninja
```
### [MacOS] adb not on the path ### [MacOS] adb not on the path
If you get error messages about `adb` not being found on your path: If you get error messages about `adb` not being found on your path:
``` `$ ln -s ~/Library/Android/sdk/platform-tools/adb /usr/local/bin/adb`
$ ln -s ~/Library/Android/sdk/platform-tools/adb /usr/local/bin/adb
```
### [Windows 10] react native problems ### [MacOS] and XCode 12.5
Unfortunately, the react native version we use doesn't work on Windows 10 it seems, find [more info here](https://github.com/facebook/react-native/issues/20015). If you run XCode 12.5, more likely you'll have problems building app for iOS. Please use the following fix: https://stackoverflow.com/a/67320887.
If you experience any further issues, please feel free to check out the following threads:
- [react-native run-ios build failure on XCode 12.5 beta](https://github.com/react-native-community/cli/issues/1365)
- [Xcode 12.5 troubleshooting guide (RN 0.61/0.62/0.63/0.64)](https://github.com/facebook/react-native/issues/31480)
### Clearing project cache
If you would like to clear project cache and/or re-install project libraries, you can run clear script as follows:
$ npm run clear
Script accepts the following options:
"none" - script will delete all caches and re-install project libraries,
"ios" - script will delete ios-related cache
"android" - script will delete android-related cache
"cache" - script will purge Watchman, Metrobundler, Pachager and React caches
"npm" - script will reinstall project libraries.
For example, if you would like to clear android part of the project and re-install project libraries, you can run the following command:
$ npm run clear android npm
## Tests ## Tests
### Unit tests
You can run the tests with: You can run the tests with:
``` `$ npm test`
$ npm test
``` ### End to end tests
1. Check what testing device is specified in [package.json](https://gitlab.com/bloodyhealth/drip/blob/master/package.json) under:
```
{"detox":
{"configurations":
{"name": "NEXUS_DEVICE_OR_WHATEVER_SPECIFIED_DEVICE"}
}
}
```
2. Check if the current device is already installed on your machine. Go to `cd ~/Android/sdk/emulator/` or wherever you have Android installed on your machine. Here you can run `./emulator -list-avds` and compare the devices with the one you found in step 1.
3. Open Android Studio and go to -> Tools -> AVD manager -> `+Create virtual device` and select the device checked in the previous step
4. Use the emulator on your machine to run it without heavy Android Studio, e.g. in `~/Android/Sdk/emulator` OR chose to run the emulator within Android Studio
4.1 Here run: `$ ./emulator -avd NEXUS_DEVICE_OR_WHATEVER_SPECIFIED_DEVICE`
4.2 You might need to specify the following environment variables in your zsh or bash file according to where you have it installed. You can find exact path in Android Studio (Android Studio Preferences → Appearance and Behavior → System Settings → Android SDK). After adding environment variables, you might need to restart your terminal or source the modified bash profile (i.e. "source ~/.bash_profile").
`export ANDROID_HOME="/home/myname/Android/Sdk" export ANDROID_SDK_ROOT="/home/myname/Android/Sdk" export ANDROID_AVD_HOME="/home/myname/.android/avd"`
5. For the first time you need to get the app on the phone or if you run into this error:
`'app-debug-androidTest.apk' could not be found`
--> open a new 2nd tab and run (in your drip folder): `cd android and ./gradlew assembleAndroidTest`
Otherwise just open a new 2nd tab to run (in your drip folder) `npm run android`
6. Open a new 3rd tab to run `./node_modules/.bin/detox test -c android.emu.debug`
Hopefully you see the magic happening clicking through the app and happy test results on your console :sun_with_face: !
## Debugging ## Debugging
In order to see logging output from the app, run `npm run log` in a separate terminal. You can output specific code you want to see, with: In order to see logging output from the app, run `npm run log` in a separate terminal. You can output specific code you want to see, with:
`console.log(theVariableIWantToSeeHere)` `console.log(theVariableIWantToSeeHere)`
or just a random string to check if this piece of code is actually running: or just a random string to check if this piece of code is actually running:
`console.log("HELLO")`. `console.log("HELLO")`.
## NFP rules ## NFP rules
More information about how the app calculates fertility status and bleeding predictions in the [wiki on Gitlab](https://gitlab.com/bloodyhealth/drip/wikis/home)
More information about how the app calculates fertility status and bleeding predictions in the [wiki on Gitlab](https://gitlab.com/bloodyhealth/drip/wikis/home).
## Adding a new tracking icon ## Adding a new tracking icon
1. We use [fontello](http://fontello.com/) to create icon fonts for us. You need to upload the complete set of tracking icons (bleeding, mucus, ...) including the new icon you wish to add, all in SVG. 1. We use [fontello](http://fontello.com/) to create icon fonts for us. You need to upload the complete set of tracking icons (bleeding, cervical mucus, ...) including the new icon you wish to add, all in SVG.
2. Download webfont from fontello 2. Download webfont from fontello.
3. Copy both the content of `config.json` and `font.tff` into `assets/fonts`, replacing it with the current content of `config-drip-icon-font.json` and `drip-icon-font.tff`. 3. Copy both the content of `config.json` and `font.tff` into `assets/fonts`, replacing it with the current content of `config-drip-icon-font.json` and `drip-icon-font.tff`.
4. Now run the following command in your console: 4. Now run the following command in your console:
``` ```
$ react-native link $ react-native link
``` ```
5. You should be able to use the icon now within drip, e.g. in Cycle Day Overview and on the chart. 5. You should be able to use the icon now within drip, e.g. in Cycle Day Overview and on the chart.
## Translation
We are using [Weblate](https://weblate.org/) as translation software.
+33
View File
@@ -0,0 +1,33 @@
# How to release a new version
Note: You need the release-key to bundle a release that can be uploaded to Google Play Store.
Run the release wizard that takes you through all the steps necessary to prepare a new release:
```
npm run release
```
This will trigger the following:
* update version number
* create a new tag for the release
* update the changelog
* make a release commit
To then bundle a release run the following command on your branch:
```
cd android && ./gradlew bundleRelease
```
This command creates an `app.aab` file in the folder `/android/app/build/outputs/bundle/release`.
[More on Android App Bundle](https://blog.swmansion.com/make-your-react-native-app-3x-smaller-44c993eda2c9)
You need to manually push the created tag to Gitlab:
```
git push origin <tagname>
```
Also don't forget to push your branch to Gitlab and review and merge it if ready!
Yay, done (have a scoop of ice cream, I suggest coconut 🍦)!
+67 -17
View File
@@ -18,6 +18,9 @@ import com.android.build.OutputFile
* // the entry file for bundle generation * // the entry file for bundle generation
* entryFile: "index.android.js", * entryFile: "index.android.js",
* *
* // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
* bundleCommand: "ram-bundle",
*
* // whether to bundle JS and assets in debug mode * // whether to bundle JS and assets in debug mode
* bundleInDebug: false, * bundleInDebug: false,
* *
@@ -73,7 +76,8 @@ import com.android.build.OutputFile
*/ */
project.ext.react = [ project.ext.react = [
entryFile: "index.js" entryFile: "index.js",
enableHermes: false, // clean and rebuild if changing
] ]
apply from: "../../node_modules/react-native/react.gradle" apply from: "../../node_modules/react-native/react.gradle"
@@ -94,21 +98,55 @@ def enableSeparateBuildPerCPUArchitecture = false
*/ */
def enableProguardInReleaseBuilds = false def enableProguardInReleaseBuilds = false
/**
* The preferred build flavor of JavaScriptCore.
*
* For example, to use the international variant, you can use:
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
*
* The international variant includes ICU i18n library and necessary data
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
* give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc:+'
/**
* Whether to enable the Hermes VM.
*
* This should be set on project.ext.react and mirrored here. If it is not set
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
* and the benefits of using Hermes will therefore be sharply reduced.
*/
def enableHermes = project.ext.react.get("enableHermes", false);
android { android {
compileSdkVersion rootProject.ext.compileSdkVersion compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion buildToolsVersion rootProject.ext.buildToolsVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig { defaultConfig {
applicationId "com.drip" applicationId "com.drip"
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1 versionCode 8
versionName "1.0" versionName "1.2102.28"
ndk { ndk {
abiFilters "armeabi-v7a", "x86" abiFilters "armeabi-v7a", "x86"
} }
testBuildType System.getProperty('testBuildType', 'debug') // This will later be used to control the test apk build type
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
} }
signingConfigs { signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
release { release {
if (project.hasProperty('DRIP_RELEASE_STORE_FILE')) { if (project.hasProperty('DRIP_RELEASE_STORE_FILE')) {
storeFile file(DRIP_RELEASE_STORE_FILE) storeFile file(DRIP_RELEASE_STORE_FILE)
@@ -123,11 +161,17 @@ android {
reset() reset()
enable enableSeparateBuildPerCPUArchitecture enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86" include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
} }
} }
buildTypes { buildTypes {
debug {
signingConfig signingConfigs.debug
}
release { release {
// Caution! In production, you need to generate your own keystore file.
// see https://facebook.github.io/react-native/docs/signed-apk-android.
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release signingConfig signingConfigs.release
@@ -137,8 +181,8 @@ android {
applicationVariants.all { variant -> applicationVariants.all { variant ->
variant.outputs.each { output -> variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here: // For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits // https://developer.android.com/studio/build/configure-apk-splits.html
def versionCodes = ["armeabi-v7a":1, "x86":2] def versionCodes = ["armeabi-v7a": 1, "x86": 2]
def abi = output.getFilter(OutputFile.ABI) def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride = output.versionCodeOverride =
@@ -149,17 +193,21 @@ android {
} }
dependencies { dependencies {
compile project(':nodejs-mobile-react-native') implementation fileTree(dir: "libs", include: ["*.jar"])
compile project(':react-native-restart') implementation 'androidx.appcompat:appcompat:1.0.0'
compile project(':react-native-push-notification') implementation 'androidx.annotation:annotation:1.1.0'
compile project(':react-native-vector-icons') implementation "com.facebook.react:react-native:+" // From node_modules
compile project(':react-native-fs')
compile project(':react-native-document-picker') if (enableHermes) {
compile project(':react-native-share') def hermesPath = "../../node_modules/hermes-engine/android/";
compile project(':realm') debugImplementation files(hermesPath + "hermes-debug.aar")
compile fileTree(dir: "libs", include: ["*.jar"]) releaseImplementation files(hermesPath + "hermes-release.aar")
compile "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}" } else {
compile "com.facebook.react:react-native:+" // From node_modules implementation jscFlavor
}
androidTestImplementation('com.wix:detox:+') { transitive = true }
androidTestImplementation 'junit:junit:4.12'
} }
// Run this once to be able to run the application with BUCK // Run this once to be able to run the application with BUCK
@@ -168,3 +216,5 @@ task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile from configurations.compile
into 'libs' into 'libs'
} }
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
Binary file not shown.
@@ -0,0 +1,24 @@
package com.drip;
import com.wix.detox.Detox;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import androidx.test.rule.ActivityTestRule;
@RunWith(AndroidJUnit4.class)
@LargeTest
public class DetoxTest {
@Rule
public ActivityTestRule<MainActivity> mActivityRule = new ActivityTestRule<>(MainActivity.class, false, false);
@Test
public void runDetoxTests() {
Detox.runTests(mActivityRule);
}
}
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
</manifest>
+16 -27
View File
@@ -7,6 +7,11 @@
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission tools:node="remove" android:name="android.permission.READ_PHONE_STATE" />
<uses-permission tools:node="remove" android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission tools:node="remove" android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<permission <permission
android:name="${applicationId}.permission.C2D_MESSAGE" android:name="${applicationId}.permission.C2D_MESSAGE"
@@ -20,13 +25,15 @@
android:name=".MainApplication" android:name=".MainApplication"
android:label="@string/app_name" android:label="@string/app_name"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false" android:allowBackup="false"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:label="@string/app_name" android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize"> android:windowSoftInputMode="adjustResize"
android:screenOrientation="sensorPortrait">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
@@ -34,7 +41,7 @@
</activity> </activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" /> <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<provider <provider
android:name="android.support.v4.content.FileProvider" android:name="androidx.core.content.FileProvider"
android:authorities="com.drip.provider" android:authorities="com.drip.provider"
android:grantUriPermissions="true" android:grantUriPermissions="true"
android:exported="false"> android:exported="false">
@@ -44,47 +51,29 @@
android:resource="@xml/filepaths" /> android:resource="@xml/filepaths" />
</provider> </provider>
<meta-data android:name="com.dieam.reactnativepushnotification.notification_channel_name" <meta-data android:name="com.dieam.reactnativepushnotification.notification_foreground"
android:value="drip-notification"/> android:value="false"/>
<meta-data android:name="com.dieam.reactnativepushnotification.notification_channel_description"
android:value="notifications from drip"/>
<!-- Change the resource name to your App's accent color - or any other color you want --> <!-- Change the resource name to your App's accent color - or any other color you want -->
<meta-data android:name="com.dieam.reactnativepushnotification.notification_color" <meta-data android:name="com.dieam.reactnativepushnotification.notification_color"
android:resource="@android:color/white"/> android:resource="@android:color/white"/> <!-- or @android:color/{name} to use a standard color -->
<!-- < Only if you're using GCM or localNotificationSchedule() > -->
<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="${applicationId}" />
</intent-filter>
</receiver>
<!-- < Only if you're using GCM or localNotificationSchedule() > -->
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationActions" />
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher" /> <receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher" />
<receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver"> <receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" /> <action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/>
</intent-filter> </intent-filter>
</receiver> </receiver>
<service android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationRegistrationService"/>
<service <service
android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService" android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService"
android:exported="false" > android:exported="false" >
<intent-filter> <intent-filter>
<!-- < Only if you're using GCM or localNotificationSchedule() > -->
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<!-- < Only if you're using GCM or localNotificationSchedule() > -->
<!-- <Else> -->
<action android:name="com.google.firebase.MESSAGING_EVENT" /> <action android:name="com.google.firebase.MESSAGING_EVENT" />
<!-- </Else> -->
</intent-filter> </intent-filter>
</service> </service>
</application> </application>
</manifest> </manifest>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 59 KiB

@@ -4,12 +4,12 @@ import com.facebook.react.ReactActivity;
public class MainActivity extends ReactActivity { public class MainActivity extends ReactActivity {
/** /**
* Returns the name of the main component registered from JavaScript. * Returns the name of the main component registered from JavaScript. This is used to schedule
* This is used to schedule rendering of the component. * rendering of the component.
*/ */
@Override @Override
protected String getMainComponentName() { protected String getMainComponentName() {
return "home"; return "drip";
} }
} }
@@ -1,53 +1,39 @@
package com.drip; package com.drip;
import android.app.Application; import android.app.Application;
import android.content.Context;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication; import com.facebook.react.ReactApplication;
import com.janeasystems.rn_nodejs_mobile.RNNodeJsMobilePackage;
import com.avishayil.rnrestart.ReactNativeRestartPackage;
import com.dieam.reactnativepushnotification.ReactNativePushNotificationPackage;
import com.oblador.vectoricons.VectorIconsPackage;
import com.rnfs.RNFSPackage;
import com.reactnativedocumentpicker.ReactNativeDocumentPicker;
import cl.json.RNSharePackage;
import cl.json.ShareApplication; import cl.json.ShareApplication;
import io.realm.react.RealmReactPackage;
import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage; import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader; import com.facebook.soloader.SoLoader;
import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;
import java.util.List; import java.util.List;
public class MainApplication extends Application implements ReactApplication, ShareApplication { public class MainApplication extends Application implements ReactApplication, ShareApplication {
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { private final ReactNativeHost mReactNativeHost =
@Override new ReactNativeHost(this) {
public boolean getUseDeveloperSupport() { @Override
return BuildConfig.DEBUG; public boolean getUseDeveloperSupport() {
} return BuildConfig.DEBUG;
}
@Override @Override
protected List<ReactPackage> getPackages() { protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList( @SuppressWarnings("UnnecessaryLocalVariable")
new MainReactPackage(), List<ReactPackage> packages = new PackageList(this).getPackages();
new RNNodeJsMobilePackage(), // Packages that cannot be autolinked yet can be added manually here, for example:
new ReactNativeRestartPackage(), // packages.add(new MyReactNativePackage());
new ReactNativePushNotificationPackage(), return packages;
new VectorIconsPackage(), }
new RNFSPackage(),
new ReactNativeDocumentPicker(),
new RNSharePackage(),
new RealmReactPackage()
);
}
@Override @Override
protected String getJSMainModuleName() { protected String getJSMainModuleName() {
return "index"; return "index";
} }
}; };
@Override @Override
public ReactNativeHost getReactNativeHost() { public ReactNativeHost getReactNativeHost() {
@@ -58,6 +44,32 @@ public class MainApplication extends Application implements ReactApplication, Sh
public void onCreate() { public void onCreate() {
super.onCreate(); super.onCreate();
SoLoader.init(this, /* native exopackage */ false); SoLoader.init(this, /* native exopackage */ false);
initializeFlipper(this); // Remove this line if you don't want Flipper enabled
}
/**
* Loads Flipper in React Native templates.
*
* @param context
*/
private static void initializeFlipper(Context context) {
if (BuildConfig.DEBUG) {
try {
/*
We use reflection here to pick up the class that initializes Flipper,
since Flipper library is not available in release mode
*/
Class<?> aClass = Class.forName("com.facebook.flipper.ReactNativeFlipper");
aClass.getMethod("initializeFlipper", Context.class).invoke(null, context);
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
} }
@Override @Override
Binary file not shown.
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<font-family xmlns:android="http://schemas.android.com/apk/res/android">
<font
android:font="@font/jost400"
android:fontStyle="normal"
android:fontWeight="400" />
</font-family>
@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 430 B

After

Width:  |  Height:  |  Size: 919 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 327 B

After

Width:  |  Height:  |  Size: 542 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 642 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 879 B

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

@@ -9,4 +9,9 @@
<!-- a secondary color for controls like checkboxes and text fields --> <!-- a secondary color for controls like checkboxes and text fields -->
<color name="colorAccent">#4FAFA7</color> <color name="colorAccent">#4FAFA7</color>
<!-- custom colors -->
<color name="grey">#A5A5A5</color>
<color name="orange">#F38337</color>
<color name="purple">#3A2671</color>
</resources> </resources>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<color name="ic_launcher_background">#000D19</color> <color name="ic_launcher_background">#3A2671</color>
</resources> </resources>
@@ -3,7 +3,28 @@
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. --> <!-- Customize your theme here. -->
<item name="android:textColor">#000000</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item>
</style> </style>
<style name="ButtonBarStyle" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog">
<item name="android:textSize">16sp</item>
<item name="android:textColor">@color/grey</item>
</style>
<style name="PositiveButtonStyle" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog">
<item name="android:textSize">16sp</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">@color/orange</item>
</style>
<style name="TitleStyle" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog">
<item name="android:gravity">left</item>
<item name="android:textColor">@color/purple</item>
<item name="android:textSize">22sp</item>
<item name="android:textStyle">bold</item>
</style>
</resources> </resources>
@@ -0,0 +1,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.drip"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission tools:node="remove" android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission tools:node="remove" android:name="android.permission.INTERNET" />
</manifest>
+30 -22
View File
@@ -5,50 +5,58 @@ buildscript {
jcenter() jcenter()
google() google()
} }
ext.kotlinVersion = '1.3.10'
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.1.0' classpath("com.android.tools.build:gradle:3.4.2")
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
} }
} }
allprojects { allprojects {
repositories { repositories {
mavenLocal() mavenLocal()
jcenter()
maven { maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android" url("$rootDir/../node_modules/react-native/android")
} }
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
jcenter()
maven { url 'https://jitpack.io' }
maven { maven {
url 'https://maven.google.com/' url 'https://maven.google.com/'
name 'Google' name 'Google'
} }
maven {
// All of Detox' artifacts are provided via the npm module
url "$rootDir/../node_modules/detox/Detox-android"
}
} }
} }
ext { ext {
buildToolsVersion = "26.0.3" googlePlayServicesVersion = "+" // default: "+"
minSdkVersion = 16 firebaseMessagingVersion = "21.1.0" // default: "+"
compileSdkVersion = 26
targetSdkVersion = 26 buildToolsVersion = "29.0.3"
supportLibVersion = "26.1.0" minSdkVersion = 23
compileSdkVersion = 29
targetSdkVersion = 29
} }
subprojects {project -> subprojects {
buildscript { afterEvaluate {project ->
repositories { if (project.hasProperty("android")) {
maven { url = 'https://dl.bintray.com/android/android-tools/' } android {
compileSdkVersion 29
buildToolsVersion '29.0.3'
}
}
} }
}
// https://stackoverflow.com/questions/52613089/getting-verifyreleaseresources-error-after-upgrading-react-native
afterEvaluate {
if (project.hasProperty("android")) {
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
}
}
}
} }
+2 -2
View File
@@ -16,5 +16,5 @@
# This option should only be used with decoupled projects. More details, visit # This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true # org.gradle.parallel=true
android.enableJetifier=true
android.useDeprecatedNdk=true android.useAndroidX=true
Binary file not shown.
+1 -1
View File
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
+17 -1
View File
@@ -1,5 +1,21 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
############################################################################## ##############################################################################
## ##
## Gradle start up script for UN*X ## Gradle start up script for UN*X
@@ -7,7 +23,7 @@
############################################################################## ##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS="" DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
APP_NAME="Gradle" APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"` APP_BASE_NAME=`basename "$0"`
+17 -1
View File
@@ -1,3 +1,19 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off @if "%DEBUG%" == "" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@@ -9,7 +25,7 @@
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS= set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%" == "" set DIRNAME=.
-8
View File
@@ -1,8 +0,0 @@
keystore(
name = "debug",
properties = "debug.keystore.properties",
store = "debug.keystore",
visibility = [
"PUBLIC",
],
)
@@ -1,4 +0,0 @@
key.store=debug.keystore
key.alias=androiddebugkey
key.store.password=android
key.alias.password=android
+1 -16
View File
@@ -1,19 +1,4 @@
rootProject.name = 'drip' rootProject.name = 'drip'
include ':nodejs-mobile-react-native' apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
project(':nodejs-mobile-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/nodejs-mobile-react-native/android')
include ':react-native-restart'
project(':react-native-restart').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-restart/android')
include ':react-native-push-notification'
project(':react-native-push-notification').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-push-notification/android')
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
include ':react-native-fs'
project(':react-native-fs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fs/android')
include ':react-native-document-picker'
project(':react-native-document-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-document-picker/android')
include ':react-native-share'
project(':react-native-share').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-share/android')
include ':realm'
project(':realm').projectDir = new File(rootProject.projectDir, '../node_modules/realm/android')
include ':app' include ':app'
+2 -2
View File
@@ -1,4 +1,4 @@
{ {
"name": "drip", "name": "drip.",
"displayName": "drip" "displayName": "drip."
} }
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

+155
View File
@@ -0,0 +1,155 @@
import React from 'react'
import { ScrollView, StyleSheet, View } from 'react-native'
import PropTypes from 'prop-types'
import moment from 'moment'
import { connect } from 'react-redux'
import { navigate } from '../slices/navigation'
import { getDate, setDate } from '../slices/date'
import AppText from './common/app-text'
import Button from './common/button'
import cycleModule from '../lib/cycle'
import { getFertilityStatusForDay } from '../lib/sympto-adapter'
import { determinePredictionText, formatWithOrdinalSuffix } from './helpers/home'
import { Colors, Fonts, Sizes, Spacing } from '../styles'
import { LocalDate } from 'js-joda'
import { useTranslation } from 'react-i18next'
const Home = ({ navigate, setDate }) => {
const { t } = useTranslation()
function navigateToCycleDayView() {
setDate(todayDateString)
navigate('CycleDay')
}
const todayDateString = LocalDate.now().toString()
const { getCycleDayNumber, getPredictedMenses } = cycleModule()
const cycleDayNumber = getCycleDayNumber(todayDateString)
const { status, phase, statusText } =
getFertilityStatusForDay(todayDateString)
const prediction = determinePredictionText(getPredictedMenses(), t)
const cycleDayText = cycleDayNumber ? formatWithOrdinalSuffix(cycleDayNumber) : ''
return (
<ScrollView
style={styles.container}
contentContainerStyle={styles.contentContainer}
>
<AppText style={styles.title}>{moment().format("MMM Do YYYY")}</AppText>
{cycleDayNumber &&
<View style={styles.line}>
<AppText style={styles.whiteSubtitle}>{cycleDayText}</AppText>
<AppText style={styles.turquoiseText}>{t('labels.home.cycleDay')}</AppText>
</View>
}
{phase &&
<View style={styles.line}>
<AppText style={styles.whiteSubtitle}>
{formatWithOrdinalSuffix(phase)}
</AppText>
<AppText style={styles.turquoiseText}>
{t('labels.home.cyclePhase')}
</AppText>
<AppText style={styles.turquoiseText}>{status}</AppText>
<Asterisk />
</View>
}
<View style={styles.line}>
<AppText style={styles.turquoiseText}>{prediction}</AppText>
</View>
<Button isCTA isSmall={false} onPress={navigateToCycleDayView}>
{t('labels.home.addDataForToday')}
</Button>
{phase && (
<View style={styles.asteriskLine}>
<Asterisk />
<AppText linkStyle={styles.whiteText} style={styles.greyText}>
{statusText}
</AppText>
</View>
)}
</ScrollView>
)
}
const Asterisk = () => {
return <AppText style={styles.asterisk}>*</AppText>
}
const styles = StyleSheet.create({
asterisk: {
color: Colors.orange,
},
container: {
backgroundColor: Colors.purple,
flex: 1,
},
contentContainer: {
padding: Spacing.base,
paddingTop: 0,
},
line: {
flexDirection: 'row',
flexWrap: 'wrap',
alignContent: 'flex-start',
marginBottom: Spacing.tiny,
marginTop: Spacing.small,
},
asteriskLine: {
flexDirection: 'row',
alignContent: 'flex-start',
marginBottom: Spacing.tiny,
marginTop: Spacing.small,
},
title: {
color: Colors.purpleLight,
fontFamily: Fonts.bold,
fontSize: Sizes.huge,
marginVertical: Spacing.small,
},
turquoiseText: {
color: Colors.turquoise,
fontSize: Sizes.subtitle,
},
whiteSubtitle: {
color: 'white',
fontSize: Sizes.subtitle,
},
whiteText: {
color: 'white',
},
greyText: {
color: Colors.greyLight,
paddingLeft: Spacing.base,
}
})
const mapStateToProps = (state) => {
return ({
date: getDate(state),
})
}
const mapDispatchToProps = (dispatch) => {
return ({
navigate: (page) => dispatch(navigate(page)),
setDate: (date) => dispatch(setDate(date)),
})
}
Home.propTypes = {
navigate: PropTypes.func,
setDate: PropTypes.func
}
export default connect(
mapStateToProps,
mapDispatchToProps,
)(Home)
+49
View File
@@ -0,0 +1,49 @@
import React from 'react'
import PropTypes from 'prop-types'
import { BackHandler, StyleSheet, View } from 'react-native'
import { useTranslation } from 'react-i18next'
import AppPage from './common/app-page'
import AppText from './common/app-text'
import Button from './common/button'
import Segment from './common/segment'
import { saveLicenseFlag } from '../local-storage'
import { Containers } from '../styles'
export default function License({ setLicense }) {
const onAcceptLicense = async () => {
await saveLicenseFlag()
setLicense()
}
const { t } = useTranslation()
const currentYear = new Date().getFullYear()
return (
<AppPage testID="licensePage">
<Segment last testID="test" title={t("settings.license.title")}>
<AppText testID="test">{t("settings.license.text", { currentYear })}</AppText>
<View style={styles.container}>
<Button onPress={BackHandler.exitApp} testID="licenseCancelButton">
{t("labels.shared.cancel")}
</Button>
<Button isCTA onPress={onAcceptLicense} testID="licenseOkButton">
{t("labels.shared.ok")}
</Button>
</View>
</Segment>
</AppPage>
)
}
License.propTypes = {
setLicense: PropTypes.func.isRequired
}
const styles = StyleSheet.create({
container: {
...Containers.rowContainer
}
})
-40
View File
@@ -1,40 +0,0 @@
import React from 'react'
import { Text } from 'react-native'
import styles from "../styles"
import Link from './link'
export default function AppText(props) {
// we parse for links in case the text contains any
return (
<Link>
<Text
style={[styles.appText, props.style]}
onPress={props.onPress}
numberOfLines={props.numberOfLines}
>
{props.children}
</Text>
</Link>
)
}
export function ActionHint(props) {
if(props.isVisible) {
return (
<AppText
style={[styles.actionHint, props.style]}>
{props.children}
</AppText>
)
} else {
return null
}
}
export function SymptomSectionHeader(props) {
return (
<AppText style={styles.symptomViewHeading}>
{props.children}
</AppText>
)
}
+82 -22
View File
@@ -1,44 +1,104 @@
import React, { Component } from 'react' import React, { Component } from 'react'
import { View } from 'react-native' import { StyleSheet, View } from 'react-native'
import { Provider } from 'react-redux'
import nodejs from 'nodejs-mobile-react-native' import nodejs from 'nodejs-mobile-react-native'
import { getLicenseFlag, saveEncryptionFlag } from '../local-storage'
import { openDb } from '../db'
import App from './app' import App from './app'
import AppLoadingView from './common/app-loading'
import AppStatusBar from './common/app-status-bar'
import License from './License'
import PasswordPrompt from './password-prompt' import PasswordPrompt from './password-prompt'
import License from './license'
import { getLicenseFlag } from '../local-storage' import store from '../store'
export default class AppWrapper extends Component { export default class AppWrapper extends Component {
constructor() { constructor() {
super() super()
this.state = { this.state = {
retrievingLicenseSetting: true isCheckingLicenseAgreement: true,
shouldShowLicenseAgreement: false,
shouldShowPasswordPrompt: false,
shouldShowApp: false,
} }
nodejs.start('main.js') nodejs.start('main.js')
this.checkLicenseAgreement() this.checkLicenseAgreement()
this.checkDbPasswordSet()
} }
async checkLicenseAgreement() { async checkLicenseAgreement() {
const agreed = await getLicenseFlag() const isLicenseFlagSet = await getLicenseFlag()
this.setState({retrievingLicenseSetting: false}) if (!isLicenseFlagSet) {
if (!agreed) this.setState({showLicense: true}) this.enableShowLicenseAgreement()
} else {
this.setState({ isCheckingLicenseAgreement: false })
}
}
async checkDbPasswordSet() {
const canConnectToDb = await openDb()
if (canConnectToDb) {
this.enableShowApp()
await saveEncryptionFlag(false)
return false
}
this.setState({ shouldShowPasswordPrompt: true })
await saveEncryptionFlag(true)
}
enableShowLicenseAgreement = () => {
this.setState({
shouldShowLicenseAgreement: true,
isCheckingLicenseAgreement: false,
})
}
disableShowLicenseAgreement = () => {
this.setState({ shouldShowLicenseAgreement: false })
}
enableShowApp = () => {
this.setState({
shouldShowApp: true,
shouldShowPasswordPrompt: false,
})
} }
render() { render() {
const whiteScreen = <View style={{ flex: 1 }}></View> const {
const licenseScreen = <License setLicense={() => { isCheckingLicenseAgreement,
this.setState({showLicense: false}) shouldShowLicenseAgreement,
}}/> shouldShowPasswordPrompt,
const passwordPrompt = <PasswordPrompt showApp={() => { shouldShowApp,
this.setState({showApp: true}) } = this.state
}}/>
if (this.state.retrievingLicenseSetting) { let initialView = null
return whiteScreen
} else if (this.state.showLicense) { if (isCheckingLicenseAgreement) {
return licenseScreen initialView = <AppLoadingView />
} else if (!this.state.showApp) { } else if (shouldShowLicenseAgreement) {
return passwordPrompt initialView = <License setLicense={this.disableShowLicenseAgreement} />
} else { } else if (shouldShowPasswordPrompt) {
return <App/> initialView = <PasswordPrompt enableShowApp={this.enableShowApp} />
} else if (shouldShowApp) {
initialView = <App restartApp={() => this.checkDbPasswordSet()} />
} }
return (
<Provider store={store}>
<View style={styles.container}>
<AppStatusBar />
{initialView}
</View>
</Provider>
)
} }
} }
const styles = StyleSheet.create({
container: {
flex: 1,
},
})
+89 -128
View File
@@ -1,150 +1,111 @@
import React, { Component } from 'react' import React, { Component } from 'react'
import { View, BackHandler } from 'react-native' import { BackHandler, StyleSheet, View } from 'react-native'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { getDate } from '../slices/date'
import { getNavigation, navigate, goBack } from '../slices/navigation'
import Header from './header' import Header from './header'
import Menu from './menu' import Menu from './menu'
import Home from './home' import { viewsList } from './views'
import Calendar from './calendar' import { isSettingsView } from './pages'
import CycleDay from './cycle-day/cycle-day-overview'
import symptomViews from './cycle-day/symptoms' import { headerTitles } from '../i18n/en/labels'
import Chart from './chart/chart'
import SettingsMenu from './settings/settings-menu'
import settingsViews from './settings'
import Stats from './stats'
import {headerTitles, menuTitles} from '../i18n/en/labels'
import InfoSymptom from './cycle-day/symptoms/info-symptom'
import setupNotifications from '../lib/notifications' import setupNotifications from '../lib/notifications'
import { getCycleDay, closeDb } from '../db'
// design wants everyhting lowercased, but we don't class App extends Component {
// have CSS pseudo properties static propTypes = {
const headerTitlesLowerCase = Object.keys(headerTitles).reduce((acc, curr) => { date: PropTypes.string,
acc[curr] = headerTitles[curr].toLowerCase() navigation: PropTypes.object.isRequired,
return acc navigate: PropTypes.func,
}, {}) goBack: PropTypes.func,
restartApp: PropTypes.func,
}
const HOME_PAGE = 'Home'
const INFO_SYMPTOM_PAGE = 'InfoSymptom'
const CYCLE_DAY_PAGE = 'CycleDay'
const SETTINGS_MENU_PAGE = 'SettingsMenu'
export default class App extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state = {
currentPage: HOME_PAGE this.backHandler = BackHandler.addEventListener(
'hardwareBackPress',
this.goBack
)
setupNotifications(this.props.navigate)
}
goBack = () => {
const { currentPage } = this.props.navigation
if (currentPage === 'Home') {
closeDb()
BackHandler.exitApp()
} else {
this.props.goBack()
} }
this.backHandler = BackHandler.addEventListener('hardwareBackPress', this.handleBackButtonPress)
setupNotifications(this.navigate) return true
} }
componentWillUnmount() { componentWillUnmount() {
this.backHandler.remove() this.backHandler.remove()
} }
navigate = (pageName, props) => {
const { currentPage } = this.state
// for the back button to work properly, we want to
// remember two origins: which menu item we came from
// and from where we navigated to the symptom view (day
// view or home page)
if (this.isMenuItem()) {
this.menuOrigin = currentPage
}
if (!this.isSymptomView() && !this.isInfoSymptomView()) {
this.originForSymptomView = currentPage
}
this.setState({ currentPage: pageName, currentProps: props })
}
handleBackButtonPress = () => {
const { currentPage, currentProps } = this.state
if (currentPage === HOME_PAGE) return false
if (this.isSymptomView()) {
this.navigate(
this.originForSymptomView, { date: currentProps.date }
)
} else if (this.isSettingsView()) {
this.navigate(SETTINGS_MENU_PAGE)
} else if (currentPage === CYCLE_DAY_PAGE) {
this.navigate(this.menuOrigin)
} else if (this.isInfoSymptomView()) {
const { date, cycleDay, symptomView } = currentProps
this.navigate(
symptomView, { date, cycleDay })
} else {
this.navigate(HOME_PAGE)
}
return true
}
isMenuItem() {
return Object.keys(menuTitles).includes(this.state.currentPage)
}
isSymptomView() {
return Object.keys(symptomViews).includes(this.state.currentPage)
}
isInfoSymptomView() {
return this.state.currentPage === INFO_SYMPTOM_PAGE
}
isSettingsView() {
return Object.keys(settingsViews).includes(this.state.currentPage)
}
isDefaultView() {
const { currentPage } = this.state
return this.isMenuItem(currentPage) || currentPage === SETTINGS_MENU_PAGE
}
render() { render() {
const { currentPage, currentProps } = this.state const { date, navigation, goBack, restartApp } = this.props
const pages = { const { currentPage } = navigation
Home,
Calendar, if (!currentPage) {
CycleDay, return false
Chart,
InfoSymptom,
SettingsMenu,
...settingsViews,
Stats,
...symptomViews
} }
const page = pages[currentPage]
const title = headerTitlesLowerCase[currentPage] const Page = viewsList[currentPage]
const title = headerTitles[currentPage]
const isSettingsSubView = isSettingsView(currentPage)
const isTemperatureEditView = currentPage === 'TemperatureEditView'
const headerProps = {
title,
handleBack: isSettingsSubView ? goBack : null,
}
const pageProps = {
cycleDay: date && getCycleDay(date),
date,
isTemperatureEditView,
}
return ( return (
<View style={{flex: 1}}> <View style={styles.container}>
{this.isDefaultView() && <Header {...headerProps} />
<Header title={title} /> <Page {...pageProps} restartApp={restartApp} />
} <Menu />
{(this.isInfoSymptomView() || this.isSettingsView()) &&
<Header
title={title}
showBackButton={true}
goBack={this.handleBackButtonPress}
/>
}
{this.isSymptomView() &&
<Header
title={title}
isSymptomView={true}
goBack={this.handleBackButtonPress}
date={currentProps.date}
goToSymptomInfo={() => this.navigate(INFO_SYMPTOM_PAGE, {
symptomView: currentPage,
...currentProps
})}
/>}
{React.createElement(page, {
navigate: this.navigate,
...currentProps
})}
{!this.isSymptomView() &&
<Menu navigate={this.navigate} currentPage={currentPage} />
}
</View> </View>
) )
} }
} }
const styles = StyleSheet.create({
container: {
flex: 1,
},
})
const mapStateToProps = (state) => {
return {
date: getDate(state),
navigation: getNavigation(state),
}
}
const mapDispatchToProps = (dispatch) => {
return {
navigate: (page) => dispatch(navigate(page)),
goBack: () => dispatch(goBack()),
}
}
export default connect(mapStateToProps, mapDispatchToProps)(App)
-20
View File
@@ -1,20 +0,0 @@
import React from 'react'
import { TouchableOpacity } from 'react-native'
import AppText from './app-text'
import styles from '../styles'
export default function Button(props) {
return (
<TouchableOpacity
onPress={props.onPress}
style={[
styles.button,
props.style,
{backgroundColor: props.backgroundColor}
]}>
<AppText style={styles.homeButtonText}>
{props.children}
</AppText>
</TouchableOpacity>
)
}
+57 -77
View File
@@ -1,13 +1,28 @@
import React, { Component } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { StyleSheet, View } from 'react-native'
import { CalendarList } from 'react-native-calendars' import { CalendarList } from 'react-native-calendars'
import { LocalDate } from 'js-joda'
import { connect } from 'react-redux'
import { setDate } from '../slices/date'
import { navigate } from '../slices/navigation'
import { getBleedingDaysSortedByDate } from '../db' import { getBleedingDaysSortedByDate } from '../db'
import cycleModule from '../lib/cycle' import cycleModule from '../lib/cycle'
import { shadesOfRed, calendarTheme } from '../styles/index'
import styles from '../styles/index'
import nothingChanged from '../db/db-unchanged' import nothingChanged from '../db/db-unchanged'
import {
calendarTheme,
predictionToCalFormat,
toCalFormat,
todayToCalFormat,
} from './helpers/calendar'
class CalendarView extends Component {
static propTypes = {
setDate: PropTypes.func.isRequired,
navigate: PropTypes.func.isRequired,
}
export default class CalendarView extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.bleedingDays = getBleedingDaysSortedByDate() this.bleedingDays = getBleedingDaysSortedByDate()
@@ -15,7 +30,7 @@ export default class CalendarView extends Component {
this.state = { this.state = {
bleedingDaysInCalFormat: toCalFormat(this.bleedingDays), bleedingDaysInCalFormat: toCalFormat(this.bleedingDays),
predictedBleedingDaysInCalFormat: predictionToCalFormat(predictedMenses), predictedBleedingDaysInCalFormat: predictionToCalFormat(predictedMenses),
todayInCalFormat: todayToCalFormat() todayInCalFormat: todayToCalFormat(),
} }
this.bleedingDays.addListener(this.setStateWithCalFormattedDays) this.bleedingDays.addListener(this.setStateWithCalFormattedDays)
@@ -27,7 +42,7 @@ export default class CalendarView extends Component {
this.setState({ this.setState({
bleedingDaysInCalFormat: toCalFormat(this.bleedingDays), bleedingDaysInCalFormat: toCalFormat(this.bleedingDays),
predictedBleedingDaysInCalFormat: predictionToCalFormat(predictedMenses), predictedBleedingDaysInCalFormat: predictionToCalFormat(predictedMenses),
todayInCalFormat: todayToCalFormat() todayInCalFormat: todayToCalFormat(),
}) })
} }
@@ -36,84 +51,49 @@ export default class CalendarView extends Component {
} }
passDateToDayView = (result) => { passDateToDayView = (result) => {
const navigate = this.props.navigate this.props.setDate(result.dateString)
navigate('CycleDay', { date: result.dateString }) this.props.navigate('CycleDay')
} }
render() { render() {
const {
todayInCalFormat,
bleedingDaysInCalFormat,
predictedBleedingDaysInCalFormat,
} = this.state
const markedDates = Object.assign(
{},
todayInCalFormat,
bleedingDaysInCalFormat,
predictedBleedingDaysInCalFormat
)
return ( return (
<CalendarList <View style={styles.container}>
onDayPress={this.passDateToDayView.bind(this)} <CalendarList
markedDates={ // If firstDay=1 week starts from Monday. Note that dayNames and dayNamesShort should still start from Sunday.
Object.assign( firstDay={1}
{}, onDayPress={this.passDateToDayView.bind(this)}
this.state.todayInCalFormat, markedDates={markedDates}
this.state.bleedingDaysInCalFormat, markingType='custom'
this.state.predictedBleedingDaysInCalFormat theme={calendarTheme}
) // Max amount of months allowed to scroll to the past.
} pastScrollRange={120}
markingType={'custom'} />
// If firstDay=1 week starts from Monday. Note that dayNames and dayNamesShort should still start from Sunday. </View>
firstDay={1}
theme={calendarTheme}
/>
) )
} }
} }
function toCalFormat(bleedingDaysSortedByDate) { const styles = StyleSheet.create({
const todayDateString = LocalDate.now().toString() container: { flex: 1 },
return bleedingDaysSortedByDate.reduce((acc, day) => { })
acc[day.date] = {
customStyles: {
container: {
backgroundColor: shadesOfRed[day.bleeding.value],
}
}
}
if (day.date === todayDateString) {
acc[day.date].customStyles.text = styles.calendarToday
}
return acc
}, {})
}
function predictionToCalFormat(predictedDays) { const mapDispatchToProps = (dispatch) => {
if (!predictedDays.length) return {} return {
const todayDateString = LocalDate.now().toString() setDate: (date) => dispatch(setDate(date)),
const middleIndex = (predictedDays[0].length - 1) / 2 navigate: (page) => dispatch(navigate(page)),
return predictedDays.reduce((acc, setOfDays) => {
setOfDays.reduce((accSet, day, i) => {
accSet[day] = {
customStyles: {
container: {
borderColor: (i === middleIndex) ? shadesOfRed[3] : shadesOfRed[2],
borderWidth: 3,
},
text: {
marginTop: 1,
}
}
}
if (day === todayDateString) {
accSet[day].customStyles.text = Object.assign(
{},
styles.calendarToday,
{marginTop: -2}
)
}
return accSet
}, acc)
return acc
}, {})
}
function todayToCalFormat() {
const todayDateString = LocalDate.now().toString()
const todayFormated = {}
todayFormated[todayDateString] = {
customStyles: {
text: styles.calendarToday
}
} }
return todayFormated
} }
export default connect(null, mapDispatchToProps)(CalendarView)
+38
View File
@@ -0,0 +1,38 @@
import React from 'react'
import PropTypes from 'prop-types'
import { StyleSheet, View } from 'react-native'
import AppText from '../common/app-text'
import { Typography } from '../../styles'
import { CHART_YAXIS_WIDTH } from '../../config'
import { shared as labels } from '../../i18n/en/labels'
const ChartLegend = ({ height }) => {
return (
<View style={[styles.container, { height }]}>
<AppText style={styles.textBold}>#</AppText>
<AppText style={styles.text}>{labels.date}</AppText>
</View>
)
}
ChartLegend.propTypes = {
height: PropTypes.number.isRequired
}
const styles = StyleSheet.create({
container: {
alignItems: 'center',
justifyContent: 'flex-end',
width: CHART_YAXIS_WIDTH
},
text: {
...Typography.label,
},
textBold: {
...Typography.labelBold
}
})
export default ChartLegend
+28
View File
@@ -0,0 +1,28 @@
import React from 'react'
import PropTypes from 'prop-types'
import { Shape } from 'react-native/Libraries/ART/ReactNativeART'
import { Colors } from '../../styles'
import { CHART_STROKE_WIDTH, CHART_GRID_LINE_HORIZONTAL_WIDTH } from '../../config'
const ChartLine = ({ path, isNfpLine }) => {
const color = isNfpLine ? Colors.orange : Colors.grey
const width = isNfpLine
? CHART_STROKE_WIDTH : CHART_GRID_LINE_HORIZONTAL_WIDTH * 2.5
return (
<Shape d={path} stroke={color} strokeWidth={width} />
)
}
ChartLine.propTypes = {
path: PropTypes.object,
isNfpLine: PropTypes.bool,
}
ChartLine.defaultProps = {
isNfpLine: false
}
export default ChartLine
+204 -160
View File
@@ -1,37 +1,94 @@
import React, { Component } from 'react' import React, { Component } from 'react'
import { View, FlatList, ActivityIndicator } from 'react-native' import PropTypes from 'prop-types'
import { LocalDate } from 'js-joda' import {
import { makeYAxisLabels, makeHorizontalGrid } from './y-axis' ActivityIndicator,
import nfpLines from './nfp-lines' Dimensions,
FlatList,
PixelRatio,
StyleSheet,
View
} from 'react-native'
import AppLoadingView from '../common/app-loading'
import AppPage from '../common/app-page'
import AppText from '../common/app-text'
import DayColumn from './day-column' import DayColumn from './day-column'
import { getCycleDaysSortedByDate, getAmountOfCycleDays } from '../../db' import HorizontalGrid from './horizontal-grid'
import styles from './styles' import NoData from './no-data'
import { cycleDayColor } from '../../styles' import Tutorial from './tutorial'
import { scaleObservable } from '../../local-storage' import YAxis from './y-axis'
import config from '../../config'
import AppText from '../app-text' import { connect } from 'react-redux'
import { shared as labels } from '../../i18n/en/labels' import { navigate } from '../../slices/navigation'
import DripIcon from '../../assets/drip-icons'
import DripHomeIcon from '../../assets/drip-home-icons' import { getCycleDaysSortedByDate } from '../../db'
import nothingChanged from '../../db/db-unchanged' import nothingChanged from '../../db/db-unchanged'
import { getChartFlag, scaleObservable, setChartFlag } from '../../local-storage'
import { makeColumnInfo, nfpLines } from '../helpers/chart'
const symptomIcons = { import {
bleeding: <DripIcon size={16} name='drip-icon-bleeding' color={styles.iconShades.bleeding[3]}/>, CHART_COLUMN_WIDTH,
mucus: <DripIcon size={16} name='drip-icon-mucus' color={styles.iconShades.mucus[4]}/>, CHART_GRID_LINE_HORIZONTAL_WIDTH,
cervix: <DripIcon size={16} name='drip-icon-cervix' color={styles.iconShades.cervix[3]}/>, CHART_SYMPTOM_HEIGHT_RATIO,
desire: <DripIcon size={16} name='drip-icon-desire' color={styles.iconShades.desire[2]}/>, CHART_XAXIS_HEIGHT_RATIO,
sex: <DripIcon size={16} name='drip-icon-sex' color={styles.iconShades.sex[2]}/>, SYMPTOMS
pain: <DripIcon size={16} name='drip-icon-pain' color={styles.iconShades.pain[0]}/>, } from '../../config'
mood: <DripIcon size={16} name='drip-icon-mood' color={styles.iconShades.mood[0]}/>, import { shared } from '../../i18n/en/labels'
note: <DripIcon size={16} name='drip-icon-note' color={styles.iconShades.note[0]}/> import { Colors, Spacing } from '../../styles'
}
class CycleChart extends Component {
static propTypes = {
navigate: PropTypes.func,
end: PropTypes.bool
}
export default class CycleChart extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state = {} this.state = {}
this.cycleDaysSortedByDate = getCycleDaysSortedByDate() this.cycleDaysSortedByDate = getCycleDaysSortedByDate()
this.getFhmAndLtlInfo = nfpLines() this.getFhmAndLtlInfo = nfpLines()
this.shouldShowTemperatureColumn = false
this.checkShouldShowHint()
this.prepareSymptomData()
}
componentWillUnmount() {
this.cycleDaysSortedByDate.removeListener(this.handleDbChange)
this.removeObvListener()
}
checkShouldShowHint = async () => {
const flag = await getChartFlag()
const shouldShowHint = flag === 'true' ? true : false
this.setState({ shouldShowHint })
}
setShouldShowHint = async () => {
await setChartFlag()
this.setState({ shouldShowHint: false })
}
onLayout = () => {
if (this.state.chartHeight) return false
this.reCalculateChartInfo()
this.updateListeners(this.reCalculateChartInfo)
}
prepareSymptomData = () => {
this.symptomRowSymptoms = SYMPTOMS.filter((symptomName) => {
return this.cycleDaysSortedByDate.some(cycleDay => {
return (symptomName !== 'temperature') && cycleDay[symptomName]
})
})
this.chartSymptoms = [...this.symptomRowSymptoms]
if (this.cycleDaysSortedByDate.some(day => day.temperature)) {
this.chartSymptoms.push('temperature')
this.shouldShowTemperatureColumn = true
}
} }
renderColumn = ({ item, index }) => { renderColumn = ({ item, index }) => {
@@ -42,55 +99,34 @@ export default class CycleChart extends Component {
navigate={this.props.navigate} navigate={this.props.navigate}
symptomHeight={this.symptomHeight} symptomHeight={this.symptomHeight}
columnHeight={this.columnHeight} columnHeight={this.columnHeight}
chartHeight={this.state.chartHeight}
symptomRowSymptoms={this.symptomRowSymptoms} symptomRowSymptoms={this.symptomRowSymptoms}
chartSymptoms={this.chartSymptoms} chartSymptoms={this.chartSymptoms}
shouldShowTemperatureColumn={this.shouldShowTemperatureColumn}
getFhmAndLtlInfo={this.getFhmAndLtlInfo} getFhmAndLtlInfo={this.getFhmAndLtlInfo}
xAxisHeight={this.xAxisHeight}
/> />
) )
} }
onLayout = ({ nativeEvent }) => { reCalculateChartInfo = () => {
if (this.state.chartHeight) return const { width, height } = Dimensions.get('window')
const height = nativeEvent.layout.height
const reCalculateChartInfo = () => {
// how many symptoms need to be displayed on the chart's upper symptom row?
this.symptomRowSymptoms = [
'bleeding',
'mucus',
'cervix',
'sex',
'desire',
'pain',
'mood',
'note'
].filter((symptomName) => {
return this.cycleDaysSortedByDate.some(cycleDay => {
return cycleDay[symptomName]
})
})
this.xAxisHeight = height * config.xAxisHeightPercentage this.xAxisHeight = height * 0.7 * CHART_XAXIS_HEIGHT_RATIO
const remainingHeight = height - this.xAxisHeight const remainingHeight = height * 0.7 - this.xAxisHeight
this.symptomHeight = config.symptomHeightPercentage * remainingHeight this.symptomHeight = PixelRatio.roundToNearestPixel(
this.symptomRowHeight = this.symptomRowSymptoms.length * remainingHeight
this.symptomHeight * CHART_SYMPTOM_HEIGHT_RATIO
this.columnHeight = remainingHeight - this.symptomRowHeight )
this.symptomRowHeight = PixelRatio.roundToNearestPixel(
this.symptomRowSymptoms.length * this.symptomHeight
) + CHART_GRID_LINE_HORIZONTAL_WIDTH
this.columnHeight = remainingHeight - this.symptomRowHeight
const chartHeight = this.shouldShowTemperatureColumn ?
height * 0.7 : (this.symptomRowHeight + this.xAxisHeight)
const numberOfColumnsToRender = Math.round(width / CHART_COLUMN_WIDTH)
const columns = makeColumnInfo()
this.chartSymptoms = [...this.symptomRowSymptoms] this.setState({ columns, chartHeight, numberOfColumnsToRender })
if (this.cycleDaysSortedByDate.some(day => day.temperature)) {
this.chartSymptoms.push('temperature')
}
const columnData = this.makeColumnInfo()
this.setState({
columns: columnData,
chartHeight: height
})
}
reCalculateChartInfo()
this.updateListeners(reCalculateChartInfo)
} }
updateListeners(dataUpdateHandler) { updateListeners(dataUpdateHandler) {
@@ -109,115 +145,123 @@ export default class CycleChart extends Component {
this.removeObvListener = scaleObservable(dataUpdateHandler, false) this.removeObvListener = scaleObservable(dataUpdateHandler, false)
} }
componentWillUnmount() {
this.cycleDaysSortedByDate.removeListener(this.handleDbChange)
this.removeObvListener()
}
makeColumnInfo() {
let amountOfCycleDays = getAmountOfCycleDays()
// if there's not much data yet, we want to show at least 30 days on the chart
if (amountOfCycleDays < 30) {
amountOfCycleDays = 30
} else {
// we don't want the chart to end abruptly before the first data day
amountOfCycleDays += 5
}
const localDates = getTodayAndPreviousDays(amountOfCycleDays)
return localDates.map(localDate => localDate.toString())
}
render() { render() {
return ( const {
<View chartHeight,
onLayout={this.onLayout} chartLoaded,
style={{ flexDirection: 'row', flex: 1 }} shouldShowHint,
> numberOfColumnsToRender
{!this.state.chartLoaded && } = this.state
<View style={{width: '100%', justifyContent: 'center', alignItems: 'center'}}> const hasDataToDisplay = this.chartSymptoms.length > 0
<AppText>{labels.loading}</AppText>
</View>
}
{this.state.chartHeight && this.state.chartLoaded && return (
<View> <AppPage
<View style={[styles.yAxis, {height: this.symptomRowHeight}]}> contentContainerStyle={styles.pageContainer}
{this.symptomRowSymptoms.map(symptomName => { onLayout={this.onLayout}
return <View scrollViewStyle={styles.page}
style={{ alignItems: 'center', justifyContent: 'center' }} >
key={symptomName} {!hasDataToDisplay && <NoData />}
width={styles.yAxis.width} {hasDataToDisplay && !chartHeight && !chartLoaded && <AppLoadingView />}
height={this.symptomRowHeight / <View style={styles.chartContainer}>
this.symptomRowSymptoms.length} {shouldShowHint && chartLoaded &&
> <Tutorial onClose={this.setShouldShowHint} />
{symptomIcons[symptomName]} }
</View> {hasDataToDisplay && chartLoaded &&
})} !this.shouldShowTemperatureColumn &&
</View> <View style={styles.centerItem}>
<View style={[styles.yAxis, {height: this.columnHeight}]}> <AppText style={styles.warning}>
{makeYAxisLabels(this.columnHeight)} {shared.noTemperatureWarning}
</View>
<View style={[styles.yAxis, { alignItems: 'center', justifyContent: 'center' }]}>
<DripHomeIcon
name="circle"
size={styles.yAxis.width - 7}
color={cycleDayColor}
/>
<AppText style={[styles.yAxisLabels.dateLabel]}>
{labels.date.toLowerCase()}
</AppText> </AppText>
</View> </View>
</View>} }
{hasDataToDisplay && (
<View style={styles.chartArea}>
{chartHeight && chartLoaded && (
<YAxis
height={this.columnHeight}
symptomsToDisplay={this.symptomRowSymptoms}
symptomsSectionHeight={this.symptomRowHeight}
shouldShowTemperatureColumn=
{this.shouldShowTemperatureColumn}
xAxisHeight={this.xAxisHeight}
/>
)}
{this.state.chartHeight && this.state.chartLoaded && {chartHeight &&
makeHorizontalGrid(this.columnHeight, this.symptomRowHeight) <FlatList
} horizontal={true}
inverted={true}
{this.state.chartHeight && showsHorizontalScrollIndicator={false}
<FlatList data={this.state.columns}
horizontal={true} renderItem={this.renderColumn}
inverted={true} keyExtractor={item => item}
showsHorizontalScrollIndicator={false} initialNumToRender={numberOfColumnsToRender}
data={this.state.columns} windowSize={30}
renderItem={this.renderColumn} onLayout={() => this.setState({chartLoaded: true})}
keyExtractor={item => item} onEndReached={() => this.setState({end: true})}
initialNumToRender={15} ListFooterComponent={<LoadingMoreView end={this.state.end}/>}
windowSize={30} updateCellsBatchingPeriod={800}
onLayout={() => this.setState({chartLoaded: true})} contentContainerStyle={{ height: chartHeight }}
onEndReached={() => this.setState({end: true})} />
ListFooterComponent={<LoadingMoreView end={this.state.end}/>} }
updateCellsBatchingPeriod={800} {chartHeight && chartLoaded && (
/> <React.Fragment>
} {this.shouldShowTemperatureColumn &&
</View> <HorizontalGrid height={this.columnHeight} />
}
</React.Fragment>
)}
</View>
)}
</View>
</AppPage>
) )
} }
} }
function LoadingMoreView(props) { function LoadingMoreView({ end }) {
return ( return (
<View style={styles.loadingMore}> <View style={styles.loadingContainer}>
{!props.end && {!end && <ActivityIndicator size={'large'} color={Colors.orange}/>}
<ActivityIndicator size={'large'} color={'white'}/>
}
</View> </View>
) )
} }
function getTodayAndPreviousDays(n) { LoadingMoreView.propTypes = {
const today = LocalDate.now() end: PropTypes.bool
const targetDate = today.minusDays(n)
function getDaysInRange(currDate, range) {
if (currDate.isBefore(targetDate)) {
return range
} else {
range.push(currDate)
const next = currDate.minusDays(1)
return getDaysInRange(next, range)
}
}
return getDaysInRange(today, [])
} }
const styles = StyleSheet.create({
chartArea: {
flexDirection: 'row'
},
chartContainer: {
flexDirection: 'column'
},
loadingContainer: {
height: '100%',
backgroundColor: Colors.turquoiseLight,
justifyContent: 'center'
},
page: {
marginVertical: Spacing.small
},
pageContainer: {
paddingHorizontal: Spacing.base
},
warning: {
padding: Spacing.large
}
})
const mapDispatchToProps = (dispatch) => {
return({
navigate: (page) => dispatch(navigate(page)),
})
}
export default connect(
null,
mapDispatchToProps,
)(CycleChart)
+65
View File
@@ -0,0 +1,65 @@
import React from 'react'
import PropTypes from 'prop-types'
import { StyleSheet, View } from 'react-native'
import moment from 'moment'
import AppText from '../common/app-text'
import cycleModule from '../../lib/cycle'
import { getOrdinalSuffix } from '../helpers/home'
import { Typography, Sizes } from '../../styles'
const CycleDayLabel = ({ height, date }) => {
const cycleDayNumber = cycleModule().getCycleDayNumber(date)
const cycleDayLabel = cycleDayNumber ? cycleDayNumber : ' '
const momentDate = moment(date)
const dayOfMonth = momentDate.date()
const isFirstDayOfMonth = dayOfMonth === 1
return (
<View style={[styles.container, { height }]}>
<AppText style={styles.textBold}>{cycleDayLabel}</AppText>
<View style={styles.dateLabel}>
<AppText style={styles.text}>
{isFirstDayOfMonth ? momentDate.format('MMM') : dayOfMonth}
</AppText>
{!isFirstDayOfMonth && (
<AppText style={styles.textLight}>
{getOrdinalSuffix(dayOfMonth)}
</AppText>
)}
</View>
</View>
)
}
CycleDayLabel.propTypes = {
height: PropTypes.number,
date: PropTypes.string,
}
const styles = StyleSheet.create({
container: {
alignItems: 'flex-start',
justifyContent: 'flex-end',
left: 4,
},
text: {
...Typography.label,
fontSize: Sizes.small,
},
textBold: {
...Typography.labelBold,
},
textLight: {
...Typography.labelLight,
},
dateLabel: {
flexDirection: 'row',
justifyContent: 'space-around',
alignItems: 'center',
},
})
export default CycleDayLabel
+102 -268
View File
@@ -1,305 +1,139 @@
import React, { Component } from 'react' import React, { Component } from 'react'
import { import PropTypes from 'prop-types'
Text, View, TouchableOpacity import { TouchableOpacity } from 'react-native'
} from 'react-native' import { connect } from 'react-redux'
import { Surface, Group as G, Path, Shape } from 'react-native/Libraries/ART/ReactNativeART'
import { LocalDate } from 'js-joda' import { setDate } from '../../slices/date'
import moment from 'moment' import { navigate } from '../../slices/navigation'
import styles from './styles'
import config from '../../config'
import cycleModule from '../../lib/cycle'
import { getCycleDay } from '../../db' import { getCycleDay } from '../../db'
import DotAndLine from './dot-and-line'
import { normalizeToScale } from './y-axis'
const label = styles.column.label import SymptomCell from './symptom-cell'
import TemperatureColumn from './temperature-column'
import CycleDayLabel from './cycle-day-label'
import {
symptomColorMethods,
getTemperatureProps,
isSymptomDataComplete
} from '../helpers/chart'
class DayColumn extends Component {
static propTypes = {
dateString: PropTypes.string.isRequired,
chartSymptoms: PropTypes.array,
columnHeight: PropTypes.number.isRequired,
getFhmAndLtlInfo: PropTypes.func.isRequired,
navigate: PropTypes.func.isRequired,
setDate: PropTypes.func.isRequired,
shouldShowTemperatureColumn: PropTypes.bool,
symptomHeight: PropTypes.number.isRequired,
symptomRowSymptoms: PropTypes.array,
xAxisHeight: PropTypes.number,
}
export default class DayColumn extends Component {
constructor(props) { constructor(props) {
super() super()
const dateString = props.dateString
const columnHeight = props.columnHeight const { dateString, chartSymptoms, columnHeight } = props
this.getCycleDayNumber = cycleModule().getCycleDayNumber const cycleDayData = getCycleDay(dateString)
const cycleDay = getCycleDay(dateString)
this.data = {} this.data = {}
if (cycleDay) {
this.data = props.chartSymptoms.reduce((acc, symptom) => { if (cycleDayData) {
if (['bleeding', 'temperature', 'mucus', 'desire', 'note'].includes(symptom)) { this.data = chartSymptoms.reduce((symptomDataToDisplay, symptom, ) => {
acc[symptom] = cycleDay[symptom] && cycleDay[symptom].value const symptomData = cycleDayData[symptom]
if (symptom === 'temperature' && acc.temperature) {
acc.y = normalizeToScale(acc.temperature, columnHeight) if (symptomData && symptom === 'temperature') {
const neighbor = getInfoForNeighborColumns(dateString, columnHeight) symptomDataToDisplay[symptom] =
for (const key in neighbor) { getTemperatureProps(symptomData, columnHeight, dateString)
acc[key] = neighbor[key] } else {
} if (symptomData && ! symptomData.exclude) {
// if symptomColorMethods entry doesn't exist for given symptom,
// use 'default'
const getSymptomColorIndex =
symptomColorMethods[symptom] || symptomColorMethods['default']
symptomDataToDisplay[symptom] = getSymptomColorIndex(symptomData)
} }
} else if (symptom === 'cervix') {
acc.cervix = cycleDay.cervix &&
(cycleDay.cervix.opening + cycleDay.cervix.firmness)
} else if (symptom === 'sex') {
// solo = 1 + partner = 2
acc.sex = cycleDay.sex &&
(cycleDay.sex.solo + 2 * cycleDay.sex.partner)
} else if (symptom === 'pain') {
// is any pain documented?
acc.pain = cycleDay.pain &&
Object.values({...cycleDay.pain}).some(x => x === true)
} else if (symptom === 'mood') {
// is mood documented?
acc.mood = cycleDay.mood &&
Object.values({...cycleDay.mood}).some(x => x === true)
} }
acc[`${symptom}Exclude`] = cycleDay[symptom] && cycleDay[symptom].exclude
return acc return symptomDataToDisplay
}, this.data) }, this.data)
} }
this.fhmAndLtl = props.getFhmAndLtlInfo( this.fhmAndLtl = props.getFhmAndLtlInfo(
props.dateString, props.dateString,
this.data.temperature, this.data.temperature ? this.data.temperature.value : null,
props.columnHeight props.columnHeight
) )
} }
onDaySelect = (date) => {
this.props.setDate(date)
this.props.navigate('CycleDay')
}
shouldComponentUpdate() { shouldComponentUpdate() {
return false return false
} }
render() { render() {
const columnElements = [] const { columnHeight,
const dateString = this.props.dateString dateString,
const symptomHeight = this.props.symptomHeight shouldShowTemperatureColumn,
symptomHeight,
if(this.fhmAndLtl.drawLtlAt) { symptomRowSymptoms,
const ltlLine = (<Shape xAxisHeight
stroke={styles.nfpLine.stroke} } = this.props
strokeWidth={styles.nfpLine.strokeWidth}
d={new Path()
.moveTo(0, this.fhmAndLtl.drawLtlAt)
.lineTo(config.columnWidth, this.fhmAndLtl.drawLtlAt)
}
key='ltl'
/>)
columnElements.push(ltlLine)
}
if (this.fhmAndLtl.drawFhmLine) {
const x = styles.nfpLine.strokeWidth / 2
const fhmLine = (<Shape
fill="red"
stroke={styles.nfpLine.stroke}
strokeWidth={styles.nfpLine.strokeWidth}
d={new Path()
.moveTo(x, x)
.lineTo(x, this.props.columnHeight)
}
key='fhm'
/>)
columnElements.push(fhmLine)
}
if (this.data.y) {
columnElements.push(
<DotAndLine
y={this.data.y}
exclude={this.data.temperatureExclude}
rightY={this.data.rightY}
rightTemperatureExclude={this.data.rightTemperatureExclude}
leftY={this.data.leftY}
leftTemperatureExclude={this.data.leftTemperatureExclude}
key='dotandline'
/>
)
}
const cycleDayNumber = this.getCycleDayNumber(dateString)
const dayDate = LocalDate.parse(dateString)
const shortDate = dayDate.dayOfMonth() === 1 ?
moment(dateString, "YYYY-MM-DD").format('MMM')
:
moment(dateString, "YYYY-MM-DD").format('Do')
const boldDateLabel = dayDate.dayOfMonth() === 1 ? {fontWeight: 'bold'} : {}
const cycleDayLabel = (
<Text style = {label.number}>
{cycleDayNumber ? cycleDayNumber : ' '}
</Text>)
const dateLabel = (
<Text style = {[label.date, boldDateLabel]}>
{shortDate}
</Text>
)
const column = (
<G>
<Shape
stroke={styles.column.stroke.color}
strokeWidth={styles.column.stroke.width}
d={new Path().lineTo(0, this.props.chartHeight)}
/>
{ columnElements }
</G>
)
const symptomIconViews = {
bleeding: (
<SymptomIconView
value={this.data.bleeding}
symptomHeight={symptomHeight}
key='bleeding'
>
<View
{...styles.symptomIcon}
backgroundColor={styles.iconShades.bleeding[this.data.bleeding]}
/>
</SymptomIconView>
),
mucus: (
<SymptomIconView
value={this.data.mucus}
symptomHeight={symptomHeight}
key='mucus'
>
<View
{...styles.symptomIcon}
backgroundColor={styles.iconShades.mucus[this.data.mucus]}
/>
</SymptomIconView>
),
cervix: (
<SymptomIconView
value={this.data.cervix}
symptomHeight={symptomHeight}
key='cervix'
>
<View
{...styles.symptomIcon}
// cervix is sum of openess and firmness - fertile only when closed and hard (=0)
backgroundColor={this.data.cervix > 0 ?
styles.iconShades.cervix[2] :
styles.iconShades.cervix[0]
}
/>
</SymptomIconView>
),
sex: (
<SymptomIconView
value={this.data.sex}
symptomHeight={symptomHeight}
key='sex'
>
<View
{...styles.symptomIcon}
backgroundColor={styles.iconShades.sex[this.data.sex - 1]}
/>
</SymptomIconView>
),
desire: (
<SymptomIconView
value={this.data.desire}
symptomHeight={symptomHeight}
key='desire'
>
<View
{...styles.symptomIcon}
backgroundColor={styles.iconShades.desire[this.data.desire]}
/>
</SymptomIconView>
),
pain: (
<SymptomIconView
value={this.data.pain}
symptomHeight={symptomHeight}
key='pain'
>
<View
{...styles.symptomIcon}
backgroundColor={styles.iconShades.pain}
/>
</SymptomIconView>
),
mood: (
<SymptomIconView
value={this.data.mood}
symptomHeight={symptomHeight}
key='mood'
>
<View
{...styles.symptomIcon}
backgroundColor={styles.iconShades.mood}
/>
</SymptomIconView>
),
note: (
<SymptomIconView
value={this.data.note}
symptomHeight={symptomHeight}
key='note'
>
<View
{...styles.symptomIcon}
backgroundColor={styles.iconShades.note}
/>
</SymptomIconView>
)
}
return ( return (
<TouchableOpacity <TouchableOpacity
onPress={() => this.props.navigate('CycleDay', { date: dateString })} onPress={() => this.onDaySelect(dateString)}
activeOpacity={1} activeOpacity={1}
> >
<View>
{this.props.symptomRowSymptoms.map(symptomName => {
return symptomIconViews[symptomName]
})}
</View>
<Surface width={config.columnWidth} height={this.props.columnHeight}> {shouldShowTemperatureColumn && <TemperatureColumn
{column} horizontalLinePosition={this.fhmAndLtl.drawLtlAt}
</Surface> isVerticalLine={this.fhmAndLtl.drawFhmLine}
data={this.data && this.data.temperature}
columnHeight={columnHeight}
/>}
<CycleDayLabel
height={xAxisHeight}
date={dateString}
/>
{ symptomRowSymptoms.map((symptom, i) => {
const hasSymptomData =
Object.prototype.hasOwnProperty.call(this.data, symptom)
return (
<SymptomCell
index={i}
key={symptom}
symptom={symptom}
symptomValue={hasSymptomData && this.data[symptom]}
isSymptomDataComplete={
hasSymptomData && isSymptomDataComplete(symptom, dateString)
}
height={symptomHeight}
/>)
}
)}
<View style={{height: this.props.xAxisHeight}}>
{cycleDayLabel}
{dateLabel}
</View>
</TouchableOpacity> </TouchableOpacity>
) )
} }
} }
const mapDispatchToProps = (dispatch) => {
function SymptomIconView(props) { return({
const style = [styles.symptomRow, {height: props.symptomHeight}] setDate: (date) => dispatch(setDate(date)),
return ( navigate: (page) => dispatch(navigate(page)),
<View style={style}> })
{(typeof props.value === 'number' || props.value === true || typeof props.value === 'string') &&
props.children
}
</View>
)
} }
function getInfoForNeighborColumns(dateString, columnHeight) { export default connect(
const ret = { null,
rightY: null, mapDispatchToProps,
rightTemperatureExclude: null, )(DayColumn)
leftY: null,
leftTemperatureExclude: null
}
const target = LocalDate.parse(dateString)
const dayBefore = target.minusDays(1).toString()
const dayAfter = target.plusDays(1).toString()
const cycleDayBefore = getCycleDay(dayBefore)
const cycleDayAfter = getCycleDay(dayAfter)
if (cycleDayAfter && cycleDayAfter.temperature) {
ret.rightY = normalizeToScale(cycleDayAfter.temperature.value, columnHeight)
ret.rightTemperatureExclude = cycleDayAfter.temperature.exclude
}
if (cycleDayBefore && cycleDayBefore.temperature) {
ret.leftY = normalizeToScale(cycleDayBefore.temperature.value, columnHeight)
ret.leftTemperatureExclude = cycleDayBefore.temperature.exclude
}
return ret
}
+70 -40
View File
@@ -1,57 +1,87 @@
import React, { Component } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { Path, Shape } from 'react-native/Libraries/ART/ReactNativeART' import { Path, Shape } from 'react-native/Libraries/ART/ReactNativeART'
import styles from './styles' import { Colors } from '../../styles'
import config from '../../config'
import {
CHART_COLUMN_WIDTH,
CHART_COLUMN_MIDDLE,
CHART_DOT_RADIUS,
CHART_STROKE_WIDTH
} from '../../config'
export default class DotAndLine extends Component { export default class DotAndLine extends Component {
static propTypes = {
exclude: PropTypes.bool,
leftY: PropTypes.number,
leftTemperatureExclude: PropTypes.bool,
rightY: PropTypes.number,
rightTemperatureExclude: PropTypes.bool,
y: PropTypes.number.isRequired
}
shouldComponentUpdate(newProps) { shouldComponentUpdate(newProps) {
return Object.keys(newProps).some(key => newProps[key] != this.props[key]) return Object.keys(newProps).some(key => newProps[key] != this.props[key])
} }
render() { render() {
const y = this.props.y const {
const exclude = this.props.exclude exclude,
let lineToRight leftTemperatureExclude,
let lineToLeft leftY,
rightTemperatureExclude,
rightY,
y
} = this.props
let excludeLeftLine, excludeRightLine, lineLeft, lineRight
if (this.props.leftY) { if (leftY) {
const middleY = ((this.props.leftY - y) / 2) + y const middleY = ((leftY - y) / 2) + y
const excludedLine = this.props.leftTemperatureExclude || exclude excludeLeftLine = leftTemperatureExclude || exclude
lineToLeft = makeLine(y, middleY, 0, excludedLine) lineLeft = new Path()
.moveTo(CHART_COLUMN_MIDDLE, y)
.lineTo(0, middleY)
} }
if (this.props.rightY) { if (rightY) {
const middleY = ((y - this.props.rightY) / 2) + this.props.rightY const middleY = ((y - rightY) / 2) + rightY
const excludedLine = this.props.rightTemperatureExclude || exclude excludeRightLine = rightTemperatureExclude || exclude
lineToRight = makeLine(y, middleY, config.columnWidth, excludedLine) lineRight = new Path()
.moveTo(CHART_COLUMN_MIDDLE, y)
.lineTo(CHART_COLUMN_WIDTH, middleY)
} }
const dotStyle = exclude ? styles.curveDotsExcluded : styles.curveDots const dot = new Path().moveTo(CHART_COLUMN_MIDDLE , y - CHART_DOT_RADIUS)
const radius = dotStyle.r .arc(0, CHART_DOT_RADIUS * 2, CHART_DOT_RADIUS)
const dot = ( .arc(0, CHART_DOT_RADIUS * -2, CHART_DOT_RADIUS)
<Shape const dotColor = exclude ? Colors.turquoise : Colors.turquoiseDark
d={new Path() const lineColorLeft = excludeLeftLine ?
.moveTo(config.columnMiddle, y - radius) Colors.turquoise : Colors.turquoiseDark
.arc(0, radius * 2, radius) const lineColorRight = excludeRightLine ?
.arc(0, radius * -2, radius) Colors.turquoise : Colors.turquoiseDark
}
fill={dotStyle.fill} return(
key='dot' <React.Fragment>
/> <Shape
d={lineLeft}
stroke={lineColorLeft}
strokeWidth={CHART_STROKE_WIDTH}
key={y}
/>
<Shape
d={lineRight}
stroke={lineColorRight}
strokeWidth={CHART_STROKE_WIDTH}
key={y + CHART_DOT_RADIUS}
/>
<Shape
d={dot}
stroke={dotColor}
strokeWidth={CHART_STROKE_WIDTH}
fill="white"
key='dot'
/>
</React.Fragment>
) )
return [lineToLeft, lineToRight, dot]
} }
} }
function makeLine(currY, middleY, x, excludeLine) {
const lineStyle = excludeLine ? styles.curveExcluded : styles.curve
return <Shape
stroke={lineStyle.stroke}
d={new Path()
.moveTo(config.columnMiddle, currY)
.lineTo(x, middleY)
}
key={x.toString()}
/>
}
+33
View File
@@ -0,0 +1,33 @@
import React from 'react'
import PropTypes from 'prop-types'
import { StyleSheet, View } from 'react-native'
import { getTickPositions } from '../helpers/chart'
import { Colors } from '../../styles'
import { CHART_GRID_LINE_HORIZONTAL_WIDTH, CHART_YAXIS_WIDTH } from '../../config'
const HorizontalGrid = ({ height }) => {
return getTickPositions(height).map(tick => {
return (
<View key={tick} top={tick} {...styles.line}/>
)
})
}
HorizontalGrid.propTypes = {
height: PropTypes.number
}
const styles = StyleSheet.create({
line: {
borderStyle: 'solid',
borderBottomColor: Colors.grey,
borderBottomWidth: CHART_GRID_LINE_HORIZONTAL_WIDTH,
left: CHART_YAXIS_WIDTH,
position:'absolute',
right: 0
}
})
export default HorizontalGrid
-85
View File
@@ -1,85 +0,0 @@
import { getCycleStatusForDay } from '../../lib/sympto-adapter'
import { normalizeToScale } from './y-axis'
export default function () {
const cycle = {
status: null
}
function updateCurrentCycle(dateString) {
// for the NFP lines, we don't care about potentially extending the
// preOvu phase, so we don't include all earlier cycles, as that is
// an expensive db operation at the moment
cycle.status = getCycleStatusForDay(
dateString, { excludeEarlierCycles: true }
)
if(!cycle.status) {
cycle.noMoreCycles = true
return
}
if (cycle.status.phases.preOvulatory) {
cycle.startDate = cycle.status.phases.preOvulatory.start.date
} else {
cycle.startDate = cycle.status.phases.periOvulatory.start.date
}
}
function dateIsInPeriOrPostPhase(dateString) {
return (
dateString >= cycle.status.phases.periOvulatory.start.date
)
}
function precededByAnotherTempValue(dateString) {
return (
// we are only interested in days that have a preceding
// temp
Object.keys(cycle.status.phases).some(phaseName => {
return cycle.status.phases[phaseName].cycleDays.some(day => {
return day.temperature && day.date < dateString
})
})
// and also a following temp, so we don't draw the line
// longer than necessary
&&
cycle.status.phases.postOvulatory.cycleDays.some(day => {
return day.temperature && day.date > dateString
})
)
}
function isInTempMeasuringPhase(temperature, dateString) {
return (
temperature || precededByAnotherTempValue(dateString)
)
}
return function(dateString, temperature, columnHeight) {
const ret = {
drawLtlAt: null,
drawFhmLine: false
}
if (!cycle.status && !cycle.noMoreCycles) updateCurrentCycle(dateString)
if (cycle.noMoreCycles) return ret
if (dateString < cycle.startDate) updateCurrentCycle(dateString)
if (cycle.noMoreCycles) return ret
const tempShift = cycle.status.temperatureShift
if (tempShift) {
if (tempShift.firstHighMeasurementDay.date === dateString) {
ret.drawFhmLine = true
}
if (
dateIsInPeriOrPostPhase(dateString) &&
isInTempMeasuringPhase(temperature, dateString)
) {
ret.drawLtlAt = normalizeToScale(tempShift.ltl, columnHeight)
}
}
return ret
}
}
+44
View File
@@ -0,0 +1,44 @@
import React from 'react'
import { StyleSheet, View } from 'react-native'
import PropTypes from 'prop-types'
import AppText from '../common/app-text'
import Button from '../common/button'
import { connect } from 'react-redux'
import { navigate } from '../../slices/navigation'
import { Containers } from '../../styles'
import { shared } from '../../i18n/en/labels'
const NoData = ({ navigate }) => {
return (
<View style={styles.container}>
<AppText>{shared.noDataWarning}</AppText>
<Button isCTA onPress={() => {navigate('CycleDay')}}>
{shared.noDataButtonText}
</Button>
</View>
)
}
NoData.propTypes = {
navigate: PropTypes.func.isRequired,
}
const styles = StyleSheet.create({
container: {
...Containers.centerItems
}
})
const mapDispatchToProps = (dispatch) => {
return({
navigate: (page) => dispatch(navigate(page)),
})
}
export default connect(
null,
mapDispatchToProps,
)(NoData)
-134
View File
@@ -1,134 +0,0 @@
import config from '../../config'
import { shadesOfRed, cycleDayColor } from '../../styles/index'
const colorTemperature = '#765285'
const colorTemperatureLight = '#a67fb5'
export const dotRadius = 5
const lineWidth = 1.5
const colorLtl = '#feb47b'
const gridColor = '#d3d3d3'
const gridLineWidth = 0.5
const numberLabelFontSize = 13
const styles = {
curve: {
stroke: colorTemperature,
strokeWidth: lineWidth,
},
curveExcluded: {
stroke: colorTemperatureLight,
strokeWidth: lineWidth
},
curveDots: {
fill: colorTemperature,
r: dotRadius
},
curveDotsExcluded: {
fill: colorTemperatureLight,
r: dotRadius
},
column: {
label: {
date: {
color: 'grey',
fontSize: 9,
fontWeight: '100',
textAlign: 'center',
paddingTop: 2.5
},
number: {
color: cycleDayColor,
fontSize: numberLabelFontSize,
textAlign: 'center',
}
},
stroke: {
color: gridColor,
width: gridLineWidth,
}
},
symptomIcon: {
width: 12,
height: 12,
borderRadius: 50,
},
iconShades: {
'bleeding': shadesOfRed,
'mucus': [
'#e3e7ed',
'#c8cfdc',
'#acb8cb',
'#91a0ba',
'#7689a9'
],
'cervix': [
'#f0e19d',
'#e9d26d',
'#e2c33c',
'#dbb40c',
],
'sex': [
'#a87ca2',
'#8b5083',
'#6f2565',
],
'desire': [
'#c485a6',
'#b15c89',
'#9e346c',
],
'pain': ['#bccd67'],
'mood': ['#bc6642'],
'note': ['#6ca299']
},
yAxis: {
width: 27,
borderRightWidth: 1,
borderColor: 'lightgrey',
borderStyle: 'solid'
},
yAxisLabels: {
tempScale: {
position: 'absolute',
right: 2,
color: 'grey',
fontSize: 9,
textAlign: 'left'
},
cycleDayLabel: {
textAlign: 'center',
justifyContent: 'center',
fontSize: Math.ceil(numberLabelFontSize / 2)
},
dateLabel: {
textAlign: 'center',
justifyContent: 'center',
color: 'grey',
fontSize: 9,
fontWeight: '100',
}
},
horizontalGrid: {
position:'absolute',
borderColor: gridColor,
borderWidth: gridLineWidth,
width: '100%',
borderStyle: 'solid',
left: config.columnWidth
},
nfpLine: {
stroke: colorLtl,
strokeWidth: lineWidth,
},
symptomRow: {
alignItems: 'center',
justifyContent: 'center',
},
loadingMore: {
height: '100%',
backgroundColor: 'lightgrey',
justifyContent: 'center'
}
}
export default styles

Some files were not shown because too many files have changed in this diff Show More