From 11869122b4fe00c834347f9911985d7b2572bc9b Mon Sep 17 00:00:00 2001
From: Fabio Berger <me@fabioberger.com>
Date: Wed, 1 Aug 2018 17:33:28 +0200
Subject: Update React-scroll, getting rid of the need to manually set the url
 hash

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

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

diff --git a/packages/react-docs/src/components/signature.tsx b/packages/react-docs/src/components/signature.tsx
index 77e9cc909..5f28050d2 100644
--- a/packages/react-docs/src/components/signature.tsx
+++ b/packages/react-docs/src/components/signature.tsx
@@ -27,7 +27,7 @@ const defaultProps = {
 };
 
 export const Signature: React.SFC<SignatureProps> = (props: SignatureProps) => {
-    const sectionName = constants.TYPES_SECTION_NAME;
+    const sectionName = props.sectionName;
     const parameters = renderParameters(props.parameters, props.docsInfo, sectionName, props.typeDefinitionByName);
     const paramStringArray: any[] = [];
     // HACK: For now we don't put params on newlines if there are less then 2 of them.
-- 
cgit v1.2.3


From 90ead59d34bf5218cf4e1e5317a4ffeb497da8e1 Mon Sep 17 00:00:00 2001
From: Fabio Berger <me@fabioberger.com>
Date: Thu, 2 Aug 2018 21:09:18 +0200
Subject: Add support for rendering nested IndexSignatures

---
 packages/react-docs/src/components/signature.tsx | 1 -
 1 file changed, 1 deletion(-)

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

diff --git a/packages/react-docs/src/components/signature.tsx b/packages/react-docs/src/components/signature.tsx
index 5f28050d2..d9567c9f6 100644
--- a/packages/react-docs/src/components/signature.tsx
+++ b/packages/react-docs/src/components/signature.tsx
@@ -3,7 +3,6 @@ import * as React from 'react';
 
 import { DocsInfo } from '../docs_info';
 import { Parameter, Type as TypeDef, TypeDefinitionByName, TypeParameter } from '../types';
-import { constants } from '../utils/constants';
 
 import { Type } from './type';
 
-- 
cgit v1.2.3


From cb5d8d75bf03910d1e763eb34907ada296ed3062 Mon Sep 17 00:00:00 2001
From: Fabio Berger <me@fabioberger.com>
Date: Tue, 14 Aug 2018 17:24:48 -0700
Subject: Link class reference types exported in same package to their
 declaration

---
 packages/react-docs/src/components/signature.tsx | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

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

diff --git a/packages/react-docs/src/components/signature.tsx b/packages/react-docs/src/components/signature.tsx
index d9567c9f6..bf9c8be24 100644
--- a/packages/react-docs/src/components/signature.tsx
+++ b/packages/react-docs/src/components/signature.tsx
@@ -17,6 +17,7 @@ export interface SignatureProps {
     typeParameter?: TypeParameter;
     callPath?: string;
     docsInfo: DocsInfo;
+    isInPopover: boolean;
 }
 
 const defaultProps = {
@@ -27,7 +28,13 @@ const defaultProps = {
 
 export const Signature: React.SFC<SignatureProps> = (props: SignatureProps) => {
     const sectionName = props.sectionName;
-    const parameters = renderParameters(props.parameters, props.docsInfo, sectionName, props.typeDefinitionByName);
+    const parameters = renderParameters(
+        props.parameters,
+        props.docsInfo,
+        sectionName,
+        props.isInPopover,
+        props.typeDefinitionByName,
+    );
     const paramStringArray: any[] = [];
     // HACK: For now we don't put params on newlines if there are less then 2 of them.
     // Ideally we would check the character length of the resulting method signature and
@@ -57,7 +64,13 @@ export const Signature: React.SFC<SignatureProps> = (props: SignatureProps) => {
     const methodName = props.shouldHideMethodName ? '' : props.name;
     const typeParameterIfExists = _.isUndefined(props.typeParameter)
         ? undefined
-        : renderTypeParameter(props.typeParameter, props.docsInfo, sectionName, props.typeDefinitionByName);
+        : renderTypeParameter(
+              props.typeParameter,
+              props.docsInfo,
+              sectionName,
+              props.isInPopover,
+              props.typeDefinitionByName,
+          );
     return (
         <span style={{ fontSize: 15 }}>
             {props.callPath}
@@ -72,6 +85,7 @@ export const Signature: React.SFC<SignatureProps> = (props: SignatureProps) => {
                         sectionName={sectionName}
                         typeDefinitionByName={props.typeDefinitionByName}
                         docsInfo={props.docsInfo}
+                        isInPopover={props.isInPopover}
                     />
                 </span>
             )}
@@ -85,6 +99,7 @@ function renderParameters(
     parameters: Parameter[],
     docsInfo: DocsInfo,
     sectionName: string,
+    isInPopover: boolean,
     typeDefinitionByName?: TypeDefinitionByName,
 ): React.ReactNode[] {
     const params = _.map(parameters, (p: Parameter) => {
@@ -96,6 +111,7 @@ function renderParameters(
                 sectionName={sectionName}
                 typeDefinitionByName={typeDefinitionByName}
                 docsInfo={docsInfo}
+                isInPopover={isInPopover}
             />
         );
         return (
@@ -113,6 +129,7 @@ function renderTypeParameter(
     typeParameter: TypeParameter,
     docsInfo: DocsInfo,
     sectionName: string,
+    isInPopover: boolean,
     typeDefinitionByName?: TypeDefinitionByName,
 ): React.ReactNode {
     const typeParam = (
@@ -123,6 +140,7 @@ function renderTypeParameter(
                 sectionName={sectionName}
                 typeDefinitionByName={typeDefinitionByName}
                 docsInfo={docsInfo}
+                isInPopover={isInPopover}
             />
             {`>`}
         </span>
-- 
cgit v1.2.3


From f429032eef007bafaed108171631f4b3d3233f6b Mon Sep 17 00:00:00 2001
From: "F. Eugene Aumson" <gene@aumson.org>
Date: Thu, 30 Aug 2018 08:22:44 -0400
Subject: move shared doc types from react-docs to @0x/types

---
 packages/react-docs/src/components/signature.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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

diff --git a/packages/react-docs/src/components/signature.tsx b/packages/react-docs/src/components/signature.tsx
index bf9c8be24..9eb8a7d86 100644
--- a/packages/react-docs/src/components/signature.tsx
+++ b/packages/react-docs/src/components/signature.tsx
@@ -1,8 +1,9 @@
 import * as _ from 'lodash';
 import * as React from 'react';
 
+import { Parameter, Type as TypeDef, TypeDefinitionByName, TypeParameter } from '@0xproject/types';
+
 import { DocsInfo } from '../docs_info';
-import { Parameter, Type as TypeDef, TypeDefinitionByName, TypeParameter } from '../types';
 
 import { Type } from './type';
 
-- 
cgit v1.2.3


From b40861747b73bb9a0826853751b7caa5cbf085ae Mon Sep 17 00:00:00 2001
From: Fabio Berger <me@fabioberger.com>
Date: Tue, 25 Sep 2018 17:34:22 +0100
Subject: Properly render function generic types that don't extend another type

---
 packages/react-docs/src/components/signature.tsx | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

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

diff --git a/packages/react-docs/src/components/signature.tsx b/packages/react-docs/src/components/signature.tsx
index bf9c8be24..4f10f4665 100644
--- a/packages/react-docs/src/components/signature.tsx
+++ b/packages/react-docs/src/components/signature.tsx
@@ -134,14 +134,19 @@ function renderTypeParameter(
 ): React.ReactNode {
     const typeParam = (
         <span>
-            {`<${typeParameter.name} extends `}
-            <Type
-                type={typeParameter.type}
-                sectionName={sectionName}
-                typeDefinitionByName={typeDefinitionByName}
-                docsInfo={docsInfo}
-                isInPopover={isInPopover}
-            />
+            {`<${typeParameter.name}`}
+            {!_.isUndefined(typeParameter.type) && (
+                <span>
+                    {' extends '}
+                    <Type
+                        type={typeParameter.type}
+                        sectionName={sectionName}
+                        typeDefinitionByName={typeDefinitionByName}
+                        docsInfo={docsInfo}
+                        isInPopover={isInPopover}
+                    />
+                </span>
+            )}
             {`>`}
         </span>
     );
-- 
cgit v1.2.3


From 5347bf587fcdcfa5c08b016f3626462d67c43340 Mon Sep 17 00:00:00 2001
From: Fabio Berger <me@fabioberger.com>
Date: Thu, 27 Sep 2018 18:55:01 +0100
Subject: Render fallback functions better

---
 packages/react-docs/src/components/signature.tsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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

diff --git a/packages/react-docs/src/components/signature.tsx b/packages/react-docs/src/components/signature.tsx
index a690a1f03..aa174042c 100644
--- a/packages/react-docs/src/components/signature.tsx
+++ b/packages/react-docs/src/components/signature.tsx
@@ -19,12 +19,14 @@ export interface SignatureProps {
     callPath?: string;
     docsInfo: DocsInfo;
     isInPopover: boolean;
+    isFallback?: boolean;
 }
 
 const defaultProps = {
     shouldHideMethodName: false,
     shouldUseArrowSyntax: false,
     callPath: '',
+    isFallback: false,
 };
 
 export const Signature: React.SFC<SignatureProps> = (props: SignatureProps) => {
@@ -75,7 +77,7 @@ export const Signature: React.SFC<SignatureProps> = (props: SignatureProps) => {
     return (
         <span style={{ fontSize: 15 }}>
             {props.callPath}
-            {methodName}
+            {props.isFallback ? '' : methodName}
             {typeParameterIfExists}({hasMoreThenTwoParams && <br />}
             {paramStringArray})
             {props.returnType && (
-- 
cgit v1.2.3


From a6672e0190573c65f2c36e303d49f0389f5a9a26 Mon Sep 17 00:00:00 2001
From: Fabio Berger <me@fabioberger.com>
Date: Thu, 27 Sep 2018 19:43:10 +0100
Subject: Don't render colon for auto-generated getters

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

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

diff --git a/packages/react-docs/src/components/signature.tsx b/packages/react-docs/src/components/signature.tsx
index aa174042c..266bfe3dd 100644
--- a/packages/react-docs/src/components/signature.tsx
+++ b/packages/react-docs/src/components/signature.tsx
@@ -118,9 +118,14 @@ function renderParameters(
             />
         );
         return (
-            <span key={`param-${p.type}-${p.name}`}>
+            <span key={`param-${JSON.stringify(p.type)}-${name}-${i}`}>
+                {!_.isEmpty(p.name) && (
+                    <span>
                 {p.name}
-                {isOptional && '?'}: {type}
+                        {isOptional && '?'}:{' '}
+                    </span>
+                )}
+                {type}
                 {hasDefaultValue && ` = ${p.defaultValue}`}
             </span>
         );
-- 
cgit v1.2.3


From ac878d8fdbace787c7ffbc0fe68dd404d72452e3 Mon Sep 17 00:00:00 2001
From: Fabio Berger <me@fabioberger.com>
Date: Thu, 27 Sep 2018 23:00:01 +0100
Subject: Improve keys

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

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

diff --git a/packages/react-docs/src/components/signature.tsx b/packages/react-docs/src/components/signature.tsx
index 266bfe3dd..1f3dd0ee8 100644
--- a/packages/react-docs/src/components/signature.tsx
+++ b/packages/react-docs/src/components/signature.tsx
@@ -36,6 +36,7 @@ export const Signature: React.SFC<SignatureProps> = (props: SignatureProps) => {
         props.docsInfo,
         sectionName,
         props.isInPopover,
+        props.name,
         props.typeDefinitionByName,
     );
     const paramStringArray: any[] = [];
@@ -103,9 +104,10 @@ function renderParameters(
     docsInfo: DocsInfo,
     sectionName: string,
     isInPopover: boolean,
+    name: string,
     typeDefinitionByName?: TypeDefinitionByName,
 ): React.ReactNode[] {
-    const params = _.map(parameters, (p: Parameter) => {
+    const params = _.map(parameters, (p: Parameter, i: number) => {
         const isOptional = p.isOptional;
         const hasDefaultValue = !_.isUndefined(p.defaultValue);
         const type = (
@@ -121,7 +123,7 @@ function renderParameters(
             <span key={`param-${JSON.stringify(p.type)}-${name}-${i}`}>
                 {!_.isEmpty(p.name) && (
                     <span>
-                {p.name}
+                        {p.name}
                         {isOptional && '?'}:{' '}
                     </span>
                 )}
-- 
cgit v1.2.3

