Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert opt-in modal #670

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 8 additions & 21 deletions public/locales/en-US/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,6 @@
"title": "Closing Position",
"body": "Are you sure you want to close {{pair}} position?"
},
"helpUsImproveModal": {
"title": "Help us improve Bitfinex Honey",
"description": "We would like to gather usage data. Sounds scary, but <strong>this really helps us convince management to keep maintaining this for free</strong>😅. With the added benefit that we'll be able to better tailor our service to your needs, making your experience faster, more intuitive, and more enjoyable.",
"ppNotice": "This is consistent with the <privURL>Bitfinex Privacy Policy</privURL> and the <termsURL>Bitfinex API Terms of Service</termsURL>.",
"weWill": "We will:",
"willItem1": "Always allow you to opt-out from the settings",
"willItem2": "Send <bold>anonymised</bold> information to Bitfinex servers (such as errors or volume of trades) so we can know how the product is performing (<codeRefUrl>check the code</codeRefUrl>)",
"willNotItem1": "<bold>Never</bold> share any private information from your account (such as your IP address, balances, username, keys or order history) with 3rd parties",
"willNotItem2": "<bold>Never</bold> collect any proprietary information (such as your strategies or exact order details)",
"willNotItem3": "<bold>Never</bold> use the collected information to profile you in order to improve marketing communications",
"advancedConf": "Advanced Configuration",
"illHelp": "No problem, I'll help",
"3rdPartyNotice": "This is how we use trusted 3rd parties services and our own systems to enhance product usability and safety.",
"unexpectedErrors": "We store unexpected errors",
"unexpectedErrorsDesc": "Storing unexpected errors <strong>on our infrastructure</strong> allows us to proactively act on issues instead of relying on direct user reports, increasing our response time for fixes and making your overall experience safer (<codeRefUrl>check the code</codeRefUrl>).",
"anonymousData": "We store anonymous usage data",
"anonymousDataDesc": "Storing anonymous usage data <strong>on our infrastructure</strong> allows us to analyse usage trends of the application worldwide and better understand which actions should be prioritised due to their reach (<codeRefUrl>check the code</codeRefUrl>)."
},
"launchStrategyModal": {
"title": "Launch Strategy",
"body": "This action will launch this strategy in LIVE mode, acting automatically on your behalf trough the Bitfinex API and using real funds from your Exchange wallet. The current active strategy will stop and this one will take its place."
Expand Down Expand Up @@ -438,7 +420,13 @@
"timestampFormatPreview": "Preview: {{date}}",
"localTimestampFormat": "Local timestamp format",
"timestampFormatHelpLink": "How to set a timestamp format",
"resetToDefaultBtn": "Reset to default"
"resetToDefaultBtn": "Reset to default",
"optinCrashReports": "Opt in to crash reports",
"optinCrashReportsDesc": "If checked we will send the automatic logs of ERROR and FATAL to the metrics server, otherwise this data will be stored locally.",
"optinBFXAnalytics": "Opt in to Bitfinex Analytics",
"optinBFXAnalyticsDesc": "If checked we will send the event data to the metrics server.",
"optinVendorPendo": "Opt in to Pendo Analytics",
"optinVendorPendoDesc": "If checked we will use Pendo to collect data about your usage of the application."
},
"atomicOrdersTableModal": {
"title": "Atomic Orders",
Expand Down Expand Up @@ -912,8 +900,7 @@
"proceed": "Proceed",
"saveAndLaunch": "Save & Launch",
"launchNoSave": "Launch without saving",
"updateAndRestart": "Update and Restart",
"saveAndContinue": "Save and Continue"
"updateAndRestart": "Update and Restart"
},
"crashHandler": {
"text1": "An error occurred that caused the Bitfinex Honey UI to halt. Please, restart the application to proceed working with it",
Expand Down
8 changes: 8 additions & 0 deletions src/components/Navbar/Navbar.LanguageSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ const LanguageSettings = () => {
const i18nMappedKey = i18n.getMappedLanguageKey()

const changeLanguageHandler = (lang) => {
const { pendo } = window

i18n.changeLanguage(LANGUAGES[lang])

if (pendo) {
pendo.updateOptions({
language: LANGUAGES[lang],
})
}
}

return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/SwitchMode/SwitchMode.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next'
import { Tooltip } from '@ufx-ui/core'
import { THEMES } from '../../redux/selectors/ui'

export const SWITCH_THEME = {
const SWITCH_THEME = {
[THEMES.LIGHT]: {
onColor: '#07aa8c',
offColor: '#818e9a',
Expand Down
3 changes: 3 additions & 0 deletions src/constants/variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ import { isElectronApp } from '../redux/config'
export const MAX_STRATEGY_LABEL_LENGTH = 150
export const DONT_SHOW_DMS_MODAL_KEY = 'HF_UI_DONT_SHOW_DMS_MODAL'
export const MIN_SAFE_WIDTH = isElectronApp ? 1200 : 100

// A random visitor ID which is generated on login and is used for Pendo tracking
export const LOCAL_STORAGE_UID = 'HF_VISITOR_ID'
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import HFUIWrapper from './components/HFUIWrapper'
import i18n from './locales/i18n'
import { isElectronApp } from './redux/config'

import './util/pendo'
import './passive_listener_fix'
import './index.css'

Expand Down
13 changes: 0 additions & 13 deletions src/modals/AppSettingsModal/AppSettingsModal.About.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable jsx-a11y/anchor-has-content */
import React, { memo } from 'react'
import { useTranslation, Trans } from 'react-i18next'
import { useDispatch } from 'react-redux'

import {
appVersion,
Expand All @@ -17,16 +16,9 @@ import {
PRIVACY_POLICY_URL,
TERMS_CONDITIONS_URL,
} from './AppSettingsModal.constants'
import UIActions from '../../redux/actions/ui'
import { UI_MODAL_KEYS } from '../../redux/constants/modals'

const About = () => {
const { t } = useTranslation()
const dispatch = useDispatch()

const openHelpUsImproveModal = () => {
dispatch(UIActions.changeUIModalState(UI_MODAL_KEYS.HELP_US_IMPROVE_HONEY_MODAL, true))
}

return (
<div>
Expand Down Expand Up @@ -126,11 +118,6 @@ const About = () => {
{t('appSettings.bfxPrivacy')}
</a>
</div>
<div className='appsettings-modal__setting appsettings-modal__legal light'>
<span onClick={openHelpUsImproveModal}>
Advanced privacy configuration
</span>
</div>
</div>
)
}
Expand Down
68 changes: 25 additions & 43 deletions src/modals/AppSettingsModal/AppSettingsModal.Analytics.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
/* eslint-disable jsx-a11y/anchor-has-content */
import React, { memo } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { Checkbox } from '@ufx-ui/core'
import { Trans, useTranslation } from 'react-i18next'
import { useTranslation } from 'react-i18next'

import WSActions from '../../redux/actions/ws'
import GAActions from '../../redux/actions/google_analytics'
import {
SETTINGS_KEYS,
getOptinCrashReports,
getOptinBFXAnalytics,
SETTINGS_KEYS, getOptinCrashReports, getOptinBFXAnalytics, getOptinVendorPendo,
} from '../../redux/selectors/ui'
import {
METRICS_CODE_REF_URL,
UNIQUE_ID_CODE_REF_URL,
} from '../../redux/config'
// import InnerModal from '../../ui/InnerModal/InnerModal'

const Analytics = () => {
Expand All @@ -23,18 +16,20 @@ const Analytics = () => {

const optinCrashReports = useSelector(getOptinCrashReports)
const optinBFXAnalytics = useSelector(getOptinBFXAnalytics)
const optinVendorPendo = useSelector(getOptinVendorPendo)

const optinCrashReportsHandler = (isChecked) => {
dispatch(
WSActions.saveSetting(SETTINGS_KEYS.OPT_IN_CRASH_REPORTS, isChecked),
)
dispatch(WSActions.saveSetting(SETTINGS_KEYS.OPT_IN_CRASH_REPORTS, isChecked))
dispatch(GAActions.updateSettings())
}

const optinBFXAnalyticsHandler = (isChecked) => {
dispatch(
WSActions.saveSetting(SETTINGS_KEYS.OPT_IN_BFX_ANALYTICS, isChecked),
)
dispatch(WSActions.saveSetting(SETTINGS_KEYS.OPT_IN_BFX_ANALYTICS, isChecked))
dispatch(GAActions.updateSettings())
}

const optinVendorPendoHandler = (isChecked) => {
dispatch(WSActions.saveSetting(SETTINGS_KEYS.OPT_IN_VENDOR_PENDO, isChecked))
dispatch(GAActions.updateSettings())
}

Expand All @@ -43,47 +38,34 @@ const Analytics = () => {
<div className='appsettings-modal__setting appsettings-modal__setting--crash-reports'>
<Checkbox
onChange={optinCrashReportsHandler}
label={t('helpUsImproveModal.unexpectedErrors')}
label={t('appSettings.optinCrashReports')}
checked={optinCrashReports}
className='appsettings-modal__checkbox'
/>
<div className='appsettings-modal__description'>
<Trans
t={t}
i18nKey='helpUsImproveModal.unexpectedErrorsDesc'
components={{
codeRefUrl: (
<a
href={METRICS_CODE_REF_URL}
target='_blank'
rel='noopener noreferrer'
/>
),
}}
/>
{t('appSettings.optinCrashReportsDesc')}
</div>
</div>
<div className='appsettings-modal__setting appsettings-modal__setting--crash-reports'>
<Checkbox
onChange={optinBFXAnalyticsHandler}
label={t('helpUsImproveModal.anonymousData')}
label={t('appSettings.optinCrashReports')}
checked={optinBFXAnalytics}
className='appsettings-modal__checkbox'
/>
<div className='appsettings-modal__description'>
<Trans
t={t}
i18nKey='helpUsImproveModal.anonymousDataDesc'
components={{
codeRefUrl: (
<a
href={UNIQUE_ID_CODE_REF_URL}
target='_blank'
rel='noopener noreferrer'
/>
),
}}
/>
{t('appSettings.optinCrashReportsDesc')}
</div>
</div>
<div className='appsettings-modal__setting appsettings-modal__setting--crash-reports'>
<Checkbox
onChange={optinVendorPendoHandler}
label={t('appSettings.optinVendorPendo')}
checked={optinVendorPendo}
className='appsettings-modal__checkbox'
/>
<div className='appsettings-modal__description'>
{t('appSettings.optinVendorPendoDesc')}
</div>
</div>
</div>
Expand Down

This file was deleted.

Loading
Loading