Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a4e0fa64e9 | |||
| fd6f39fbc4 | |||
| d492a27797 | |||
| 22a451d4e6 | |||
| ae5f31015b | |||
| c7104f7758 | |||
| 86bdb8a1f8 | |||
| 5bc6be7849 | |||
| b44d4c57e1 | |||
| 4212906917 |
@@ -34,13 +34,31 @@ or clone it with HTTPS
|
||||
|
||||
git clone https://gitlab.com/bloodyhealth/drip.git
|
||||
|
||||
### 2. Node & yarn version
|
||||
### 2. Node version
|
||||
|
||||
Make sure you are running Node 14 and classic yarn (v.1). It's easiest to switch Node versions using `nvm`, here's how to install NVM: https://github.com/nvm-sh/nvm#installing-and-updating. After installing nvm close the terminal and open it again to be able to use nvm.
|
||||
Once you have nvm running you can install node 14:
|
||||
|
||||
nvm install v14.19.3
|
||||
|
||||
#### On Apple Silicon M1
|
||||
|
||||
NodeJS 14 does not compile on the M1 architecture, so it has to be installed through Rosetta: https://devzilla.io/using-nodejs-14-with-mac-silicon-m1 .
|
||||
To activate Rosetta and switch to intel emulation run:
|
||||
|
||||
arch -x86_64 zsh
|
||||
|
||||
Run
|
||||
|
||||
arch
|
||||
|
||||
again to verify that it returns "i386".
|
||||
Now install node 14:
|
||||
|
||||
nvm install v14.19.3
|
||||
|
||||
### 3. Yarn version
|
||||
|
||||
use npm to install yarn:
|
||||
|
||||
npm install --global yarn
|
||||
@@ -127,6 +145,18 @@ iii. If you are building the app with XCode make sure you are running this as we
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
#### [MacOS M1] Flipper problems
|
||||
|
||||
If a bug in the currently used Flipper version prevents building the project, comment out the respective line in the podfile, like so:
|
||||
|
||||
#use_flipper!()
|
||||
|
||||
Run
|
||||
|
||||
pod install
|
||||
|
||||
from the ios directory again to reload the dependencies.
|
||||
|
||||
#### [MacOS] Java problems
|
||||
|
||||
Make sure that you have Java 1.8 by running `java -version`.
|
||||
|
||||
+61
-36
@@ -7,27 +7,38 @@ drip is developed in React Native for iOS and Android and is released on 4 diffe
|
||||
3. [F-Droid](https://f-droid.org/packages/com.drip/)
|
||||
4. [drip Website](https://dripapp.org)
|
||||
|
||||
In an ideal world the app version is the same across platforms. In reality this has never been the case.
|
||||
In an ideal world the app version is the same across platforms. In the past this has never been the case. The release v1.2403.19 is the first to be up to date on all 4 platforms!
|
||||
|
||||
Releasing a new version is very exciting and brings happy changes like fixing a bug, improving a feature, updating dependencies or adding a new functionality to the app. It is more than just pressing the button "publish new version".
|
||||
|
||||
_Note_: You need the release-key for Android to bundle a signed release that can be uploaded and published via the Google Play Store. A similar process for Apple requires a certificate to upload and publish the app to the App Store.
|
||||
|
||||
### Release steps
|
||||
## Release steps
|
||||
|
||||
1. [Version updating](#version-updating)
|
||||
2. [Android builds](#android-builds)
|
||||
3. [iOS builds](#ios-builds)
|
||||
4. [User testing](#user-testing)
|
||||
5. [Changelog](#changelog)
|
||||
6. [Release notes](#release-notes)
|
||||
7. [Release tag](#release-tag)
|
||||
8. [Phone screenshots](#phone-screenshots)
|
||||
9. [Publishing](#publishing)
|
||||
10. [Communication](#communication)
|
||||
11. [Self care](#self-care)
|
||||
### 1. [Code](#code)
|
||||
- 1.1 [Version updating](#version-updating)
|
||||
- 1.2 [Android builds](#android-builds)
|
||||
- 1.3 [iOS builds](#ios-builds)
|
||||
- 1.4 [User testing](#user-testing)
|
||||
- 1.5 [Release tag](#release-tag)
|
||||
|
||||
## Version updating
|
||||
### 2. [Documentation](#documentation)
|
||||
- 2.1 [Changelog](#changelog)
|
||||
- 2.2 [Release notes](#release-notes)
|
||||
- 2.3 [Releases on Gitlab](#releases-on-gitlab)
|
||||
- 2.4 [Phone screenshots](#phone-screenshots)
|
||||
|
||||
### 3. [Publishing](#publishing)
|
||||
- 3.1 [Google Play Console](#google-play-console)
|
||||
- 3.2 [Apple App Store Connect](#apple-app-store-connect)
|
||||
- 3.3 [F-droid](#f-droid)
|
||||
- 3.4 [drip website](#drip-website)
|
||||
- 3.5 [Communication](#communication)
|
||||
- 3.6 [Self care](#self-care)
|
||||
|
||||
## Code
|
||||
|
||||
### Version updating
|
||||
|
||||
When you are done with a chore, a feature or a bugfix, you may want to share it with testers and eventually publish a release. In order to identify a specific app version we can update the version name, which is created based on the following format: `1.yymm.d` e.g. `1.2311.7`. If you want to upload a new app version to Google Play you also need to update the version code.
|
||||
|
||||
@@ -112,42 +123,50 @@ Once the archiving process has completed you can chose to do the following:
|
||||
- TestFlight & App Store for when you want to upload it for external testing and/or production release
|
||||
- TestFlight Internal Only for when you want to upload it for internal testing
|
||||
|
||||
## User testing
|
||||
### User testing
|
||||
|
||||
To enable external testing you need to remember that Google Play and Apple App Store might take up to 1 day for their review process. "External testing" for iOS allows testing drip on Testflight anonymously via a public link. "Open testing" for Android allows testing drip on Google Play as beta tester below the normal production listing.
|
||||
|
||||
For a quick and easy way to share an apk to testers who are willing to sideload drip onto their Android phones, do this: Upload a signed apk to the Gitlab repository of the drip website under `/release` https://gitlab.com/bloodyhealth/bloodyhealth.gitlab.io/-/tree/main/release and maybe adapt the name of the apk with a more specific name than "app-release.apk". Now you can simply share a direct link to download your newly bundled apk, e.g. [a download link for v1.2311.14](https://gitlab.com/bloodyhealth/bloodyhealth.gitlab.io/-/blob/main/release/v1.2311.14.apk).
|
||||
|
||||
## Changelog
|
||||
### Release tag
|
||||
|
||||
[Tags](https://gitlab.com/bloodyhealth/drip/-/tags) can mark a specific point in the coding/commmit history and helps us identify the version status of a released app. They are named "iOS-v1.2401.17" or "Release-v1.yymm.d".
|
||||
|
||||
Any tag starting with "Release" or "Android" will be checked by https://gitlab.com/fdroidci
|
||||
|
||||
## Documentation
|
||||
|
||||
### Changelog
|
||||
|
||||
The [changelog](https://gitlab.com/bloodyhealth/drip/-/blob/main/CHANGELOG.md) should reflect the technical / code changes between a previous and the new version. Please update the changelog file with any relevant additions, fixes and changes in the following format:
|
||||
|
||||
**v1.yymm.d**
|
||||
>**v1.yymm.d**
|
||||
>
|
||||
>**Changes**
|
||||
>
|
||||
>Changing the color of funky button
|
||||
>Updating a library from 1.2.3 to 2.3.4
|
||||
>
|
||||
>**Adds**
|
||||
>
|
||||
>New feature for calendar
|
||||
>
|
||||
>**Fixed**
|
||||
>
|
||||
>Small bug in chart
|
||||
|
||||
**Changes**
|
||||
|
||||
Changing the color of funky button
|
||||
Updating a library from 1.2.3 to 2.3.4
|
||||
|
||||
**Adds**
|
||||
|
||||
New feature for calendar
|
||||
|
||||
**Fixed**
|
||||
|
||||
Small bug in chart
|
||||
|
||||
## Release notes
|
||||
### Release notes
|
||||
|
||||
These notes are for the users and curious ones who may want to start using drip. They should be based on the changelog but written in a friendly and easy to understand way. The focus is on the user perspective and the impact of the changes for the user. Behind the scenes and in depth code changes are less relevant.
|
||||
|
||||
Google Play limits these notes to 500 characters, whereas Apple's App Store limits these notes to 4.000 characters. In Fdroid there are no release notes.
|
||||
|
||||
## Release tag
|
||||
### Releases on Gitlab
|
||||
|
||||
[Tags](https://gitlab.com/bloodyhealth/drip/-/tags) can mark a specific point in the coding/commmit history and helps us identify the version status of a released app. They are named "iOS-v1.2401.17" or "Release-v1.yymm.d".
|
||||
Under [Releases](https://gitlab.com/bloodyhealth/drip/-/releases) we keep track of all drip releases.
|
||||
|
||||
## Phone screenshots
|
||||
### Phone screenshots
|
||||
|
||||
If there are visual changes in the app you may want to update the screenshots for the Google Play Store listing, which allows up to 8 and for Apple's App Store, which allows up to 10 screenshots. Keep in mind that both Google Play and Apple have specific resolution requirements. You'll find Google's in Grow -> Store presence -> Main Store Listing -> Phone screenshots and Apple's on the main App Store Connect site. Here is a link for [Apple's screenshot specifications](https://developer.apple.com/help/app-store-connect/reference/screenshot-specifications).
|
||||
|
||||
@@ -164,11 +183,17 @@ You can decide if you want the new app version to get released for testing (inte
|
||||
|
||||
Upload a new version and submit it for review, before it can be published.
|
||||
|
||||
### F-droid
|
||||
|
||||
This account runs automated checks for drip looking at new `Release` or `Android` [tags](https://gitlab.com/bloodyhealth/drip/-/tags/) and updates the app's metadata yaml file in Fdroid without further ado.
|
||||
|
||||
However this is not the full story. Please have a look at previous commits to see what necessary changes got pushed, [see here](https://gitlab.com/fdroid/fdroiddata/-/commits/master/metadata/com.drip.yml).
|
||||
|
||||
### drip website
|
||||
|
||||
After a new version has been published on Google Play (or F-Droid) the apk version that is downloadable directly from the [drip website](https://dripapp.org) needs to get updated as well. Therefore you upload a signed apk to the [repository](https://gitlab.com/bloodyhealth/bloodyhealth.gitlab.io/) as [we did in this commit](https://gitlab.com/bloodyhealth/bloodyhealth.gitlab.io/-/commit/f8c0f90c1ae9f23bf8e1bc311790b85443149a4d), and adapt the name and link on /index.html [as we did in this commit](https://gitlab.com/bloodyhealth/bloodyhealth.gitlab.io/-/commit2f8850ff5fa78615a4f335b625ea4a67d4acf03a) and [this commit](https://gitlab.com/bloodyhealth/bloodyhealth.gitlab.io/-/commit/f3da9776b1943ffa32458e74ef86eeca98c1891c). Last time I checked it was [here](f3da9776b1943ffa32458e74ef86eeca98c1891c/index.html#L114).
|
||||
|
||||
## Communication
|
||||
### Communication
|
||||
|
||||
You probably want to share the app update by posting on one or more of these platforms:
|
||||
|
||||
@@ -178,6 +203,6 @@ You probably want to share the app update by posting on one or more of these pla
|
||||
- [Linkedin](https://www.linkedin.com/company/34899684/)
|
||||
- Different tech, privacy, feminist oriented slacks
|
||||
|
||||
## Self care
|
||||
### Self care
|
||||
|
||||
Congratulations. Take a break, eat some chocolate, go see a live show of your favorite band, masturbate <3!
|
||||
|
||||
@@ -18,6 +18,10 @@ const AboutSection = () => {
|
||||
<AppPage title={t('title')}>
|
||||
<Segment>
|
||||
<AppText>{t('intro.text')}</AppText>
|
||||
<Button isCTA isSmall onPress={() => Linking.openURL(links.faq.url)}>
|
||||
{t('intro.faq')}
|
||||
</Button>
|
||||
<AppText>{t('intro.contact')}</AppText>
|
||||
<ButtonRow>
|
||||
{[links.email, links.gitlab, links.website].map((link) => (
|
||||
<Button
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
import React from 'react'
|
||||
import { FlatList, StyleSheet, View } from 'react-native'
|
||||
import PropTypes from 'prop-types'
|
||||
// import { useTranslation } from 'react-i18next'
|
||||
|
||||
import AppModal from '../common/app-modal'
|
||||
import AppText from '../common/app-text'
|
||||
|
||||
import symOccModule from '../../lib/sympto-occurance'
|
||||
import { Spacing, Typography, Colors } from '../../styles'
|
||||
|
||||
// const { t } = useTranslation(null, { keyPrefix: 'stats' })
|
||||
|
||||
const SymptomOccurance = ({ onClose }) => {
|
||||
const cycleDays = symOccModule().getCycleStartsOfLastYear()
|
||||
if (!cycleDays || cycleDays.length === 0) return false
|
||||
console.log('cycle starts:', cycleDays)
|
||||
|
||||
const headacheDays = symOccModule().getPainDaysOfLastYear()
|
||||
console.log('pain', headacheDays)
|
||||
|
||||
const cycleDaysOfPain = symOccModule().getCycleDayForPainDays(
|
||||
cycleDays,
|
||||
headacheDays
|
||||
)
|
||||
console.log('cycle days of pain', cycleDaysOfPain)
|
||||
|
||||
return (
|
||||
<AppModal onClose={onClose}>
|
||||
<View>
|
||||
<FlatList
|
||||
ListHeaderComponent={FlatListHeader}
|
||||
contentContainerStyle={styles.container}
|
||||
/>
|
||||
</View>
|
||||
</AppModal>
|
||||
)
|
||||
}
|
||||
|
||||
SymptomOccurance.propTypes = {
|
||||
onClose: PropTypes.func,
|
||||
}
|
||||
|
||||
const FlatListHeader = () => (
|
||||
<View style={styles.row}>
|
||||
<View style={styles.accentCell}>
|
||||
<AppText style={styles.header}>
|
||||
{'When did you experience headaches in the last year?'}
|
||||
</AppText>
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
divider: {
|
||||
height: 1,
|
||||
width: '100%',
|
||||
backgroundColor: Colors.grey,
|
||||
},
|
||||
header: {
|
||||
...Typography.accentOrange,
|
||||
paddingVertical: Spacing.small,
|
||||
},
|
||||
headerDivider: {
|
||||
borderBottomColor: Colors.purple,
|
||||
borderBottomWidth: 2,
|
||||
},
|
||||
row: {
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-between',
|
||||
paddingVertical: Spacing.tiny,
|
||||
backgroundColor: 'white',
|
||||
},
|
||||
cell: {
|
||||
flex: 2,
|
||||
justifyContent: 'center',
|
||||
},
|
||||
accentCell: {
|
||||
flex: 3,
|
||||
justifyContent: 'center',
|
||||
},
|
||||
container: {
|
||||
minHeight: '40%',
|
||||
minWidth: '95%',
|
||||
paddingHorizontal: Spacing.base,
|
||||
},
|
||||
})
|
||||
|
||||
export default SymptomOccurance
|
||||
@@ -8,6 +8,7 @@ import Button from '../common/button'
|
||||
import Footnote from '../common/Footnote'
|
||||
import StatsOverview from './StatsOverview'
|
||||
import PeriodDetailsModal from './PeriodDetailsModal'
|
||||
import SymptomOccurance from './SymptomOccurance'
|
||||
|
||||
import cycleModule from '../../lib/cycle'
|
||||
import { getCycleLengthStats as getCycleInfo } from '../../lib/cycle-length'
|
||||
@@ -19,6 +20,8 @@ const image = require('../../assets/cycle-icon.png')
|
||||
|
||||
const Stats = () => {
|
||||
const [isStatsVisible, setIsStatsVisible] = useState(false)
|
||||
const [isSymptomOccuranceVisible, setIsSymptomOccuranceVisible] =
|
||||
useState(false)
|
||||
|
||||
const { t } = useTranslation(null, { keyPrefix: 'stats' })
|
||||
|
||||
@@ -83,6 +86,14 @@ const Stats = () => {
|
||||
{isStatsVisible && (
|
||||
<PeriodDetailsModal onClose={() => setIsStatsVisible(false)} />
|
||||
)}
|
||||
<Button isCTA onPress={() => setIsSymptomOccuranceVisible(true)}>
|
||||
{t('showSymptomOccurance')}
|
||||
</Button>
|
||||
{isSymptomOccuranceVisible && (
|
||||
<SymptomOccurance
|
||||
onClose={() => setIsSymptomOccuranceVisible(false)}
|
||||
/>
|
||||
)}
|
||||
<Footnote>{t('footnote')}</Footnote>
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -73,6 +73,9 @@ export function getTemperatureDaysSortedByDate() {
|
||||
.filtered('temperature != null')
|
||||
.sorted('date', true)
|
||||
}
|
||||
export function getPainDaysSortedByDate() {
|
||||
return db.objects('CycleDay').filtered('pain != null').sorted('date', true)
|
||||
}
|
||||
|
||||
export function getCycleDaysSortedByDate() {
|
||||
const cycleDays = db.objects('CycleDay').sorted('date', true)
|
||||
|
||||
+5
-2
@@ -45,7 +45,9 @@
|
||||
"text": "The drips are developing this app on a volunteer basis. We are always grateful for support. This could mean condriputing to the code, giving feedback, suggesting improvements or features, testing or donating. It helps and motivates us maintaining this app and developing new features. Thank you for your support!"
|
||||
},
|
||||
"intro": {
|
||||
"text": "Please note that your data is stored locally on your phone and not on a server. This means your data cannot be read by anyone else unless they have access to your phone. We want to ensure that you stay in control of your own data. If you are planning to switch or reset your phone, please remember to export your data before doing so. You can reinstall the app afterwards and import your data.\n\nIf you encounter any technical issues, don't hesitate to contact us via email. You can also contribute to the code base on Gitlab and visit our website."
|
||||
"text": "Please note that your data is stored locally on your phone and not on a server. This means your data cannot be read by anyone else unless they have access to your phone. We want to ensure that you stay in control of your own data. If you are planning to switch or reset your phone, please remember to export your data before doing so. You can reinstall the app afterwards and import your data.\n\nIf you encounter any issues, please take a look at our Frequently Asked Questions page.",
|
||||
"faq": "FAQ",
|
||||
"contact": "\nIf your issue is not listed, don't hesitate to contact us via email. You can also contribute to the code base on Gitlab and visit our website."
|
||||
},
|
||||
"philosophy": {
|
||||
"title": "Remember to think for yourself",
|
||||
@@ -154,7 +156,8 @@
|
||||
"cycleLength": "Cycle length",
|
||||
"bleedingDays": "Bleeding"
|
||||
},
|
||||
"footnote": "Based on the standard deviation of all your tracked periods drip. calculates a range for the starting day of the upcoming 3 periods. The range will be 3 days if your standard deviation is smaller than 1.5 and 5 days if the value is bigger.\n\nThe standard deviation tells you how much the length of your periods vary, 0 means all your periods are exactly the same length and the bigger the value the more the period length varies."
|
||||
"footnote": "Based on the standard deviation of all your tracked periods drip. calculates a range for the starting day of the upcoming 3 periods. The range will be 3 days if your standard deviation is smaller than 1.5 and 5 days if the value is bigger.\n\nThe standard deviation tells you how much the length of your periods vary, 0 means all your periods are exactly the same length and the bigger the value the more the period length varies.",
|
||||
"showSymptomOccurance": "Show details on headaches"
|
||||
},
|
||||
"plurals": {
|
||||
"day": "{{count}} day",
|
||||
|
||||
@@ -39,4 +39,8 @@ export default {
|
||||
url: 'https://www.flaticon.com',
|
||||
text: 'Flaticon',
|
||||
},
|
||||
faq: {
|
||||
url: 'https://dripapp.org/faq',
|
||||
text: 'FAQ',
|
||||
},
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
import * as joda from '@js-joda/core'
|
||||
const LocalDate = joda.LocalDate
|
||||
const DAYS = joda.ChronoUnit.DAYS
|
||||
|
||||
export default function config(opts) {
|
||||
let cycleStartsSortedByDate
|
||||
let painSortedByDate
|
||||
|
||||
if (!opts) {
|
||||
// we only want to require (and run) the db module
|
||||
// when not running the tests
|
||||
cycleStartsSortedByDate = require('../db').getCycleStartsSortedByDate()
|
||||
painSortedByDate = require('../db').getPainDaysSortedByDate()
|
||||
// maxCycleLength = 45
|
||||
} else {
|
||||
cycleStartsSortedByDate = opts.cycleStartsSortedByDate || []
|
||||
painSortedByDate = opts.painSortedByDate || []
|
||||
// maxCycleLength = opts.maxCycleLength || 99
|
||||
}
|
||||
|
||||
function getCycleStartsOfLastYear() {
|
||||
const today = LocalDate.parse(new Date().toISOString().slice(0, 10))
|
||||
const firstRelevantDay = today.minusYears(1)
|
||||
const relevantCycles = cycleStartsSortedByDate.filter(({ date }) =>
|
||||
LocalDate.parse(date).isAfter(firstRelevantDay)
|
||||
)
|
||||
return relevantCycles.map(({ date }) => date)
|
||||
}
|
||||
|
||||
function getPainDaysOfLastYear() {
|
||||
const today = LocalDate.parse(new Date().toISOString().slice(0, 10))
|
||||
const firstRelevantDay = today.minusYears(1)
|
||||
const relevantPainDays = painSortedByDate.filter(
|
||||
({ date, pain }) =>
|
||||
LocalDate.parse(date).isAfter(firstRelevantDay) && pain.headache
|
||||
)
|
||||
return relevantPainDays.map(({ date }) => date)
|
||||
}
|
||||
|
||||
function getCycleDayForPainDays(cycleStarts, painDays) {
|
||||
let i = 0
|
||||
const cycleStartsAsc = cycleStarts.sort().reverse()
|
||||
const painDaysAsc = painDays.sort().reverse()
|
||||
const painCycleDays = painDaysAsc.map((pdate) => {
|
||||
if (LocalDate.parse(pdate).isBefore(LocalDate.parse(cycleStartsAsc[i]))) {
|
||||
// increase index i until cycleStart of this painDay is found
|
||||
for (let j = i + 1; j < cycleStartsAsc.length; j++) {
|
||||
i = j
|
||||
if (
|
||||
!LocalDate.parse(cycleStartsAsc[i]).isAfter(LocalDate.parse(pdate))
|
||||
) {
|
||||
// not(C > P) === C ≤ P
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return LocalDate.parse(cycleStartsAsc[i]).until(
|
||||
LocalDate.parse(pdate),
|
||||
DAYS
|
||||
)
|
||||
})
|
||||
return painCycleDays
|
||||
}
|
||||
|
||||
return {
|
||||
getCycleStartsOfLastYear,
|
||||
getPainDaysOfLastYear,
|
||||
getCycleDayForPainDays,
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -7,7 +7,8 @@
|
||||
"Tina Baumann",
|
||||
"Sofiya Tepikin",
|
||||
"Mariya Zadnepryanets",
|
||||
"Lisa Hillebrand"
|
||||
"Lisa Hillebrand",
|
||||
"Martha Dörfler"
|
||||
],
|
||||
"scripts": {
|
||||
"start": "react-native start",
|
||||
|
||||
Reference in New Issue
Block a user