Skip to content
This repository was archived by the owner on Jun 10, 2019. It is now read-only.

Various performance fixes #932

Merged
merged 8 commits into from
Apr 21, 2018
Merged
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
1 change: 0 additions & 1 deletion .storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { configure } from '@storybook/react';

import 'shared/styles/normalize.global.css';
import 'shared/styles/react-table.global.css';
import 'shared/styles/react-select.global.css';
import 'index.css';

Expand Down
39 changes: 0 additions & 39 deletions index.html

This file was deleted.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"react-scroll": "^1.5.4",
"react-scroll-up-button": "^1.5.9",
"react-select": "^1.0.0-rc.5",
"react-table": "^6.0.5",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally got rid of this dependency, nice cleanup.

"react-toastr": "^2.9.5",
"react-youtube": "^7.5.0",
"sinon": "^2.3.2",
Expand Down
43 changes: 18 additions & 25 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">

<head>
<title>Operation Code</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="apple-touch-icon" sizes="57x57" href="%PUBLIC_URL%/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="%PUBLIC_URL%/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="%PUBLIC_URL%/apple-icon-72x72.png">
Expand All @@ -18,43 +20,34 @@
<link rel="icon" type="image/png" sizes="96x96" href="%PUBLIC_URL%/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="%PUBLIC_URL%/favicon-16x16.png">
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileColor" content="#47566b">
<meta name="msapplication-TileImage" content="%PUBLIC_URL%/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif">
<script src="https://cdn.ravenjs.com/3.16.0/raven.min.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="%PUBLIC_URL%/notification.css">
<!--
Notice the use of %PUBLIC_URL% in the tag above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
<meta name="theme-color" content="#47566b">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice update of this theme color! Looks nice.

<meta name="description" content="Veteran-founded and led, Operation Code is a 501(c)(3) non-profit whose mission is to aid military, vets and their families learn coding and web technologies.">
<meta name="keywords" content="operation code, veterans, software development, learn to code, keep coding, veteran coders, senate veterans, house veterans, gi bill, new gi bill, operationcode.org, #operationcode, military vets, vets">
<meta name="author" content="Veteran Coders, for Veterans Coders">
<meta property="og:image" content="./images/logos/small-stacked-logo-blue.png" />

<!--Twitter cards -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@operation_code" />
<meta name="twitter:creator" content="@operation_code" />

Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<link rel="stylesheet" type="styles/css" href="styles/css/styles.css">
<script defer src="https://cdn.ravenjs.com/3.16.0/raven.min.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif">
<title>Operation Code</title>
</head>

<body>
<div id="root"></div>
<script>
Raven.config('https://[email protected]/147247', {
shouldSendCallback: function() {
shouldSendCallback: function () {
return window.location.host === 'operationcode.org';
}
}).install();
</script>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.

You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.

To begin the development, run `npm start`.
To create a production bundle, use `npm run build`.
-->
</body>

</html>
15 changes: 0 additions & 15 deletions public/notification.css

This file was deleted.

2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import ReactDOM from 'react-dom';
import '@fortawesome/fontawesome/styles.css';
import App from './App';
import './shared/styles/normalize.global.css';
import './shared/styles/react-table.global.css';
import './shared/styles/react-select.global.css';
import './shared/styles/notifications.css';
Copy link
Member

@jjhampton jjhampton Mar 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kylemh Should we also remove the file /public/notification.css ?

Another thing I'm not too knowledgeable about (possibly due to my inexperience w/ Webpack) is why we have two index HTML files - a /public/index.html and root-level index.html. In the public file, I still see the older (non-defer) Raven scripts, and also <link rel="stylesheet" href="%PUBLIC_URL%/notification.css">. Might we want to apply some of this PR's changes there too? On my dev machine, running this branch, I'm still seeing a CSS network request made for notification.css.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a bit of reading around @alexspence 's helpful comments from ejection within webpack related files, looks like we're serving everything relevant via public, and doing so on purpose (some kind of vulnerability).

I've updated public/index.html, removed public/notification.css, and deleted the ~/index.html to avoid further confusion.

import './index.css';

ReactDOM.render(
Expand Down
75 changes: 0 additions & 75 deletions src/shared/components/indexTable/indexTable.js

This file was deleted.

Loading