Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Remaining Developer Section Design Nits #1244

Merged
merged 15 commits into from
Nov 13, 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
13 changes: 3 additions & 10 deletions packages/react-docs/src/components/type.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { colors, constants as sharedConstants, Link, utils as sharedUtils } from '@0x/react-shared';
import { colors, Link, utils as sharedUtils } from '@0x/react-shared';
import { Type as TypeDef, TypeDefinitionByName, TypeDocTypes } from '@0x/types';
import { errorUtils } from '@0x/utils';
import * as _ from 'lodash';
import * as React from 'react';
import { Link as ScrollLink } from 'react-scroll';
import * as ReactTooltip from 'react-tooltip';

import { DocsInfo } from '../docs_info';
Expand Down Expand Up @@ -224,13 +223,7 @@ export const Type: React.SFC<TypeProps> = (props: TypeProps): any => {
{sharedUtils.isUserOnMobile() || props.isInPopover || isExportedClassReference ? (
<span style={{ color: colors.lightBlueA700, cursor: 'pointer' }}>{typeName}</span>
) : (
<ScrollLink
to={typeDefinitionAnchorId}
offset={0}
hashSpy={true}
duration={sharedConstants.DOCS_SCROLL_DURATION_MS}
containerId={sharedConstants.SCROLL_CONTAINER_ID}
>
<Link to={typeDefinitionAnchorId}>
<span
data-tip={true}
data-for={id}
Expand All @@ -252,7 +245,7 @@ export const Type: React.SFC<TypeProps> = (props: TypeProps): any => {
/>
</ReactTooltip>
</span>
</ScrollLink>
</Link>
)}
</span>
);
Expand Down
3 changes: 2 additions & 1 deletion packages/react-docs/src/docs_info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
SectionsMap,
SupportedDocJson,
} from './types';
import { constants } from './utils/constants';

export class DocsInfo {
public id: string;
Expand Down Expand Up @@ -64,7 +65,7 @@ export class DocsInfo {
const docSections = _.keys(this.sections);
_.each(docSections, sectionName => {
const docSection = docAgnosticFormat[sectionName];
if (_.isUndefined(docSection)) {
if (_.isUndefined(docSection) || sectionName === constants.EXTERNAL_EXPORTS_SECTION_NAME) {
return; // no-op
}

Expand Down
18 changes: 3 additions & 15 deletions packages/react-shared/src/components/anchor_title.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
import * as React from 'react';
import { Link as ScrollLink } from 'react-scroll';
import styled from 'styled-components';

import { Link } from '../components/link';
import { HeaderSizes, Styles } from '../types';
import { colors } from '../utils/colors';
import { constants } from '../utils/constants';

const headerSizeToScrollOffset: { [headerSize: string]: number } = {
h2: -20,
h3: 0,
};

export interface AnchorTitleProps {
title: string | React.ReactNode;
Expand Down Expand Up @@ -73,15 +67,9 @@ export class AnchorTitle extends React.Component<AnchorTitleProps, AnchorTitleSt
{this.props.title}
</div>
{!this.props.isDisabled && (
<ScrollLink
to={this.props.id}
hashSpy={true}
offset={headerSizeToScrollOffset[this.props.headerSize]}
duration={constants.DOCS_SCROLL_DURATION_MS}
containerId={constants.SCROLL_CONTAINER_ID}
>
<Link to={this.props.id}>
<AnchorIcon className="zmdi zmdi-link" shouldShowAnchor={this.props.shouldShowAnchor} />
</ScrollLink>
</Link>
)}
</div>
);
Expand Down
24 changes: 24 additions & 0 deletions packages/website/public/images/developers/logo/0x.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions packages/website/public/images/developers/logo/docs.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 0 additions & 24 deletions packages/website/public/images/docs_logo.svg

This file was deleted.

2 changes: 1 addition & 1 deletion packages/website/translations/chinese.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"BUILD_A_RELAYER_DESCRIPTION": "Learn how to build your own 0x relayer from scratch",
"DEVELOP_ON_ETHEREUM": "develop on Ethereum",
"DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn more about building applications ontop of Ethereum",
"ORDER_BASICS": "0x order basics",
"ORDER_BASICS": "Make & take orders",
"ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x",
"USE_NETWORKED_LIQUIDITY": "use networked liquidity",
"USE_NETWORKED_LIQUIDITY_DESCRIPTION": "Access the shared liquidity pool using the Standard Relayer API",
Expand Down
2 changes: 1 addition & 1 deletion packages/website/translations/english.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"BUILD_A_RELAYER_DESCRIPTION": "Learn how to build your own 0x relayer from scratch",
"DEVELOP_ON_ETHEREUM": "develop on Ethereum",
"DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn more about building applications ontop of Ethereum",
"ORDER_BASICS": "0x order basics",
"ORDER_BASICS": "Make & take orders",
"ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x",
"USE_NETWORKED_LIQUIDITY": "use networked liquidity",
"USE_NETWORKED_LIQUIDITY_DESCRIPTION": "Learn how to tap into networked liquidity using the Standard Relayer API",
Expand Down
2 changes: 1 addition & 1 deletion packages/website/translations/korean.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"BUILD_A_RELAYER_DESCRIPTION": "Learn how to build your own 0x relayer from scratch",
"DEVELOP_ON_ETHEREUM": "develop on Ethereum",
"DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn more about building applications ontop of Ethereum",
"ORDER_BASICS": "0x order basics",
"ORDER_BASICS": "Make & take orders",
"ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x",
"USE_NETWORKED_LIQUIDITY": "use networked liquidity",
"USE_NETWORKED_LIQUIDITY_DESCRIPTION": "Learn how to tap into networked liquidity using the Standard Relayer API",
Expand Down
2 changes: 1 addition & 1 deletion packages/website/translations/russian.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"BUILD_A_RELAYER_DESCRIPTION": "Learn how to build your own 0x relayer from scratch",
"DEVELOP_ON_ETHEREUM": "develop on Ethereum",
"DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn more about building applications ontop of Ethereum",
"ORDER_BASICS": "0x order basics",
"ORDER_BASICS": "Make & take orders",
"ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x",
"USE_NETWORKED_LIQUIDITY": "use networked liquidity",
"USE_NETWORKED_LIQUIDITY_DESCRIPTION": "Learn how to tap into networked liquidity using the Standard Relayer API",
Expand Down
Loading