[WIP] Discover page horizontal scroll implementation #394

Closed
akinwale wants to merge 7 commits from ui-category-carousel into master
Showing only changes of commit be4875e5fc - Show all commits

View file

@ -41,11 +41,18 @@ class FeaturedCategory extends React.PureComponent {
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
const numDisplayed = this.numDisplayedCards(cardRow); const numDisplayed = this.numDisplayedCards(cardRow);
const scrollToIdx = firstVisibleIdx - numDisplayed; const scrollToIdx = firstVisibleIdx - numDisplayed;
cardRow.scrollLeft = scrollToIdx < 0 ? 0 : cards[scrollToIdx].offsetLeft; const animationCallback = () => {
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
this.setState({ this.setState({
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
canScrollPrevious: cardRow.scrollLeft !== 0, canScrollPrevious: cardRow.scrollLeft !== 0,
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
canScrollNext: true, canScrollNext: true,
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
}); });
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
};
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
this.scrollCardItemsLeftAnimated(
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
cardRow,
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
scrollToIdx < 0 ? 0 : cards[scrollToIdx].offsetLeft,
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
100,
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
animationCallback
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
);
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
} }
} }
@ -65,23 +72,63 @@ class FeaturedCategory extends React.PureComponent {
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
if (lastVisibleCard) { if (lastVisibleCard) {
const numDisplayed = this.numDisplayedCards(cardRow); const numDisplayed = this.numDisplayedCards(cardRow);
cardRow.scrollLeft = Math.min( const animationCallback = () => {
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
lastVisibleCard.offsetLeft, // update last visible index after scroll
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
cardRow.scrollWidth - cardRow.clientWidth for (var i = 0; i < cards.length; i++) {
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
if (this.isCardVisible(cards[i], cardRow, true)) {
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
lastVisibleIdx = i;
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
}
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
}
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
if (lastVisibleIdx > cards.length - 1) {
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
lastVisibleIdx = cards.length - 1;
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
}
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
this.setState({ canScrollPrevious: true });
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
if (lastVisibleIdx === cards.length - 1) {
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
this.setState({ canScrollNext: false });
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
}
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
};
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
this.scrollCardItemsLeftAnimated(
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
cardRow,
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
Math.min(
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
lastVisibleCard.offsetLeft,
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
cardRow.scrollWidth - cardRow.clientWidth
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
),
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
100,
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
animationCallback
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
); );
}
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
}
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
// update last visible index after scroll scrollCardItemsLeftAnimated(cardRow, target, duration, callback) {
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
lastVisibleIdx += numDisplayed; if (!duration || duration <= diff) {
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
if (lastVisibleIdx > cards.length - 1) { cardRow.scrollLeft = target;
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
lastVisibleIdx = cards.length - 1; if (callback) {
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
callback();
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
} }
return;
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
this.setState({ canScrollPrevious: true });
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
} }
if (lastVisibleIdx === cards.length - 1) { const component = this;
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
this.setState({ canScrollNext: false }); var diff = target - cardRow.scrollLeft;
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
} var tick = diff / duration * 10;
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
setTimeout(() => {
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
cardRow.scrollLeft = cardRow.scrollLeft + tick;
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
if (cardRow.scrollLeft === target) {
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
if (callback) {
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
callback();
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
}
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
return;
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
}
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
component.scrollCardItemsLeftAnimated(
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
cardRow,
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
target,
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
duration - 10,
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
callback
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
);
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
}, 10);
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
} }
isCardVisible(section, cardRow, partialVisibility) { isCardVisible(section, cardRow, partialVisibility) {

kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P
kauffj commented 2017-07-28 00:13:57 +02:00 (Migrated from github.com)
Review

Would it be cleaner to handle this just by wrapping the <Icon> in something like <a onClick={this.handleScrollNext.bind(this)} />?

Would it be cleaner to handle this just by wrapping the `<Icon>` in something like `<a onClick={this.handleScrollNext.bind(this)} />`?
kauffj commented 2017-07-28 00:16:00 +02:00 (Migrated from github.com)
Review

No var :P

No `var` :P