fixes #1206, removes titles where it is unnecesary

This commit is contained in:
Cassie Tarakajian 2019-10-31 17:27:23 -04:00
parent 821b2ea111
commit 57ecfb7e1e
10 changed files with 3 additions and 66 deletions

View file

@ -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';

View file

@ -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

View file

@ -77,7 +77,7 @@ class Console extends React.Component {
});
return (
<div className={consoleClass} role="main" title="console">
<div className={consoleClass} role="main">
<div className="preview-console__header">
<h2 className="preview-console__header-title">Console</h2>
<div className="preview-console__header-buttons">

View file

@ -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`}
>
<InlineSVG src={shareUrl} alt={`open ${label} view in new tab`} />
</a>

View file

@ -312,7 +312,6 @@ class Editor extends React.Component {
return (
<section
title="code editor"
role="main"
className={editorSectionClass}
>

View file

@ -1,24 +0,0 @@
import React from 'react';
function HTTPSModal() {
return (
<section className="help-modal">
<div className="help-modal__section">
<div>
<p>Use the checkbox to choose whether this sketch should be loaded using HTTPS or HTTP.</p>
<p>You should choose HTTPS if you need to:</p>
<ul>
<li>access a webcam or microphone</li>
<li>access an API served over HTTPS</li>
</ul>
<p>Choose HTTP if you need to:</p>
<ul>
<li>access an API served over HTTP</li>
</ul>
</div>
</div>
</section>
);
}
export default HTTPSModal;

View file

@ -92,7 +92,7 @@ class Preferences extends React.Component {
const beep = new Audio(beepUrl);
return (
<section className="preferences" title="preference-menu">
<section className="preferences">
<Helmet>
<title>p5.js Web Editor | Preferences</title>
</Helmet>

View file

@ -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"
/>

View file

@ -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 {
<Toolbar />
{this.props.ide.preferencesIsVisible &&
<Overlay
title="Settings"
ariaLabel="settings"
closeOverlay={this.props.closePreferences}
>
@ -397,7 +395,6 @@ class IDEView extends React.Component {
{ this.props.location.pathname === '/about' &&
<Overlay
previousPath={this.props.ide.previousPath}
title="Welcome"
ariaLabel="about"
>
<About previousPath={this.props.ide.previousPath} />
@ -406,7 +403,6 @@ class IDEView extends React.Component {
{ this.props.location.pathname === '/feedback' &&
<Overlay
previousPath={this.props.ide.previousPath}
title="Submit Feedback"
ariaLabel="submit-feedback"
>
<Feedback previousPath={this.props.ide.previousPath} />
@ -414,7 +410,6 @@ class IDEView extends React.Component {
}
{ this.props.ide.shareModalVisible &&
<Overlay
title="Share This Sketch"
ariaLabel="share"
closeOverlay={this.props.closeShareModal}
>
@ -427,7 +422,6 @@ class IDEView extends React.Component {
}
{ this.props.ide.keyboardShortcutVisible &&
<Overlay
title="Keyboard Shortcuts"
ariaLabel="keyboard shortcuts"
closeOverlay={this.props.closeKeyboardShortcutModal}
>
@ -436,7 +430,6 @@ class IDEView extends React.Component {
}
{ this.props.ide.errorType &&
<Overlay
title="Error"
ariaLabel="error"
closeOverlay={this.props.hideErrorModal}
>
@ -446,14 +439,6 @@ class IDEView extends React.Component {
/>
</Overlay>
}
{ this.props.ide.helpType &&
<Overlay
title="Serve over HTTPS"
closeOverlay={this.props.hideHelpModal}
>
<HTTPSModal />
</Overlay>
}
</div>
);
}
@ -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,

View file

@ -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: