Skip to content

Commit

Permalink
First draft of Overview Page
Browse files Browse the repository at this point in the history
  • Loading branch information
icaraps committed Jul 3, 2020
0 parents commit a1358f5
Show file tree
Hide file tree
Showing 32 changed files with 14,723 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# gatsby files
.cache
public
node_modules
package.lock

yarn-error.log
.editorconfig
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ⚠ Under Construction ⚠

`yarn && npm run dev`
23 changes: 23 additions & 0 deletions example/gatsby-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
siteMetadata: {
header: [
{
title: 'Adobe Analytics',
url: '/'
},
{
title: 'Guides',
url: '/guides/'
},
{
title: 'API Reference',
url: '/api/'
},
{
title: 'Support',
url: '/support/'
}
]
},
plugins: [`@adobe/gatsby-theme-spectrum`],
};
16 changes: 16 additions & 0 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "example",
"version": "1.0.0",
"dependencies": {
"gatsby": "^2.23.11",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"@adobe/gatsby-theme-spectrum": "*"
},
"scripts": {
"develop": "gatsby develop",
"build": "gatsby build",
"serve": "gatsby serve",
"clean": "gatsby clean"
}
}
1 change: 1 addition & 0 deletions example/src/pages/api/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# TODO API Reference
1 change: 1 addition & 0 deletions example/src/pages/guides/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# TODO Guides
93 changes: 93 additions & 0 deletions example/src/pages/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
title: Overview - Adobe Analytics
description: This is an overview page of Adobe Analytics
hero:
- heading: Adobe Analytics
text: Adobe Product API offers limitless ways to integrate your most important customer data into key business processes. Adobe Product API offer limitless ways.
background: rgb(64, 39, 138)
illustration: /illustration.png
resources:
- text: Adobe Analytics Product Docs
link: https://adobe.io
- text: Adobe Analytics Github Repo
link: https://adobe.io
contributors:
- icaraps
- macdonst
- simonwex
- schaulinsan
- duynguyen
---

## Overview

This documentation provides instructions for Adobe Analytics 2.0 APIs. For working with Analytics 1.4 APIs, see [Analytics 1.4 API Documentation](https://adobe.io).

The Adobe Analytics APIs are a collection of APIs that power Adobe Analytics products like Analysis Workspace.
The APIs allow for the creation of data rich user interfaces that you can use to manipulate and integrate data.
You can also create reports to explore, get insights, or answer important questions about your data.

## Discover

### Get Started

<ContentBlock>
[Quickstart Guide](https://adobe.io)

Get started with the Adobe Analytics APIs.
</ContentBlock>

### Guides

<Flex gap="size-200" wrap alignItems="bottom">
<ContentBlock>
[Calculated Metrics API](https://adobe.io)

Returns information on the user's company that is necessary for making other Adobe Analytics API calls.
</ContentBlock>

<ContentBlock>
[Segments API](https://adobe.io)

Provides configuration guidance and best practices for the /segments endpoint.
</ContentBlock>

<ContentBlock>
[Reporting Guide API](https://adobe.io)

Provides configuration guidance and best practices for the /reports endpoint.
</ContentBlock>

<ContentBlock>

[Migrating from 1.4 to 2.0](https://adobe.io)

For help migrating from 1.3/1.4 versions of the Analytics API to the newer and more capable /reports API.
</ContentBlock>
</Flex>

### API References

<ContentBlock>

[Try the API](https://adobe.io)

Try the Analytics API with Swagger UI. Explore, make calls, with full endpoint descriptions.
</ContentBlock>

## Contributing

We encourage you to participate in our open documentation initiative, if you have suggestions, corrections, additions
or deletions for this documentation, check out the source from [this github repo](https://adobe.io), and submit a pull
request with your contribution. For more information, refer to the [contributing page](https://adobe.io).

## API Requests & Rate Limits

The timeout for API requests through adobe.io is currently *60 seconds*.

The default rate limit for an Adobe Analytics Company is *120 requests per minute*. (The limit is enforced as *12 requests every 6 seconds*).
When rate limiting is being enforced you will get `429` HTTP response codes with the following response body: `{"error_code":"429050","message":"Too many requests"}`
1 change: 1 addition & 0 deletions example/src/pages/support/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# TODO Support
Binary file added example/static/illustration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"private": true,
"name": "gatsby-theme-spectrum",
"version": "1.0.0",
"workspaces": ["example", "packages/*"],
"scripts": {
"dev": "yarn workspace example develop",
"build": "yarn workspace example build",
"serve": "yarn workspace example serve",
"clean": "yarn workspace example clean"
}
}
30 changes: 30 additions & 0 deletions packages/gatsby-theme-spectrum/gatsby-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = {
plugins: [
`gatsby-plugin-catch-links`,
`gatsby-plugin-react-helmet-async`,
`gatsby-plugin-emotion`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `pages`,
path: `${__dirname}/src/pages`,
}
},
{
resolve: `gatsby-plugin-mdx`,
options: {
extensions: [`.mdx`, `.md`],
defaultLayouts: {
default: require.resolve(`./src/components/Layout.js`)
},
rehypePlugins: [
require(`rehype-slug`)
],
remarkPlugins: [
require(`remark-external-links`),
require(`remark-docz`)
]
}
}
]
}
8 changes: 8 additions & 0 deletions packages/gatsby-theme-spectrum/gatsby-node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// https://github.com/gatsbyjs/gatsby/issues/24815#issuecomment-645512683
exports.onCreateWebpackConfig = ({ actions }) => {
actions.setWebpackConfig({
node: {
fs: 'empty'
}
});
};
1 change: 1 addition & 0 deletions packages/gatsby-theme-spectrum/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// noop
45 changes: 45 additions & 0 deletions packages/gatsby-theme-spectrum/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "@adobe/gatsby-theme-spectrum",
"version": "1.0.0",
"main": "index.js",
"devDependencies": {
"gatsby": "^2.23.11",
"react": "^16.13.1",
"react-dom": "^16.13.1"
},
"peerDependencies": {
"gatsby": "^2.23.11",
"react": "^16.13.1",
"react-dom": "^16.13.1"
},
"dependencies": {
"@emotion/core": "^10.0.28",
"@mdx-js/mdx": "^1.6.6",
"@mdx-js/react": "^1.6.6",
"@mdx-js/runtime": "^1.6.6",
"@react-spectrum/button": "^3.0.0",
"@react-spectrum/buttongroup": "^3.0.0",
"@react-spectrum/divider": "^3.0.0",
"@react-spectrum/layout": "^3.0.0",
"@react-spectrum/link": "^3.0.0",
"@react-spectrum/picker": "^3.0.0",
"@react-spectrum/provider": "^3.0.0",
"@react-spectrum/theme-default": "^3.0.0",
"@react-spectrum/view": "^3.0.0",
"@spectrum-css/sidenav": "^3.0.0-beta.2",
"@spectrum-css/tabs": "^3.0.0-beta.3",
"@spectrum-css/typography": "^2.1.3",
"@spectrum-css/well": "^3.0.0-beta.2",
"@spectrum-icons/workflow": "^3.0.0",
"gatsby-plugin-catch-links": "^2.3.7",
"gatsby-plugin-emotion": "^4.3.6",
"gatsby-plugin-mdx": "^1.2.19",
"gatsby-plugin-react-helmet-async": "^1.0.17-0",
"gatsby-source-filesystem": "^2.3.14",
"prop-types": "^15.7.2",
"react-helmet-async": "^1.0.6",
"rehype-slug": "^3.0.0",
"remark-docz": "^2.1.0",
"remark-external-links": "^6.1.0"
}
}
6 changes: 6 additions & 0 deletions packages/gatsby-theme-spectrum/src/components/Code.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';
import '@spectrum-css/typography/dist/index-vars.css';

export default ({children, ...props}) => (
<code {...props} className="spectrum-Code4">{children}</code>
)
20 changes: 20 additions & 0 deletions packages/gatsby-theme-spectrum/src/components/ContentBlock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from 'react';
import {css} from '@emotion/core';
// https://github.com/mdx-js/mdx/issues/628
import MDX from '@mdx-js/runtime';

export default ({children}) => {
return (
<div
css={css`
display: inline-block;
max-width: ${3 * 1120 / 12}px;
& a {
display: block;
margin-bottom: 8px;
}
`}>
{children && <MDX>{children}</MDX>}
</div>
);
}
60 changes: 60 additions & 0 deletions packages/gatsby-theme-spectrum/src/components/Contributors.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import React from 'react';
import {css} from '@emotion/core';
import PropTypes from 'prop-types';
import {Flex} from '@react-spectrum/layout';

const Contributors = ({href = '#', contributors = [], date}) => (
<a
href={href}
target='_blank'
rel='noopener noreferrer nofollow'
css={css`
text-decoration: none;
color: inherit;
`}>
<Flex alignItems="center">
<div css={css`
display: inline-flex;
padding-left: 16px;
`}>
{contributors.slice(0, 5).map((contributor, index) => (
<span
key={index}
css={css`
margin-left: -16px;
position: relative;
border: 3px solid white;
width: 32px;
height: 32px;
border-radius: 50%;
background: white;
`}>
<img
alt={contributor}
src={`https://github.com/${contributor}.png`}
css={css`
width: 32px;
height: 32px;
border-radius: 50%;
`}
/>
</span>
))}
</div>
<span
css={css`
padding-left: 16px;
`}>
{date && `Last updated ${date}`}
</span>
</Flex>
</a>
);

Contributors.propTypes = {
href: '',
contributors: PropTypes.array,
date: PropTypes.string
};

export default Contributors;
24 changes: 24 additions & 0 deletions packages/gatsby-theme-spectrum/src/components/Feedback.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from 'react';
import {css} from '@emotion/core';
import PropTypes from 'prop-types';
import {Flex} from '@react-spectrum/layout';
import {Button} from '@react-spectrum/button';
import {ButtonGroup} from '@react-spectrum/buttongroup';
import Contributors from "./Contributors";

const Feedback = ({onYes, onNo}) => (
<Flex alignItems="center">
<span css={css`padding-right: 16px;`}>Was this helpful ?</span>
<ButtonGroup>
<Button variant="primary" onPress={() => {onYes && onYes()}}>Yes</Button>
<Button variant="primary" onPress={() => {onNo && onNo()}}>No</Button>
</ButtonGroup>
</Flex>
);

Contributors.propTypes = {
onYes: PropTypes.func,
onNo: PropTypes.func
};

export default Feedback;
Loading

0 comments on commit a1358f5

Please sign in to comment.