Skip to content

Commit

Permalink
Merge pull request #1 from Flaque/master
Browse files Browse the repository at this point in the history
update master
  • Loading branch information
devinroche authored Apr 7, 2019
2 parents 2ffc03d + f336a28 commit 387d6a4
Show file tree
Hide file tree
Showing 11 changed files with 124 additions and 118 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ yarn start
You'll then be in the [expo development environment](https://docs.expo.io/versions/latest/).
If you already have XCode installed with a simulator, you can just press `i` to start it.

# Can I help?

Of course!

**If you like the app,** go give it 5 stars! It helps more people find the app.

**If you're a mental health professional,** audit [the descriptions](https://github.com/Flaque/quirk/blob/master/src/locals/en.json) of the cognitive distortions. If you have suggestions, let me know and we'll change stuff!

**If you can draw** and can make digital illustrations of the little blobs, let me know and I'll find a place to stick them in the app!

**If you know a language other than English,** help [us translate the app!](https://github.com/Flaque/quirk/issues/42#issuecomment-480547963)

# Design

Quirk's goal is to be both inviting and focused. It should be _really_ easy to enter in a thought; people frequently enter these in public settings and need to do it fairly quickly. It also should not cause any increased frustration.
Expand Down
3 changes: 2 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"android": {
"package": "tech.econn.quirk",
"permissions": [],
"icon": "./assets/android.png"
"icon": "./assets/android.png",
"versionCode": 2
}
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"@expo/vector-icons": "^8.0.0",
"@types/react-navigation": "^3.0.1",
"expo": "^31.0.6",
"i18n-js": "^3.2.1",
"json-stringify-safe": "^5.0.1",
"lodash": "^4.17.11",
"prop-types": "^15.6.2",
Expand Down
2 changes: 2 additions & 0 deletions scripts/ship_android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ exp build:android --release-channel production --non-interactive --no-publish
# Download the apk
curl -o app.apk "$(exp url:apk --non-interactive)"

fastlane action increment_version_number

fastlane supply --track 'production' --json_key '~/.api-7738836530326696066-539250-c6f11c3abb07.json' --package_name "tech.econn.quirk" --apk "app.apk"
3 changes: 2 additions & 1 deletion src/CBTForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
import { AutoGrowingTextInput } from "react-native-autogrow-textinput";
import theme from "./theme";
import { Thought } from "./thoughts";
import i18n from './i18n';

// Text input styles defined here instead of componentized to
// avoid issues with refs and subcomponents
Expand Down Expand Up @@ -55,7 +56,7 @@ export default class CBTForm extends React.Component<Props> {
return (
<View style={{ marginTop: 18 }}>
<FormContainer>
<SubHeader>Automatic Thought</SubHeader>
<SubHeader>{i18n.t('auto_thought')}</SubHeader>
<AutoGrowingTextInput
style={textInputStyle}
placeholderTextColor={textInputPlaceholderColor}
Expand Down
157 changes: 41 additions & 116 deletions src/ExplanationScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { ScrollView, View } from "react-native";
import { Constants } from "expo";
import theme from "./theme";
import { CBT_FORM_SCREEN } from "./screens";
import i18n from "./i18n";

interface Props {
navigation: NavigationScreenProp<NavigationState, NavigationAction>;
Expand Down Expand Up @@ -77,239 +78,163 @@ const Distortion = ({ children }) => (
const AllOrNothingThinking = () => (
<Distortion>
<SubHeader>
{"All or Nothing Thinking"} {"🌓"}
{i18n.t("all_or_nothing_thinking")} {"🌓"}
</SubHeader>

<Paragraph>
This distortion happens when we have no room for middle ground. If we
think that a small fault in ourselves means we’re fundamentally rotten or
otherwise terrible, we’re likely engaging in all or nothing thinking.
</Paragraph>
<Paragraph>{i18n.t("all_or_nothing_thinking_explanation")}</Paragraph>

<ThoughtView>I bombed the interview, I must be unhirable.</ThoughtView>
<ThoughtView>{i18n.t("all_or_nothing_thinking_thought")}</ThoughtView>
</Distortion>
);

const Catastrophizing = () => (
<Distortion>
<SubHeader>
{"Catastrophizing"} {"🤯"}
{i18n.t("catastrophizing")} {"🤯"}
</SubHeader>

<Paragraph>
If we’re taking a small problem and blowing it <I>way</I> out of
proportion, we’re catastrophizing. Did you make a small mistake at work
and are <I>dreading</I> if someone found out even though it’s nothing
serious? You’re probably catastrophizing.
</Paragraph>
<Paragraph>{i18n.t("catastrophizing_explanation")}</Paragraph>

<ThoughtView color="purple">
I'm feeling jittery, I might be having a heart attack.
{i18n.t("catastrophizing_thought")}
</ThoughtView>
</Distortion>
);

const EmotionalReasoning = () => (
<Distortion>
<SubHeader>
{"Emotional Reasoning"} {"🎭"}
{i18n.t("emotional_reasoning")} {"🎭"}
</SubHeader>

<Paragraph>
“I feel it, therefore it must be true.” If you find yourself justifying
the “danger” of something innocuous <I>because</I> you’re afraid of it,
then you’re likely engaging in emotional reasoning. Things aren’t
dangerous because we’re afraid of them and we’re not awful just because we
may think we are. {"\n"}
{i18n.t("emotional_reasoning_explaination_1")} {"\n"}
</Paragraph>

<Paragraph>
This one is often hard to recognize. It takes some effort to recognize
when your emotional mind is taking the logical reins.
</Paragraph>
<Paragraph>{i18n.t("emotional_reasoning_explaination_2")}</Paragraph>

<ThoughtView color="pink">
I feel guilty, therefore I must have done something bad.
{i18n.t("emotional_reasoning_thought")}
</ThoughtView>
</Distortion>
);

const FortuneTelling = () => (
<Distortion>
<SubHeader>
{"Fortune Telling"} {"🔮"}
{i18n.t("fortune_telling")} {"🔮"}
</SubHeader>

<Paragraph>
This distortion happens when we predict the future. We often overestimate
our abilities to predict what will happen. Frequently we'll start at
something we're worried might happen and then look for evidence that it
will occur.
</Paragraph>
<Paragraph>{i18n.t("fortune_telling_explanation")}</Paragraph>

<ThoughtView color="purple">
The plane I'm about to get on will crash.
{i18n.t("fortune_telling_thought")}
</ThoughtView>
</Distortion>
);

const Labeling = () => (
<Distortion>
<SubHeader>
{"Labeling"} {"🏷"}
{i18n.t("labeling")} {"🏷"}
</SubHeader>

<Paragraph>
If we're taking one characteristic of a person and applying it to the
whole person, we're labeling. If someone brushed us off, they might not be
a "jerk," maybe they're just in a hurry. This applies to ourselves as
well; just because we make a mistake doesn't mean we're a "failure."
</Paragraph>
<Paragraph>{i18n.t("labeling_explanation")}</Paragraph>

<ThoughtView>I failed a test, so I'm a bad student.</ThoughtView>
<ThoughtView>{i18n.t("labeling_thought")}</ThoughtView>
</Distortion>
);

const MagnificationOfTheNegative = () => (
<Distortion>
<SubHeader>
{"Magnification of the Negative"} {"👎"}
{i18n.t("magnification_of_the_negative")} {"👎"}
</SubHeader>

<Paragraph>
If you’re judging a situation based <I>entirely</I> on the negative parts
and not considering the positive parts, you’re likely magnifying the
negative. If you’re constantly berating yourself for bombing a job
interview, you’re probably filtering out all the experience you gained
from that interview.
</Paragraph>
<Paragraph>{i18n.t("magnification_of_the_negative_explanation")}</Paragraph>

<ThoughtView>I ate healthy this week, but I skipped my run.</ThoughtView>
<ThoughtView>{i18n.t("magnification_of_the_negative_thought")}</ThoughtView>
</Distortion>
);

const MindReading = () => (
<Distortion>
<SubHeader>
{"Mind Reading"} {"🧠"}
{i18n.t("mind_reading")} {"🧠"}
</SubHeader>

<Paragraph>
If we're worried about what someone else is thinking about us, we're
attempting to read minds. Unless someone tells you what they're thinking,
you have absolutely no way of knowing. So why assume the worst?
</Paragraph>
<Paragraph>{i18n.t("mind_reading_explanation")}</Paragraph>

<ThoughtView color="pink">
I think I was rude to George, I'll bet he hates me.
</ThoughtView>
<ThoughtView color="pink">{i18n.t("mind_reading_thought")}</ThoughtView>
</Distortion>
);

const MimizationOfThePositive = () => (
<Distortion>
<SubHeader>
{"Minimization of the Positive"} {"👍"}
{i18n.t("minimization_of_the_positive")} {"👍"}
</SubHeader>

<Paragraph>
If we downplay the good things that are happening to us, we're minimizing
the positive. Even if our day didn't go 100% as planned, it doesn't mean
that the 60% that did go right should be ignored.
</Paragraph>
<Paragraph>{i18n.t("minimization_of_the_positive_explanation")}</Paragraph>

<ThoughtView>
Many people liked my presentation, but I stumbled giving the intro, so it
was bad.
</ThoughtView>
<ThoughtView>{i18n.t("minimization_of_the_positive_thought")}</ThoughtView>
</Distortion>
);

const OtherBlaming = () => (
<Distortion>
<SubHeader>
{"Other Blaming"} {"🦹‍"}
{i18n.t("other_blaming")} {"🦹‍"}
</SubHeader>

<Paragraph>
If a bad situation must be the fault of someone, we're other-blaming. If
you failed an exam and you're blaming the teacher, you're directing your
energy to the wrong place. Someone cut you off on the highway? If you honk
your horn, flip them off, and stew, how is that helping? Now you're cut
off and mad! {`\n`}
{i18n.t("other_blaming_explanation_1")} {`\n`}
</Paragraph>

<Paragraph>
This doesn't mean you have to blame yourself for every negative situation.
You don't have to blame anyone. No one has to be at fault if you let the
situation pass without attaching blame.
</Paragraph>
<Paragraph>{i18n.t("other_blaming_explanation_2")}</Paragraph>

<ThoughtView color="purple">
That jerk is taking too long in line and I'm going to be late!
</ThoughtView>
<ThoughtView color="purple">{i18n.t("other_blaming_thought")}</ThoughtView>
</Distortion>
);

const OverGeneralization = () => (
<Distortion>
<SubHeader>
{"Over Generalization"} {"👯‍"}
{i18n.t("over_generalization")} {"👯‍"}
</SubHeader>

<Paragraph>
If we draw conclusions based on just one example, we're over generalizing.
If you bombed a presentation and assume that means you're "bad" at
presenting, you're over-generalizing.
</Paragraph>
<Paragraph>{i18n.t("over_generalization_explanation")}</Paragraph>

<ThoughtView>No one asked me to dance, so no one ever will.</ThoughtView>
<ThoughtView>{i18n.t("over_generalization_thought")}</ThoughtView>
</Distortion>
);

const SelfBlaming = () => (
<Distortion>
<SubHeader>
{"Self Blaming"} {"👁"}
{i18n.t("self_blaming")}
{"👁"}
</SubHeader>

<Paragraph>
If you're attributing a negative situation entirely to yourself, you're
self-blaming. You don't have to be responsible for every bad thing that
happens. If you're getting caught in traffic and you're berating yourself
for not leaving earlier, you're self-blaming. Would you treat someone else
this way?
</Paragraph>
<Paragraph>{i18n.t("self_blaming_explanation")}</Paragraph>

<ThoughtView color="pink">
My son is failing in school, I must have failed him.
</ThoughtView>
<ThoughtView color="pink">{i18n.t("self_blaming_thought")}</ThoughtView>
</Distortion>
);

const ShouldStatements = () => (
<Distortion>
<SubHeader>
{"Should Statements"} {"✨"}
{i18n.t("should_statements")} {"✨"}
</SubHeader>

<Paragraph>
If you're assigning someone abilities they don't have, you're using faulty
"should" statements. For example, if you have a fear of flying and are
telling yourself "I shouldn't be afraid of this, there's nothing wrong
with the airplane!" you're putting an undue burden on yourself. You have a
fear of flying! It's normal for people who have a fear of flying to be
afraid flying! {"\n"}
{i18n.t("should_statements_explanation_1")} {"\n"}
</Paragraph>

<Paragraph>
Should statements can seem nonsensical when you say it out loud; that's
the point! They're illogical!
</Paragraph>
<Paragraph>{i18n.t("should_statements_explanation_2")}</Paragraph>

<ThoughtView>
I'm an adult, I shouldn't have these mental issues.
</ThoughtView>
<ThoughtView>{i18n.t("should_statements_thought")}</ThoughtView>
</Distortion>
);

Expand Down
10 changes: 10 additions & 0 deletions src/i18n.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Localization } from 'expo';
import i18n from 'i18n-js';
import en from './locals/en.json'
import fr from './locals/fr.json'

i18n.fallbacks = true;
i18n.translations = { fr, en };
i18n.locale = Localization.locale;

export default i18n;
Loading

0 comments on commit 387d6a4

Please sign in to comment.