From b095ed9c5aad14712d4dcdd5ca08b51d73fc3587 Mon Sep 17 00:00:00 2001 From: Alexis Launay Date: Thu, 3 Nov 2016 17:42:32 +0100 Subject: [PATCH 1/2] Replace link with embedded image alternates --- app/images/alt-R.svg | 11 ---------- app/images/classic-R.svg | 10 ---------- .../components/alternate-menu.components.jsx | 20 +++++++------------ 3 files changed, 7 insertions(+), 34 deletions(-) delete mode 100644 app/images/alt-R.svg delete mode 100644 app/images/classic-R.svg diff --git a/app/images/alt-R.svg b/app/images/alt-R.svg deleted file mode 100644 index 46d2c9e1e..000000000 --- a/app/images/alt-R.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/app/images/classic-R.svg b/app/images/classic-R.svg deleted file mode 100644 index 902ee76fa..000000000 --- a/app/images/classic-R.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/app/scripts/components/alternate-menu.components.jsx b/app/scripts/components/alternate-menu.components.jsx index 89899aac1..704f40e94 100644 --- a/app/scripts/components/alternate-menu.components.jsx +++ b/app/scripts/components/alternate-menu.components.jsx @@ -1,17 +1,10 @@ import React from 'react'; -import PureRenderMixin from 'react-addons-pure-render-mixin'; import LocalClient from '../stores/local-client.stores.jsx'; -export default class AlternateMenu extends React.Component { - constructor(props) { - super(props); - this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this); - } - +export default class AlternateMenu extends React.PureComponent { render() { - - const alternates = _.map(this.props.alternates, (alt, index) => { + const alternates = this.props.alternates.map((alt, index) => { return ; }); @@ -26,10 +19,11 @@ export default class AlternateMenu extends React.Component { } } -class Alternate extends React.Component { +class Alternate extends React.PureComponent { constructor(props) { super(props); - this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this); + + this.selectAlternate = this.selectAlternate.bind(this); } componentWillMount() { @@ -42,8 +36,8 @@ class Alternate extends React.Component { render() { return ( -
{this.selectAlternate();}}> - +
+
); } From c12c9d745983c56ff61a12cef208ffc5d61cb772 Mon Sep 17 00:00:00 2001 From: Alexis Launay Date: Thu, 3 Nov 2016 18:40:08 +0100 Subject: [PATCH 2/2] Remove image alternates for venus.ptf --- app/images/ball-c.svg | 10 ---------- app/images/double-story-a.svg | 14 -------------- app/images/full-serifs-i.svg | 10 ---------- app/images/serif-less-c.svg | 9 --------- app/images/single-story-a.svg | 12 ------------ app/images/top-serif-i.svg | 8 -------- 6 files changed, 63 deletions(-) delete mode 100644 app/images/ball-c.svg delete mode 100644 app/images/double-story-a.svg delete mode 100644 app/images/full-serifs-i.svg delete mode 100644 app/images/serif-less-c.svg delete mode 100644 app/images/single-story-a.svg delete mode 100644 app/images/top-serif-i.svg diff --git a/app/images/ball-c.svg b/app/images/ball-c.svg deleted file mode 100644 index 723931d53..000000000 --- a/app/images/ball-c.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/app/images/double-story-a.svg b/app/images/double-story-a.svg deleted file mode 100644 index f5731797a..000000000 --- a/app/images/double-story-a.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - diff --git a/app/images/full-serifs-i.svg b/app/images/full-serifs-i.svg deleted file mode 100644 index 3e72900a1..000000000 --- a/app/images/full-serifs-i.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/app/images/serif-less-c.svg b/app/images/serif-less-c.svg deleted file mode 100644 index 513030f68..000000000 --- a/app/images/serif-less-c.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/app/images/single-story-a.svg b/app/images/single-story-a.svg deleted file mode 100644 index a77d46f52..000000000 --- a/app/images/single-story-a.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/app/images/top-serif-i.svg b/app/images/top-serif-i.svg deleted file mode 100644 index a8898226a..000000000 --- a/app/images/top-serif-i.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - -