From a0cb035dd4a959c52db8fc283d54e2c11b2f0f42 Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Tue, 19 May 2020 15:34:00 -0400 Subject: [PATCH] Add
to all pages, add semantic HTML updates --- client/components/Nav.jsx | 21 +- .../__test__/__snapshots__/Nav.test.jsx.snap | 614 +++++++++--------- client/modules/IDE/components/AssetList.jsx | 4 +- .../CollectionList/CollectionList.jsx | 4 +- client/modules/IDE/components/Console.jsx | 8 +- client/modules/IDE/components/Editor.jsx | 9 +- client/modules/IDE/components/Sidebar.jsx | 8 +- client/modules/IDE/components/SketchList.jsx | 4 +- client/modules/IDE/pages/FullView.jsx | 4 +- client/modules/IDE/pages/IDEView.jsx | 8 +- client/modules/User/components/Collection.jsx | 102 +-- client/modules/User/pages/AccountView.jsx | 4 +- client/modules/User/pages/DashboardView.jsx | 4 +- client/modules/User/pages/LoginView.jsx | 4 +- client/modules/User/pages/SignupView.jsx | 4 +- client/styles/components/_collection.scss | 6 + 16 files changed, 403 insertions(+), 405 deletions(-) diff --git a/client/components/Nav.jsx b/client/components/Nav.jsx index eb5ef944..22305b3a 100644 --- a/client/components/Nav.jsx +++ b/client/components/Nav.jsx @@ -682,21 +682,12 @@ class Nav extends React.PureComponent { }; return ( - +
+ +
); } } diff --git a/client/components/__test__/__snapshots__/Nav.test.jsx.snap b/client/components/__test__/__snapshots__/Nav.test.jsx.snap index c1ae3128..592fc282 100644 --- a/client/components/__test__/__snapshots__/Nav.test.jsx.snap +++ b/client/components/__test__/__snapshots__/Nav.test.jsx.snap @@ -1,344 +1,346 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Nav renders correctly 1`] = ` - + `; diff --git a/client/modules/IDE/components/AssetList.jsx b/client/modules/IDE/components/AssetList.jsx index f2fef386..4c2e0371 100644 --- a/client/modules/IDE/components/AssetList.jsx +++ b/client/modules/IDE/components/AssetList.jsx @@ -175,7 +175,7 @@ class AssetList extends React.Component { render() { const { assetList } = this.props; return ( -
+
{this.getAssetsTitle()} @@ -195,7 +195,7 @@ class AssetList extends React.Component { {assetList.map(asset => )} } -
+ ); } } diff --git a/client/modules/IDE/components/CollectionList/CollectionList.jsx b/client/modules/IDE/components/CollectionList/CollectionList.jsx index 9fd70479..251f3e3c 100644 --- a/client/modules/IDE/components/CollectionList/CollectionList.jsx +++ b/client/modules/IDE/components/CollectionList/CollectionList.jsx @@ -129,7 +129,7 @@ class CollectionList extends React.Component { const username = this.props.username !== undefined ? this.props.username : this.props.user.username; return ( -
+
{this.getTitle()} @@ -176,7 +176,7 @@ class CollectionList extends React.Component { ) } -
+ ); } } diff --git a/client/modules/IDE/components/Console.jsx b/client/modules/IDE/components/Console.jsx index 604bf9f0..37711d27 100644 --- a/client/modules/IDE/components/Console.jsx +++ b/client/modules/IDE/components/Console.jsx @@ -86,8 +86,8 @@ class Console extends React.Component { }); return ( -
-
+
+

Console

-
+
{ this.consoleMessages = element; }} className="preview-console__messages"> {this.props.consoleEvents.map((consoleEvent) => { const { method, times } = consoleEvent; @@ -127,7 +127,7 @@ class Console extends React.Component { ); })}
-
+ ); } } diff --git a/client/modules/IDE/components/Editor.jsx b/client/modules/IDE/components/Editor.jsx index 9f2ac9e9..e07dd001 100644 --- a/client/modules/IDE/components/Editor.jsx +++ b/client/modules/IDE/components/Editor.jsx @@ -314,10 +314,7 @@ class Editor extends React.Component { }); return ( -
+
-
{ this.codemirrorContainer = element; }} className={editorHolderClass} > -
+
{ this.codemirrorContainer = element; }} className={editorHolderClass} > +
diff --git a/client/modules/IDE/components/Sidebar.jsx b/client/modules/IDE/components/Sidebar.jsx index 141728af..97c8c0ec 100644 --- a/client/modules/IDE/components/Sidebar.jsx +++ b/client/modules/IDE/components/Sidebar.jsx @@ -68,8 +68,8 @@ class Sidebar extends React.Component { const rootFile = this.props.files.filter(file => file.name === 'root')[0]; return ( - +
); } } diff --git a/client/modules/IDE/components/SketchList.jsx b/client/modules/IDE/components/SketchList.jsx index c10855bd..bbece87a 100644 --- a/client/modules/IDE/components/SketchList.jsx +++ b/client/modules/IDE/components/SketchList.jsx @@ -414,7 +414,7 @@ class SketchList extends React.Component { render() { const username = this.props.username !== undefined ? this.props.username : this.props.user.username; return ( -
+
{this.getSketchesTitle()} @@ -457,7 +457,7 @@ class SketchList extends React.Component { /> } -
+ ); } } diff --git a/client/modules/IDE/pages/FullView.jsx b/client/modules/IDE/pages/FullView.jsx index 6a18566f..cbdc89d6 100644 --- a/client/modules/IDE/pages/FullView.jsx +++ b/client/modules/IDE/pages/FullView.jsx @@ -25,7 +25,7 @@ class FullView extends React.Component { owner={{ username: this.props.project.owner ? `${this.props.project.owner.username}` : '' }} project={{ name: this.props.project.name, id: this.props.params.project_id }} /> -
+
-
+
); } diff --git a/client/modules/IDE/pages/IDEView.jsx b/client/modules/IDE/pages/IDEView.jsx index eba7b76c..14ac255c 100644 --- a/client/modules/IDE/pages/IDEView.jsx +++ b/client/modules/IDE/pages/IDEView.jsx @@ -239,7 +239,7 @@ class IDEView extends React.Component { /> } -
+
-
+

Preview

@@ -370,10 +370,10 @@ class IDEView extends React.Component { cmController={this.cmController} />
-
+ - + { this.props.ide.modalIsVisible && } diff --git a/client/modules/User/components/Collection.jsx b/client/modules/User/components/Collection.jsx index 05f6b757..a5a043c5 100644 --- a/client/modules/User/components/Collection.jsx +++ b/client/modules/User/components/Collection.jsx @@ -227,7 +227,7 @@ class Collection extends React.Component { // }; return ( -
+

@@ -270,7 +270,7 @@ class Collection extends React.Component { }

-
+ ); } @@ -344,54 +344,56 @@ class Collection extends React.Component { const title = this.hasCollection() ? this.getCollectionName() : null; return ( -
- - {this.getTitle()} - - {this._renderLoader()} - {this.hasCollection() && this._renderCollectionMetadata()} -
-
- {this._renderEmptyTable()} - {this.hasCollectionItems() && - - - - {this._renderFieldHeader('name', 'Name')} - {this._renderFieldHeader('createdAt', 'Date Added')} - {this._renderFieldHeader('user', 'Owner')} - - - - - {this.props.collection.items.map(item => - ())} - -
- } - { - this.state.isAddingSketches && ( - } - closeOverlay={this.hideAddSketches} - isFixedHeight - > -
- -
-
- ) - } -
-
-
+
+
+ + {this.getTitle()} + + {this._renderLoader()} + {this.hasCollection() && this._renderCollectionMetadata()} +
+
+ {this._renderEmptyTable()} + {this.hasCollectionItems() && + + + + {this._renderFieldHeader('name', 'Name')} + {this._renderFieldHeader('createdAt', 'Date Added')} + {this._renderFieldHeader('user', 'Owner')} + + + + + {this.props.collection.items.map(item => + ())} + +
+ } + { + this.state.isAddingSketches && ( + } + closeOverlay={this.hideAddSketches} + isFixedHeight + > +
+ +
+
+ ) + } +
+
+
+
); } } diff --git a/client/modules/User/pages/AccountView.jsx b/client/modules/User/pages/AccountView.jsx index 54157061..924e8a82 100644 --- a/client/modules/User/pages/AccountView.jsx +++ b/client/modules/User/pages/AccountView.jsx @@ -46,7 +46,7 @@ class AccountView extends React.Component {