Merge branch '712-chore-testing-feedback-for-v1-2403-11-part-2' into 'main'
Resolve "Chore: Testing Feedback for v1.2403.11 part 2" Closes #712 See merge request bloodyhealth/drip!675
This commit is contained in:
@@ -6,13 +6,14 @@ import AppText from './app-text'
|
|||||||
|
|
||||||
import { Colors, Containers, Spacing, Typography } from '../../styles'
|
import { Colors, Containers, Spacing, Typography } from '../../styles'
|
||||||
|
|
||||||
const Segment = ({ children, last, title }) => {
|
const Segment = ({ children, last, title, subheader }) => {
|
||||||
const containerStyle = last ? styles.containerLast : styles.container
|
const containerStyle = last ? styles.containerLast : styles.container
|
||||||
const commonStyle = Object.assign({}, containerStyle)
|
const commonStyle = Object.assign({}, containerStyle)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={commonStyle}>
|
<View style={commonStyle}>
|
||||||
{title && <AppText style={styles.title}>{title}</AppText>}
|
{title && <AppText style={styles.title}>{title}</AppText>}
|
||||||
|
{subheader && <AppText style={styles.subheader}>{subheader}</AppText>}
|
||||||
{children}
|
{children}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
@@ -23,6 +24,7 @@ Segment.propTypes = {
|
|||||||
last: PropTypes.bool,
|
last: PropTypes.bool,
|
||||||
style: PropTypes.object,
|
style: PropTypes.object,
|
||||||
title: PropTypes.string,
|
title: PropTypes.string,
|
||||||
|
subheader: PropTypes.string,
|
||||||
}
|
}
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
@@ -39,6 +41,11 @@ const styles = StyleSheet.create({
|
|||||||
title: {
|
title: {
|
||||||
...Typography.subtitle,
|
...Typography.subtitle,
|
||||||
},
|
},
|
||||||
|
subheader: {
|
||||||
|
...Typography.subtitle,
|
||||||
|
fontWeight: 'bold',
|
||||||
|
marginBottom: Spacing.zero,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
export default Segment
|
export default Segment
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import Temperature from './temperature'
|
|||||||
import { blank, save, shouldShow, symtomPage } from '../helpers/cycle-day'
|
import { blank, save, shouldShow, symtomPage } from '../helpers/cycle-day'
|
||||||
import { showToast } from '../helpers/general'
|
import { showToast } from '../helpers/general'
|
||||||
|
|
||||||
|
import { fertilityTrackingObservable } from '../../local-storage'
|
||||||
import { shared as sharedLabels } from '../../i18n/en/labels'
|
import { shared as sharedLabels } from '../../i18n/en/labels'
|
||||||
import info from '../../i18n/en/symptom-info'
|
import info from '../../i18n/en/symptom-info'
|
||||||
import { Colors, Containers, Sizes, Spacing } from '../../styles'
|
import { Colors, Containers, Sizes, Spacing } from '../../styles'
|
||||||
@@ -25,6 +26,7 @@ const SymptomEditView = ({ date, onClose, symptom, symptomData }) => {
|
|||||||
const [shouldShowInfo, setShouldShowInfo] = useState(false)
|
const [shouldShowInfo, setShouldShowInfo] = useState(false)
|
||||||
const getParsedData = () => JSON.parse(JSON.stringify(data))
|
const getParsedData = () => JSON.parse(JSON.stringify(data))
|
||||||
const onPressLearnMore = () => setShouldShowInfo(!shouldShowInfo)
|
const onPressLearnMore = () => setShouldShowInfo(!shouldShowInfo)
|
||||||
|
const isFertilityTrackingEnabled = fertilityTrackingObservable.value
|
||||||
|
|
||||||
const onEditNote = (note) => {
|
const onEditNote = (note) => {
|
||||||
const parsedData = getParsedData()
|
const parsedData = getParsedData()
|
||||||
@@ -167,7 +169,10 @@ const SymptomEditView = ({ date, onClose, symptom, symptomData }) => {
|
|||||||
</Segment>
|
</Segment>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
{shouldShow(symptomConfig.excludeText) && (
|
{/* show exclude AppSwitch for bleeding, mucus, cervix, temperature */}
|
||||||
|
{/* but if fertility is off only for bleeding */}
|
||||||
|
{shouldShow(symptomConfig.excludeText) &&
|
||||||
|
(symptom === 'bleeding' || isFertilityTrackingEnabled) && (
|
||||||
<Segment style={styles.segmentBorder}>
|
<Segment style={styles.segmentBorder}>
|
||||||
<AppSwitch
|
<AppSwitch
|
||||||
onToggle={onExcludeToggle}
|
onToggle={onExcludeToggle}
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
import React, { useEffect, useState } from 'react'
|
import React, { useEffect, useState } from 'react'
|
||||||
import { Alert, Pressable } from 'react-native'
|
import { Alert, Pressable, StyleSheet, View } from 'react-native'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
|
import AppIcon from '../../common/app-icon'
|
||||||
import AppPage from '../../common/app-page'
|
import AppPage from '../../common/app-page'
|
||||||
import AppSwitch from '../../common/app-switch'
|
import AppSwitch from '../../common/app-switch'
|
||||||
import AppText from '../../common/app-text'
|
import AppText from '../../common/app-text'
|
||||||
|
import { Colors, Spacing, Typography } from '../../../styles'
|
||||||
import TemperatureSlider from './temperature-slider'
|
import TemperatureSlider from './temperature-slider'
|
||||||
import Segment from '../../common/segment'
|
import Segment from '../../common/segment'
|
||||||
import TrackingCategorySwitch from '../../common/tracking-category-switch'
|
import TrackingCategorySwitch from '../../common/tracking-category-switch'
|
||||||
@@ -274,6 +276,7 @@ const Settings = () => {
|
|||||||
symptom={SYMPTOMS[8]}
|
symptom={SYMPTOMS[8]}
|
||||||
/>
|
/>
|
||||||
</Segment>
|
</Segment>
|
||||||
|
|
||||||
<Pressable onPress={fertilityDisabledPrompt}>
|
<Pressable onPress={fertilityDisabledPrompt}>
|
||||||
<Segment title={labels.fertilityTracking.title}>
|
<Segment title={labels.fertilityTracking.title}>
|
||||||
<AppText>{labels.fertilityTracking.message}</AppText>
|
<AppText>{labels.fertilityTracking.message}</AppText>
|
||||||
@@ -286,6 +289,19 @@ const Settings = () => {
|
|||||||
</Segment>
|
</Segment>
|
||||||
</Pressable>
|
</Pressable>
|
||||||
|
|
||||||
|
<Segment title={labels.periodPrediction.title}>
|
||||||
|
<AppSwitch
|
||||||
|
onToggle={onPeriodPredictionToggle}
|
||||||
|
text={periodPredictionText}
|
||||||
|
value={isPeriodPredictionEnabled}
|
||||||
|
/>
|
||||||
|
</Segment>
|
||||||
|
|
||||||
|
<Segment
|
||||||
|
subheader={labels.customization.subheaderSymptoThermalMethod}
|
||||||
|
last
|
||||||
|
></Segment>
|
||||||
|
|
||||||
<Pressable onPress={sliderDisabledPrompt}>
|
<Pressable onPress={sliderDisabledPrompt}>
|
||||||
<Segment title={labels.tempScale.segmentTitle}>
|
<Segment title={labels.tempScale.segmentTitle}>
|
||||||
<AppText>{labels.tempScale.segmentExplainer}</AppText>
|
<AppText>{labels.tempScale.segmentExplainer}</AppText>
|
||||||
@@ -304,16 +320,32 @@ const Settings = () => {
|
|||||||
/>
|
/>
|
||||||
</Segment>
|
</Segment>
|
||||||
</Pressable>
|
</Pressable>
|
||||||
|
<Segment last>
|
||||||
<Segment title={labels.periodPrediction.title} last>
|
<View style={styles.line}>
|
||||||
<AppSwitch
|
<AppIcon
|
||||||
onToggle={onPeriodPredictionToggle}
|
color={Colors.purple}
|
||||||
text={periodPredictionText}
|
name="info-with-circle"
|
||||||
value={isPeriodPredictionEnabled}
|
style={styles.icon}
|
||||||
/>
|
/>
|
||||||
|
<AppText style={styles.title}>{labels.preOvu.title}</AppText>
|
||||||
|
</View>
|
||||||
|
<AppText>{labels.preOvu.note}</AppText>
|
||||||
</Segment>
|
</Segment>
|
||||||
</AppPage>
|
</AppPage>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Settings
|
export default Settings
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
icon: {
|
||||||
|
marginRight: Spacing.base,
|
||||||
|
},
|
||||||
|
line: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
...Typography.subtitle,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ const menuItems = [
|
|||||||
{ label: 'reminders', componentName: 'Reminders' },
|
{ label: 'reminders', componentName: 'Reminders' },
|
||||||
{ label: 'dataManagement', componentName: 'DataManagement' },
|
{ label: 'dataManagement', componentName: 'DataManagement' },
|
||||||
{ label: 'password', componentName: 'Password' },
|
{ label: 'password', componentName: 'Password' },
|
||||||
{ label: 'info', componentName: 'Info' },
|
|
||||||
]
|
]
|
||||||
|
|
||||||
const SettingsMenu = ({ navigate }) => {
|
const SettingsMenu = ({ navigate }) => {
|
||||||
|
|||||||
+4
-4
@@ -112,19 +112,19 @@
|
|||||||
"menuItem": {
|
"menuItem": {
|
||||||
"dataManagement": {
|
"dataManagement": {
|
||||||
"name": "Data",
|
"name": "Data",
|
||||||
"text": "import, export or delete your data"
|
"text": "Import, export or delete your data"
|
||||||
},
|
},
|
||||||
"customization": {
|
"customization": {
|
||||||
"name": "Customization",
|
"name": "Customization",
|
||||||
"text": "define how you want to use drip"
|
"text": "Define how you want to use drip"
|
||||||
},
|
},
|
||||||
"password": {
|
"password": {
|
||||||
"name": "Password",
|
"name": "Password",
|
||||||
"text": "set or edit your password"
|
"text": "Set, edit or delete your password"
|
||||||
},
|
},
|
||||||
"reminders": {
|
"reminders": {
|
||||||
"name": "Reminders",
|
"name": "Reminders",
|
||||||
"text": "turn on/off reminders"
|
"text": "Turn on/off reminders"
|
||||||
},
|
},
|
||||||
"info": {
|
"info": {
|
||||||
"name": "Info",
|
"name": "Info",
|
||||||
|
|||||||
+44
-38
@@ -4,57 +4,58 @@ export const intensity = ['low', 'medium', 'high']
|
|||||||
export const bleeding = {
|
export const bleeding = {
|
||||||
labels: ['spotting', 'light', 'medium', 'heavy'],
|
labels: ['spotting', 'light', 'medium', 'heavy'],
|
||||||
heaviness: {
|
heaviness: {
|
||||||
header: "Heaviness",
|
header: 'Heaviness',
|
||||||
explainer: "How heavy is the bleeding?",
|
explainer: 'How heavy is the bleeding?',
|
||||||
},
|
},
|
||||||
exclude: {
|
exclude: {
|
||||||
header: "Exclude",
|
header: 'Exclude',
|
||||||
explainer: "You can exclude this value if it's not menstrual bleeding"
|
explainer: "You can exclude this value if it's not menstrual bleeding",
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export const cervix = {
|
export const cervix = {
|
||||||
subcategories: {
|
subcategories: {
|
||||||
opening: 'opening',
|
opening: 'opening',
|
||||||
firmness: 'firmness',
|
firmness: 'firmness',
|
||||||
position: 'position'
|
position: 'position',
|
||||||
},
|
},
|
||||||
opening: {
|
opening: {
|
||||||
categories: ['closed', 'medium', 'open'],
|
categories: ['closed', 'medium', 'open'],
|
||||||
explainer: 'Is your cervix open or closed?'
|
explainer: 'Is your cervix open or closed?',
|
||||||
},
|
},
|
||||||
firmness: {
|
firmness: {
|
||||||
categories: ['hard', 'soft'],
|
categories: ['hard', 'soft'],
|
||||||
explainer: "When it's hard, it might feel like the tip of your nose"
|
explainer: "When it's hard, it might feel like the tip of your nose",
|
||||||
},
|
},
|
||||||
position: {
|
position: {
|
||||||
categories: ['low', 'medium', 'high'],
|
categories: ['low', 'medium', 'high'],
|
||||||
explainer: 'How high up in the vagina is the cervix?'
|
explainer: 'How high up in the vagina is the cervix?',
|
||||||
},
|
},
|
||||||
excludeExplainer: "You can exclude this value if you don't want to use it for fertility detection.",
|
excludeExplainer:
|
||||||
actionHint: 'Choose values for at least "Opening" and "Firmness" to save.'
|
"You can exclude this value if you don't want to use it for fertility detection.",
|
||||||
}
|
}
|
||||||
|
|
||||||
export const mucus = {
|
export const mucus = {
|
||||||
subcategories: {
|
subcategories: {
|
||||||
feeling: 'feeling',
|
feeling: 'feeling',
|
||||||
texture: 'texture'
|
texture: 'texture',
|
||||||
},
|
},
|
||||||
feeling: {
|
feeling: {
|
||||||
categories: ['dry', 'nothing', 'wet', 'slippery'],
|
categories: ['dry', 'nothing', 'wet', 'slippery'],
|
||||||
explainer: 'What does your vaginal entrance feel like?'
|
explainer: 'What does your vaginal entrance feel like?',
|
||||||
},
|
},
|
||||||
texture: {
|
texture: {
|
||||||
categories: ['nothing', 'creamy', 'egg white'],
|
categories: ['nothing', 'creamy', 'egg white'],
|
||||||
explainer: "Looking at and touching your cervical mucus, which describes it best?"
|
explainer:
|
||||||
|
'Looking at and touching your cervical mucus, which describes it best?',
|
||||||
},
|
},
|
||||||
excludeExplainer: "You can exclude this value if you don't want to use it for fertility detection",
|
excludeExplainer:
|
||||||
actionHint: 'Choose values for both "Feeling" and "Texture" to save.'
|
"You can exclude this value if you don't want to use it for fertility detection",
|
||||||
}
|
}
|
||||||
|
|
||||||
export const desire = {
|
export const desire = {
|
||||||
header: 'Intensity',
|
header: 'Intensity',
|
||||||
explainer: 'How would you rate your sexual desire?'
|
explainer: 'How would you rate your sexual desire?',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const sex = {
|
export const sex = {
|
||||||
@@ -62,7 +63,7 @@ export const sex = {
|
|||||||
solo: 'solo',
|
solo: 'solo',
|
||||||
partner: 'partner',
|
partner: 'partner',
|
||||||
},
|
},
|
||||||
header: "Activity",
|
header: 'Activity',
|
||||||
explainer: 'Were you sexually active today?',
|
explainer: 'Were you sexually active today?',
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,8 +79,8 @@ export const contraceptives = {
|
|||||||
none: 'none',
|
none: 'none',
|
||||||
other: 'other',
|
other: 'other',
|
||||||
},
|
},
|
||||||
header: "Contraceptives",
|
header: 'Contraceptives',
|
||||||
explainer: 'Did you use contraceptives?'
|
explainer: 'Did you use contraceptives?',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const pain = {
|
export const pain = {
|
||||||
@@ -91,9 +92,9 @@ export const pain = {
|
|||||||
nausea: 'nausea',
|
nausea: 'nausea',
|
||||||
tenderBreasts: 'tender breasts',
|
tenderBreasts: 'tender breasts',
|
||||||
migraine: 'migraine',
|
migraine: 'migraine',
|
||||||
other: 'other'
|
other: 'other',
|
||||||
},
|
},
|
||||||
explainer: 'How did your body feel today?'
|
explainer: 'How did your body feel today?',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const mood = {
|
export const mood = {
|
||||||
@@ -107,34 +108,39 @@ export const mood = {
|
|||||||
energetic: 'energetic',
|
energetic: 'energetic',
|
||||||
fatigue: 'fatigue',
|
fatigue: 'fatigue',
|
||||||
angry: 'angry',
|
angry: 'angry',
|
||||||
other: 'other'
|
other: 'other',
|
||||||
},
|
},
|
||||||
explainer: 'How did you feel today?'
|
explainer: 'How did you feel today?',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const temperature = {
|
export const temperature = {
|
||||||
outOfRangeWarning: 'This temperature value is out of the current range for the temperature chart. You can change the range in the settings.',
|
outOfRangeWarning:
|
||||||
outOfAbsoluteRangeWarning: 'This temperature value is too high or low to be shown on the temperature chart.',
|
'This temperature value is out of the current range for the temperature chart. You can change the range in the settings.',
|
||||||
|
outOfAbsoluteRangeWarning:
|
||||||
|
'This temperature value is too high or low to be shown on the temperature chart.',
|
||||||
temperature: {
|
temperature: {
|
||||||
header: "Temperature",
|
header: 'Temperature',
|
||||||
explainer: 'Take your temperature right after waking up, before getting out of bed'
|
explainer:
|
||||||
|
'Take your temperature right after waking up, before getting out of bed',
|
||||||
},
|
},
|
||||||
time: "Time",
|
time: 'Time',
|
||||||
note: {
|
note: {
|
||||||
header: "Note",
|
header: 'Note',
|
||||||
explainer: 'Is there anything that could have influenced this value, such as bad sleep or alcohol consumption?'
|
explainer:
|
||||||
|
'Is there anything that could have influenced this value, such as bad sleep or alcohol consumption?',
|
||||||
},
|
},
|
||||||
exclude: {
|
exclude: {
|
||||||
header: "Exclude",
|
header: 'Exclude',
|
||||||
explainer: "You can exclude this value if you don't want to use it for fertility detection"
|
explainer:
|
||||||
}
|
"You can exclude this value if you don't want to use it for fertility detection",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export const noteExplainer = "Anything you want to add for the day?"
|
export const noteExplainer = 'Anything you want to add for the day?'
|
||||||
|
|
||||||
export const general = {
|
export const general = {
|
||||||
cycleDayNumber: "Cycle day ",
|
cycleDayNumber: 'Cycle day ',
|
||||||
today: "Today"
|
today: 'Today',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const sharedDialogs = {
|
export const sharedDialogs = {
|
||||||
@@ -144,5 +150,5 @@ export const sharedDialogs = {
|
|||||||
reallyDeleteData: 'Yes, I am sure',
|
reallyDeleteData: 'Yes, I am sure',
|
||||||
save: 'Save',
|
save: 'Save',
|
||||||
delete: 'Delete',
|
delete: 'Delete',
|
||||||
disabledInfo: 'There is some data missing'
|
disabledInfo: 'There is some data missing',
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ export default {
|
|||||||
customization: {
|
customization: {
|
||||||
title: 'Customization',
|
title: 'Customization',
|
||||||
trackingCategories: 'Tracking categories',
|
trackingCategories: 'Tracking categories',
|
||||||
|
subheaderSymptoThermalMethod: 'Sympto-thermal method settings',
|
||||||
},
|
},
|
||||||
export: {
|
export: {
|
||||||
errors: {
|
errors: {
|
||||||
|
|||||||
+2
-1
@@ -1,10 +1,11 @@
|
|||||||
import { scale } from 'react-native-size-matters'
|
import { scale } from 'react-native-size-matters'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
zero: '0%',
|
||||||
tiny: scale(4),
|
tiny: scale(4),
|
||||||
small: scale(10),
|
small: scale(10),
|
||||||
base: scale(16),
|
base: scale(16),
|
||||||
large: scale(20),
|
large: scale(20),
|
||||||
symptomTileWidth: '48%',
|
symptomTileWidth: '48%',
|
||||||
textWidth: '70%'
|
textWidth: '70%',
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user