Skip to content

Commit aa9aa3e

Browse files
committed
Add Feedback Links in Error Page, Settings, and Home Page Card
1 parent 88da4f4 commit aa9aa3e

File tree

5 files changed

+30
-26
lines changed

5 files changed

+30
-26
lines changed

js/stores/UiStore.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { createBrowserHistory } from 'history'
22

33
import Events from './Events'
4-
import { iOS } from '../helpers/ios.js'
54

65
class UIStore extends Events {
76
constructor(props) {

js/views/pages/Settings.jsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Text, View, StyleSheet, TouchableOpacity } from 'react-native'
33

44
import { paragraphStyles, vars } from '../../styles.js'
55
import { t } from '../../stores/translationStore.js'
6+
import UiStore from '../../stores/UiStore.js'
67

78
import Header from '../reusable/Header.jsx'
89
import LinkedScroll from '../reusable/LinkedScroll.jsx'
@@ -11,6 +12,7 @@ import Toggle from '../reusable/Toggle.jsx'
1112
import ClockIcon from '../../../dist/icons/clock.svg'
1213
import LongnamesIcon from '../../../dist/icons/longnames.svg'
1314
import FeedbackIcon from '../../../dist/icons/feedback.svg'
15+
import SponsorIcon from '../../../dist/icons/patron.svg'
1416
import CreditsIcon from '../../../dist/icons/credits.svg'
1517

1618
let styles
@@ -56,7 +58,7 @@ const Settings = () => {
5658
{ fontSize: vars.smallFontSize, marginTop: 0 },
5759
]}
5860
>
59-
Build {process.env.VERSION}-{process.env.BRANCH}
61+
Build {process.env.VERSION}
6062
</Text>
6163
<Text style={paragraphStyles.p}>
6264
{t('settings.license')} {t('settings.contributions')}
@@ -85,13 +87,21 @@ const Settings = () => {
8587
<TouchableOpacity>
8688
<View
8789
style={styles.button}
88-
accessibilityRole="link"
89-
href="https://twitter.com/dymajoltd"
90+
onClick={() => UiStore.safePush('/feedback')}
9091
>
9192
<FeedbackIcon />
9293
<Text style={styles.buttonText}>{t('settings.more.feedback')}</Text>
9394
</View>
9495
</TouchableOpacity>
96+
<TouchableOpacity>
97+
<View
98+
style={styles.button}
99+
onClick={() => UiStore.safePush('/sponsor')}
100+
>
101+
<SponsorIcon />
102+
<Text style={styles.buttonText}>{t('settings.more.sponsor')}</Text>
103+
</View>
104+
</TouchableOpacity>
95105
{credits ? (
96106
<View>
97107
<Text style={paragraphStyles.p}>

js/views/root/Content.jsx

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@ class RootContent extends React.Component {
117117
description={t('onboarding.city.description')}
118118
/>,
119119
<Sidebar
120-
key="sponsor"
121-
url="/sponsor"
120+
key="feedback"
121+
url="/feedback"
122122
icon="patron.svg"
123-
name={t('onboarding.sponsor.name')}
124-
description={t('onboarding.sponsor.description')}
123+
name={t('onboarding.feedback.name')}
124+
description={t('onboarding.feedback.description')}
125125
/>,
126126
]
127127
if (!desktopLayout) {
@@ -150,18 +150,6 @@ class RootContent extends React.Component {
150150
Aotearoa, and provide improved access for Māori communities.
151151
</p>
152152
<p>Kia Ora.</p>
153-
<h3>What’s new in the latest version?</h3>
154-
<p>
155-
Version 2.3 is exciting. There’s now a new interface which gives you
156-
access to the map at all times. We’ve also fixed a lot of bugs,
157-
especially on iOS. Lastly, we’ve improved the lines view, allowing you
158-
to see all the stops at once.
159-
</p>
160-
<p>
161-
We’re all ready for the central new network in Auckland and Wellington
162-
too.
163-
</p>
164-
<p>We hope you enjoy Waka 2.3!</p>
165153
</div>
166154
)
167155
const onboarding = (

js/views/shell/ErrorBoundary.jsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,17 @@ export class ErrorBoundary extends Component {
3333
<Header title="Error!" hideClose />
3434
<View style={styles.error}>
3535
<Text style={styles.errorMessage}>
36-
There was an unexpected error. You can either try reload this
37-
page, or return home.
36+
There was an unexpected error. You can send feedback, try reload
37+
this page, or return home.
3838
</Text>
39+
<LinkButton
40+
href={`/feedback?type=error-report&url=${window.location.toString()}`}
41+
label="Send Feedback"
42+
target="_self"
43+
/>
3944
<LinkButton
4045
href={window.location.toString()}
46+
color="secondary"
4147
target="_self"
4248
label="Reload Page"
4349
/>

translations/en.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ export default {
3434
name: 'Switch City',
3535
description: 'Get directions in another city',
3636
},
37-
sponsor: {
38-
name: 'Become a Sponsor',
39-
description: 'Contribute to help support development!',
37+
feedback: {
38+
name: 'Give Feedback',
39+
description: 'Let us know how we can improve Waka!',
4040
},
4141
settings: {
4242
name: 'Settings',
@@ -84,6 +84,7 @@ export default {
8484
more: {
8585
title: 'More',
8686
feedback: 'Send Feedback',
87+
sponsor: 'Support Waka',
8788
credits: 'View Credits',
8889
},
8990
},
@@ -146,7 +147,7 @@ export default {
146147
services: 'View Services',
147148
},
148149
feedback: {
149-
header: 'Send Feedback',
150+
header: 'Give Feedback',
150151
generalFeedback:
151152
'We would love to hear any feedback so we can improve Waka for you!',
152153
errorReport:

0 commit comments

Comments
 (0)