From 57ecfb7e1e578cdd4c4949d59334bc7c9e0dc6fa Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Thu, 31 Oct 2019 17:27:23 -0400 Subject: [PATCH] fixes #1206, removes titles where it is unnecesary --- client/constants.js | 3 --- client/modules/IDE/actions/ide.js | 13 ---------- client/modules/IDE/components/Console.jsx | 2 +- .../modules/IDE/components/CopyableInput.jsx | 1 - client/modules/IDE/components/Editor.jsx | 1 - client/modules/IDE/components/HTTPSModal.jsx | 24 ------------------- client/modules/IDE/components/Preferences.jsx | 2 +- .../modules/IDE/components/PreviewFrame.jsx | 2 +- client/modules/IDE/pages/IDEView.jsx | 17 ------------- client/modules/IDE/reducers/ide.js | 4 ---- 10 files changed, 3 insertions(+), 66 deletions(-) delete mode 100644 client/modules/IDE/components/HTTPSModal.jsx diff --git a/client/constants.js b/client/constants.js index 82baab02..d4a4504b 100644 --- a/client/constants.js +++ b/client/constants.js @@ -113,9 +113,6 @@ export const HIDE_ERROR_MODAL = 'HIDE_ERROR_MODAL'; export const PERSIST_STATE = 'PERSIST_STATE'; export const CLEAR_PERSISTED_STATE = 'CLEAR_PERSISTED_STATE'; -export const SHOW_HELP_MODAL = 'SHOW_HELP_MODAL'; -export const HIDE_HELP_MODAL = 'HIDE_HELP_MODAL'; - export const HIDE_RUNTIME_ERROR_WARNING = 'HIDE_RUNTIME_ERROR_WARNING'; export const SHOW_RUNTIME_ERROR_WARNING = 'SHOW_RUNTIME_ERROR_WARNING'; export const SET_ASSETS = 'SET_ASSETS'; diff --git a/client/modules/IDE/actions/ide.js b/client/modules/IDE/actions/ide.js index b6351a7d..cf573573 100644 --- a/client/modules/IDE/actions/ide.js +++ b/client/modules/IDE/actions/ide.js @@ -232,19 +232,6 @@ export function hideErrorModal() { }; } -export function showHelpModal(helpType) { - return { - type: ActionTypes.SHOW_HELP_MODAL, - helpType - }; -} - -export function hideHelpModal() { - return { - type: ActionTypes.HIDE_HELP_MODAL - }; -} - export function hideRuntimeErrorWarning() { return { type: ActionTypes.HIDE_RUNTIME_ERROR_WARNING diff --git a/client/modules/IDE/components/Console.jsx b/client/modules/IDE/components/Console.jsx index 547f66e6..ba45826e 100644 --- a/client/modules/IDE/components/Console.jsx +++ b/client/modules/IDE/components/Console.jsx @@ -77,7 +77,7 @@ class Console extends React.Component { }); return ( -
+

Console

diff --git a/client/modules/IDE/components/CopyableInput.jsx b/client/modules/IDE/components/CopyableInput.jsx index 7a6d866e..2ebc9547 100644 --- a/client/modules/IDE/components/CopyableInput.jsx +++ b/client/modules/IDE/components/CopyableInput.jsx @@ -70,7 +70,6 @@ class CopyableInput extends React.Component { rel="noopener noreferrer" href={value} className="copyable-input__preview" - title={`open ${label.toLowerCase()} view in new tab`} > diff --git a/client/modules/IDE/components/Editor.jsx b/client/modules/IDE/components/Editor.jsx index 9c447cfa..b8e81650 100644 --- a/client/modules/IDE/components/Editor.jsx +++ b/client/modules/IDE/components/Editor.jsx @@ -312,7 +312,6 @@ class Editor extends React.Component { return (
diff --git a/client/modules/IDE/components/HTTPSModal.jsx b/client/modules/IDE/components/HTTPSModal.jsx deleted file mode 100644 index 6240dd51..00000000 --- a/client/modules/IDE/components/HTTPSModal.jsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from 'react'; - -function HTTPSModal() { - return ( -
-
-
-

Use the checkbox to choose whether this sketch should be loaded using HTTPS or HTTP.

-

You should choose HTTPS if you need to:

-
    -
  • access a webcam or microphone
  • -
  • access an API served over HTTPS
  • -
-

Choose HTTP if you need to:

-
    -
  • access an API served over HTTP
  • -
-
-
-
- ); -} - -export default HTTPSModal; diff --git a/client/modules/IDE/components/Preferences.jsx b/client/modules/IDE/components/Preferences.jsx index 74fe2108..7ca5a216 100644 --- a/client/modules/IDE/components/Preferences.jsx +++ b/client/modules/IDE/components/Preferences.jsx @@ -92,7 +92,7 @@ class Preferences extends React.Component { const beep = new Audio(beepUrl); return ( -
+
p5.js Web Editor | Preferences diff --git a/client/modules/IDE/components/PreviewFrame.jsx b/client/modules/IDE/components/PreviewFrame.jsx index 21ede62a..45fa00fd 100644 --- a/client/modules/IDE/components/PreviewFrame.jsx +++ b/client/modules/IDE/components/PreviewFrame.jsx @@ -360,7 +360,7 @@ class PreviewFrame extends React.Component { aria-label="sketch output" role="main" frameBorder="0" - title="sketch output" + title="sketch preview" ref={(element) => { this.iframeElement = element; }} sandbox="allow-scripts allow-pointer-lock allow-same-origin allow-popups allow-forms allow-modals" /> diff --git a/client/modules/IDE/pages/IDEView.jsx b/client/modules/IDE/pages/IDEView.jsx index 072360ae..29f8b6ee 100644 --- a/client/modules/IDE/pages/IDEView.jsx +++ b/client/modules/IDE/pages/IDEView.jsx @@ -15,7 +15,6 @@ import NewFolderModal from '../components/NewFolderModal'; import ShareModal from '../components/ShareModal'; import KeyboardShortcutModal from '../components/KeyboardShortcutModal'; import ErrorModal from '../components/ErrorModal'; -import HTTPSModal from '../components/HTTPSModal'; import Nav from '../../../components/Nav'; import Console from '../components/Console'; import Toast from '../components/Toast'; @@ -197,7 +196,6 @@ class IDEView extends React.Component { {this.props.ide.preferencesIsVisible && @@ -397,7 +395,6 @@ class IDEView extends React.Component { { this.props.location.pathname === '/about' && @@ -406,7 +403,6 @@ class IDEView extends React.Component { { this.props.location.pathname === '/feedback' && @@ -414,7 +410,6 @@ class IDEView extends React.Component { } { this.props.ide.shareModalVisible && @@ -427,7 +422,6 @@ class IDEView extends React.Component { } { this.props.ide.keyboardShortcutVisible && @@ -436,7 +430,6 @@ class IDEView extends React.Component { } { this.props.ide.errorType && @@ -446,14 +439,6 @@ class IDEView extends React.Component { /> } - { this.props.ide.helpType && - - - - }
); } @@ -499,7 +484,6 @@ IDEView.propTypes = { previousPath: PropTypes.string.isRequired, justOpenedProject: PropTypes.bool.isRequired, errorType: PropTypes.string, - helpType: PropTypes.string, runtimeErrorWarningVisible: PropTypes.bool.isRequired, }).isRequired, stopSketch: PropTypes.func.isRequired, @@ -600,7 +584,6 @@ IDEView.propTypes = { hideErrorModal: PropTypes.func.isRequired, clearPersistedState: PropTypes.func.isRequired, persistState: PropTypes.func.isRequired, - hideHelpModal: PropTypes.func.isRequired, showRuntimeErrorWarning: PropTypes.func.isRequired, hideRuntimeErrorWarning: PropTypes.func.isRequired, startSketch: PropTypes.func.isRequired, diff --git a/client/modules/IDE/reducers/ide.js b/client/modules/IDE/reducers/ide.js index 03ef4705..070c2371 100644 --- a/client/modules/IDE/reducers/ide.js +++ b/client/modules/IDE/reducers/ide.js @@ -102,10 +102,6 @@ const ide = (state = initialState, action) => { return Object.assign({}, state, { errorType: action.modalType }); case ActionTypes.HIDE_ERROR_MODAL: return Object.assign({}, state, { errorType: undefined }); - case ActionTypes.SHOW_HELP_MODAL: - return Object.assign({}, state, { helpType: action.helpType }); - case ActionTypes.HIDE_HELP_MODAL: - return Object.assign({}, state, { helpType: undefined }); case ActionTypes.HIDE_RUNTIME_ERROR_WARNING: return Object.assign({}, state, { runtimeErrorWarningVisible: false }); case ActionTypes.SHOW_RUNTIME_ERROR_WARNING: