diff --git a/protocol-designer/src/components/SettingsPage/Privacy.js b/protocol-designer/src/components/SettingsPage/SettingsApp.js similarity index 69% rename from protocol-designer/src/components/SettingsPage/Privacy.js rename to protocol-designer/src/components/SettingsPage/SettingsApp.js index 12bdb62dbe9..a958164816c 100644 --- a/protocol-designer/src/components/SettingsPage/Privacy.js +++ b/protocol-designer/src/components/SettingsPage/SettingsApp.js @@ -2,27 +2,39 @@ import React from 'react' import {connect} from 'react-redux' import i18n from '../../localization' -import {Card, ToggleButton} from '@opentrons/components' +import {Card, OutlineButton, ToggleButton} from '@opentrons/components' import styles from './SettingsPage.css' import { actions as analyticsActions, selectors as analyticsSelectors, } from '../../analytics' +import {actions as tutorialActions} from '../../tutorial' import type {BaseState} from '../../types' type Props = { hasOptedIn: boolean | null, toggleOptedIn: () => mixed, + restoreHints: () => mixed, } type SP = { hasOptedIn: $PropertyType, } -function Privacy (props: Props) { - const {hasOptedIn, toggleOptedIn} = props +function SettingsApp (props: Props) { + const {hasOptedIn, toggleOptedIn, restoreHints} = props return (
+ +
+
+ {i18n.t('card.body.restore_hints')} + {i18n.t('button.restore')} +
+
+

{i18n.t('card.toggle.share_session')}

@@ -60,7 +72,8 @@ function mergeProps (stateProps: SP, dispatchProps: {dispatch: Dispatch<*>}): Pr return { ...stateProps, toggleOptedIn: () => dispatch(_toggleOptedIn()), + restoreHints: () => dispatch(tutorialActions.clearAllHintDismissals()), } } -export default connect(mapStateToProps, null, mergeProps)(Privacy) +export default connect(mapStateToProps, null, mergeProps)(SettingsApp) diff --git a/protocol-designer/src/components/SettingsPage/SettingsPage.css b/protocol-designer/src/components/SettingsPage/SettingsPage.css index 7a0c73f20f0..aa4210dace0 100644 --- a/protocol-designer/src/components/SettingsPage/SettingsPage.css +++ b/protocol-designer/src/components/SettingsPage/SettingsPage.css @@ -60,8 +60,12 @@ } } +.button { + float: right; +} + .body_wrapper { margin: 0.375rem 0 0.625rem; line-height: 1.5; - padding: 1rem; + padding: 2rem 1rem; } diff --git a/protocol-designer/src/components/SettingsPage/SettingsSidebar.js b/protocol-designer/src/components/SettingsPage/SettingsSidebar.js index b17475b68b7..844a8615051 100644 --- a/protocol-designer/src/components/SettingsPage/SettingsSidebar.js +++ b/protocol-designer/src/components/SettingsPage/SettingsSidebar.js @@ -16,9 +16,9 @@ const SettingsSidebar = (props: SP & DP) => ( + selected={props.currentPage === 'settings-app'} + onClick={props.makeNavigateToPage('settings-app')} + title={i18n.t('nav.settings.app')}/> {/* { // TODO: BC 2018-09-01 when we have feature flags put them here return
Feature Flags Coming Soon...
} - case 'settings-privacy': + case 'settings-app': default: - return + return } } diff --git a/protocol-designer/src/containers/ConnectedMainPanel.js b/protocol-designer/src/containers/ConnectedMainPanel.js index a1adc5bdf2c..b45b0dc0919 100644 --- a/protocol-designer/src/containers/ConnectedMainPanel.js +++ b/protocol-designer/src/containers/ConnectedMainPanel.js @@ -24,7 +24,7 @@ function MainPanel (props: Props) { return case 'liquids': return - case 'settings-privacy': + case 'settings-app': return default: return diff --git a/protocol-designer/src/containers/ConnectedNav.js b/protocol-designer/src/containers/ConnectedNav.js index af3cd07b2ad..3f095e226e7 100644 --- a/protocol-designer/src/containers/ConnectedNav.js +++ b/protocol-designer/src/containers/ConnectedNav.js @@ -49,8 +49,8 @@ function Nav (props: Props) { + selected={props.currentPage === 'settings-app'} + onClick={props.handleClick('settings-app')} /> } /> diff --git a/protocol-designer/src/containers/ConnectedSidebar.js b/protocol-designer/src/containers/ConnectedSidebar.js index 2ce921cc322..958afbda81b 100644 --- a/protocol-designer/src/containers/ConnectedSidebar.js +++ b/protocol-designer/src/containers/ConnectedSidebar.js @@ -28,7 +28,7 @@ function Sidebar (props: Props) { case 'file-detail': return case 'settings-features': - case 'settings-privacy': + case 'settings-app': return } return null diff --git a/protocol-designer/src/containers/ConnectedTitleBar.js b/protocol-designer/src/containers/ConnectedTitleBar.js index 8d1cc50a680..f2182b21cc2 100644 --- a/protocol-designer/src/containers/ConnectedTitleBar.js +++ b/protocol-designer/src/containers/ConnectedTitleBar.js @@ -62,7 +62,7 @@ function mapStateToProps (state: BaseState): SP { case 'file-splash': case 'file-detail': case 'settings-features': - case 'settings-privacy': + case 'settings-app': return { _page, title: i18n.t([`nav.title.${_page}`, fileName]), diff --git a/protocol-designer/src/localization/en/button.json b/protocol-designer/src/localization/en/button.json index d1948312e39..3221c1b3f87 100644 --- a/protocol-designer/src/localization/en/button.json +++ b/protocol-designer/src/localization/en/button.json @@ -11,6 +11,7 @@ "no": "no", "ok": "ok", "reset": "reset", + "restore": "restore", "save": "save", "swap": "swap", "yes": "yes" diff --git a/protocol-designer/src/localization/en/card.json b/protocol-designer/src/localization/en/card.json index e979f5445ff..2b5a9d2cb5b 100644 --- a/protocol-designer/src/localization/en/card.json +++ b/protocol-designer/src/localization/en/card.json @@ -3,13 +3,14 @@ "data_collected_is_internal": "We never share sessions outside of Opentrons", "data_only_from_pd": "We don’t record or store anything happening outside of your open Protocol Designer tab", "opt_out_of_data_collection": "You can choose to opt in or out in Settings > Privacy", - "reason_for_collecting_data": "We’re working to improve Protocol Designer. Part of the process involves watching real user sessions to understand which parts of the interface are working and which could use improvement." - + "reason_for_collecting_data": "We’re working to improve Protocol Designer. Part of the process involves watching real user sessions to understand which parts of the interface are working and which could use improvement.", + "restore_hints": "Restore all hints and tips notifications" }, "title": { - "privacy": "Privacy" + "privacy": "Privacy", + "hints": "Hints" }, "toggle": { "share_session": "Share sessions with the Opentrons Product Team" } -} \ No newline at end of file +} diff --git a/protocol-designer/src/localization/en/nav.json b/protocol-designer/src/localization/en/nav.json index 9c09aa13e92..b334d5aff90 100644 --- a/protocol-designer/src/localization/en/nav.json +++ b/protocol-designer/src/localization/en/nav.json @@ -1,5 +1,6 @@ { "settings": { + "app": "APP", "privacy": "PRIVACY", "feature_flags": "Feature Flags" }, @@ -16,12 +17,12 @@ }, "title": { "settings-features": "Opentrons Beta", - "settings-privacy": "Opentrons Beta", + "settings-app": "Opentrons Beta", "file-splash": "Opentrons Beta" }, "subtitle": { "file-detail": "File Details", - "settings-privacy": "Privacy", + "settings-app": "App", "liquids": "Liquids" } } diff --git a/protocol-designer/src/navigation/types.js b/protocol-designer/src/navigation/types.js index 6834a1b55d3..8bf3013288b 100644 --- a/protocol-designer/src/navigation/types.js +++ b/protocol-designer/src/navigation/types.js @@ -4,5 +4,5 @@ export type Page = 'file-detail' | 'liquids' | 'steplist' | - 'settings-privacy' | + 'settings-app' | 'settings-features' diff --git a/protocol-designer/src/tutorial/actions.js b/protocol-designer/src/tutorial/actions.js index 06af8c4c9d6..001e637aa43 100644 --- a/protocol-designer/src/tutorial/actions.js +++ b/protocol-designer/src/tutorial/actions.js @@ -23,3 +23,7 @@ export const removeHint = (hintKey: HintKey, rememberDismissal: boolean): Remove type: 'REMOVE_HINT', payload: {hintKey, rememberDismissal}, }) + +export const clearAllHintDismissals = () => ({ + type: 'CLEAR_ALL_HINT_DISMISSALS', +}) diff --git a/protocol-designer/src/tutorial/reducers.js b/protocol-designer/src/tutorial/reducers.js index ad472b13c47..2d9aab0cbbe 100644 --- a/protocol-designer/src/tutorial/reducers.js +++ b/protocol-designer/src/tutorial/reducers.js @@ -23,6 +23,7 @@ const dismissedHints = handleActions({ const {hintKey, rememberDismissal} = action.payload return {...state, [hintKey]: {rememberDismissal}} }, + CLEAR_ALL_HINT_DISMISSALS: () => dismissedHintsInitialState, }, dismissedHintsInitialState) export function dismissedHintsPersist (state: DismissedHintReducerState) {