From 1e13e927d022ff9b5eb4297430e13c2a79fa4508 Mon Sep 17 00:00:00 2001
From: Fabio Berger <me@fabioberger.com>
Date: Wed, 11 Apr 2018 17:36:01 +0900
Subject: Add missing space in property declaration

---
 packages/react-docs/src/components/documentation.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'packages/react-docs/src/components/documentation.tsx')

diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx
index 14fe175cf..800892dc8 100644
--- a/packages/react-docs/src/components/documentation.tsx
+++ b/packages/react-docs/src/components/documentation.tsx
@@ -337,7 +337,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
         return (
             <div key={`property-${property.name}-${property.type.name}`} className="pb3">
                 <code className={`hljs ${constants.TYPE_TO_SYNTAX[this.props.docsInfo.type]}`}>
-                    {property.name}:
+                    {property.name}:{' '}
                     <Type type={property.type} sectionName={sectionName} docsInfo={this.props.docsInfo} />
                 </code>
                 {property.source && (
-- 
cgit v1.2.3


From 1a36459ab84d538eef18b6c009fdec4d09cb3aef Mon Sep 17 00:00:00 2001
From: Leonid Logvinov <logvinov.leon@gmail.com>
Date: Fri, 4 May 2018 22:41:39 +0200
Subject: Fix property name

---
 packages/react-docs/src/components/documentation.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'packages/react-docs/src/components/documentation.tsx')

diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx
index 800892dc8..0a525f702 100644
--- a/packages/react-docs/src/components/documentation.tsx
+++ b/packages/react-docs/src/components/documentation.tsx
@@ -91,7 +91,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
                 left: 0,
                 bottom: 0,
                 right: 0,
-                overflowZ: 'hidden',
+                overflowX: 'hidden',
                 overflowY: 'scroll',
                 minHeight: `calc(100vh - ${this.props.topBarHeight}px)`,
                 WebkitOverflowScrolling: 'touch',
-- 
cgit v1.2.3


From b74957acdfc8d67d154bcb4698acd7575db7cc47 Mon Sep 17 00:00:00 2001
From: Leonid Logvinov <logvinov.leon@gmail.com>
Date: Fri, 11 May 2018 17:38:51 +0200
Subject: Add missing type definitions

---
 packages/react-docs/src/components/documentation.tsx | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

(limited to 'packages/react-docs/src/components/documentation.tsx')

diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx
index 0a525f702..25687db67 100644
--- a/packages/react-docs/src/components/documentation.tsx
+++ b/packages/react-docs/src/components/documentation.tsx
@@ -71,19 +71,19 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
             isHoveringSidebar: false,
         };
     }
-    public componentDidMount() {
+    public componentDidMount(): void {
         window.addEventListener('hashchange', this._onHashChanged.bind(this), false);
     }
-    public componentWillUnmount() {
+    public componentWillUnmount(): void {
         window.removeEventListener('hashchange', this._onHashChanged.bind(this), false);
     }
-    public componentDidUpdate(prevProps: DocumentationProps, prevState: DocumentationState) {
+    public componentDidUpdate(prevProps: DocumentationProps, prevState: DocumentationState): void {
         if (!_.isEqual(prevProps.docAgnosticFormat, this.props.docAgnosticFormat)) {
             const hash = window.location.hash.slice(1);
             sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID);
         }
     }
-    public render() {
+    public render(): React.ReactNode {
         const styles: Styles = {
             mainContainers: {
                 position: 'absolute',
@@ -157,7 +157,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
             </div>
         );
     }
-    private _renderLoading(mainContainersStyles: React.CSSProperties) {
+    private _renderLoading(mainContainersStyles: React.CSSProperties): React.ReactNode {
         return (
             <div className="col col-12" style={mainContainersStyles}>
                 <div
@@ -289,7 +289,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
             </div>
         );
     }
-    private _renderNetworkBadgesIfExists(sectionName: string) {
+    private _renderNetworkBadgesIfExists(sectionName: string): React.ReactNode {
         if (this.props.docsInfo.type !== SupportedDocJson.Doxity) {
             return null;
         }
@@ -368,17 +368,17 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
             />
         );
     }
-    private _onSidebarHover(event: React.FormEvent<HTMLInputElement>) {
+    private _onSidebarHover(event: React.FormEvent<HTMLInputElement>): void {
         this.setState({
             isHoveringSidebar: true,
         });
     }
-    private _onSidebarHoverOff() {
+    private _onSidebarHoverOff(): void {
         this.setState({
             isHoveringSidebar: false,
         });
     }
-    private _onHashChanged(event: any) {
+    private _onHashChanged(event: any): void {
         const hash = window.location.hash.slice(1);
         sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID);
     }
-- 
cgit v1.2.3


From 9778695b4ad1fd999eb79b01c768a2f2b9938917 Mon Sep 17 00:00:00 2001
From: fragosti <francesco.agosti93@gmail.com>
Date: Mon, 4 Jun 2018 19:48:21 -0700
Subject: Try enabling no-unused-variable...

---
 packages/react-docs/src/components/documentation.tsx | 4 ----
 1 file changed, 4 deletions(-)

(limited to 'packages/react-docs/src/components/documentation.tsx')

diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx
index 25687db67..2b021f04c 100644
--- a/packages/react-docs/src/components/documentation.tsx
+++ b/packages/react-docs/src/components/documentation.tsx
@@ -3,7 +3,6 @@ import {
     constants as sharedConstants,
     EtherscanLinkSuffixes,
     MarkdownSection,
-    MenuSubsectionsBySection,
     NestedSidebarMenu,
     Networks,
     SectionHeader,
@@ -13,13 +12,11 @@ import {
 import * as _ from 'lodash';
 import CircularProgress from 'material-ui/CircularProgress';
 import * as React from 'react';
-import { scroller } from 'react-scroll';
 
 import { DocsInfo } from '../docs_info';
 import {
     AddressByContractName,
     DocAgnosticFormat,
-    DoxityDocObj,
     Event,
     Property,
     SolidityMethod,
@@ -29,7 +26,6 @@ import {
     TypescriptMethod,
 } from '../types';
 import { constants } from '../utils/constants';
-import { utils } from '../utils/utils';
 
 import { Badge } from './badge';
 import { Comment } from './comment';
-- 
cgit v1.2.3


From e1879ef4d91fc58203d9748eca38695b79c43674 Mon Sep 17 00:00:00 2001
From: Fabio Berger <me@fabioberger.com>
Date: Mon, 11 Jun 2018 23:42:30 +0200
Subject: Fix no-unused-variable tslint rule to include parameters and fix
 issues

---
 packages/react-docs/src/components/documentation.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'packages/react-docs/src/components/documentation.tsx')

diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx
index 2b021f04c..a4e6f4f6e 100644
--- a/packages/react-docs/src/components/documentation.tsx
+++ b/packages/react-docs/src/components/documentation.tsx
@@ -73,7 +73,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
     public componentWillUnmount(): void {
         window.removeEventListener('hashchange', this._onHashChanged.bind(this), false);
     }
-    public componentDidUpdate(prevProps: DocumentationProps, prevState: DocumentationState): void {
+    public componentDidUpdate(prevProps: DocumentationProps, _prevState: DocumentationState): void {
         if (!_.isEqual(prevProps.docAgnosticFormat, this.props.docAgnosticFormat)) {
             const hash = window.location.hash.slice(1);
             sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID);
@@ -364,7 +364,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
             />
         );
     }
-    private _onSidebarHover(event: React.FormEvent<HTMLInputElement>): void {
+    private _onSidebarHover(_event: React.FormEvent<HTMLInputElement>): void {
         this.setState({
             isHoveringSidebar: true,
         });
@@ -374,7 +374,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
             isHoveringSidebar: false,
         });
     }
-    private _onHashChanged(event: any): void {
+    private _onHashChanged(_event: any): void {
         const hash = window.location.hash.slice(1);
         sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID);
     }
-- 
cgit v1.2.3


From 324b1079e7eb29829bf06ff65299acdc58abf308 Mon Sep 17 00:00:00 2001
From: Fabio Berger <me@fabioberger.com>
Date: Mon, 9 Jul 2018 19:05:38 +0200
Subject: Add ability to nest doc ref markdown under specific versions

---
 packages/react-docs/src/components/documentation.tsx | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

(limited to 'packages/react-docs/src/components/documentation.tsx')

diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx
index a4e6f4f6e..7030001e8 100644
--- a/packages/react-docs/src/components/documentation.tsx
+++ b/packages/react-docs/src/components/documentation.tsx
@@ -12,6 +12,7 @@ import {
 import * as _ from 'lodash';
 import CircularProgress from 'material-ui/CircularProgress';
 import * as React from 'react';
+import * as semver from 'semver';
 
 import { DocsInfo } from '../docs_info';
 import {
@@ -180,7 +181,14 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
         return renderedSections;
     }
     private _renderSection(typeDefinitionByName: TypeDefinitionByName, sectionName: string): React.ReactNode {
-        const markdownFileIfExists = this.props.docsInfo.sectionNameToMarkdown[sectionName];
+        const markdownVersions = _.keys(this.props.docsInfo.sectionNameToMarkdownByVersion);
+        // Get version LTE to selectedVersion
+        const eligibleVersions = _.filter(markdownVersions, mdVersion => {
+            return semver.lte(mdVersion, this.props.selectedVersion);
+        });
+        const sortedEligibleVersions = eligibleVersions.sort(semver.rcompare.bind(semver));
+        const closestVersion = sortedEligibleVersions[0];
+        const markdownFileIfExists = this.props.docsInfo.sectionNameToMarkdownByVersion[closestVersion][sectionName];
         if (!_.isUndefined(markdownFileIfExists)) {
             return (
                 <MarkdownSection
-- 
cgit v1.2.3


From 82771ec64a6fc0d2d260ec4bd44391f451585131 Mon Sep 17 00:00:00 2001
From: Fabio Berger <me@fabioberger.com>
Date: Mon, 9 Jul 2018 19:53:54 +0200
Subject: Remove comment and add assertion

---
 packages/react-docs/src/components/documentation.tsx | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

(limited to 'packages/react-docs/src/components/documentation.tsx')

diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx
index 7030001e8..ff33220d2 100644
--- a/packages/react-docs/src/components/documentation.tsx
+++ b/packages/react-docs/src/components/documentation.tsx
@@ -182,10 +182,16 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
     }
     private _renderSection(typeDefinitionByName: TypeDefinitionByName, sectionName: string): React.ReactNode {
         const markdownVersions = _.keys(this.props.docsInfo.sectionNameToMarkdownByVersion);
-        // Get version LTE to selectedVersion
         const eligibleVersions = _.filter(markdownVersions, mdVersion => {
             return semver.lte(mdVersion, this.props.selectedVersion);
         });
+        if (_.isEmpty(eligibleVersions)) {
+            throw new Error(
+                `No eligible markdown sections found for ${this.props.docsInfo.displayName} version ${
+                    this.props.selectedVersion
+                }.`,
+            );
+        }
         const sortedEligibleVersions = eligibleVersions.sort(semver.rcompare.bind(semver));
         const closestVersion = sortedEligibleVersions[0];
         const markdownFileIfExists = this.props.docsInfo.sectionNameToMarkdownByVersion[closestVersion][sectionName];
-- 
cgit v1.2.3

