Skip to content
This repository was archived by the owner on Aug 18, 2025. It is now read-only.
Merged

V2 #383

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
1ec01d4
homepage wip
winkerVSbecks Aug 12, 2022
a52718a
integrations grid
winkerVSbecks Aug 12, 2022
5230ec6
develop section
winkerVSbecks Aug 12, 2022
3a080e5
Test and Document sections
winkerVSbecks Aug 12, 2022
932550c
share section
winkerVSbecks Aug 13, 2022
764c735
Automate section
winkerVSbecks Aug 13, 2022
d9312c3
SocialValidation section
winkerVSbecks Aug 14, 2022
0d0ec14
community
winkerVSbecks Aug 14, 2022
516d27c
Publish animation
winkerVSbecks Aug 15, 2022
9bc9fe4
UI Review animation
winkerVSbecks Aug 15, 2022
0992f51
MergeAndShip animation
winkerVSbecks Aug 16, 2022
cbf08e3
UITests animation
winkerVSbecks Aug 16, 2022
4feb80e
SocialValidation tweaks
winkerVSbecks Aug 16, 2022
0d3993a
remove checklist animation from UI tests animation
winkerVSbecks Aug 16, 2022
3b70df8
fix title for document section
winkerVSbecks Aug 17, 2022
f5db8dc
misc fixes
winkerVSbecks Aug 17, 2022
8290dc3
more images
winkerVSbecks Aug 19, 2022
26f49f8
add header & footer to layout
winkerVSbecks Aug 19, 2022
10cdb4e
wire up graphCMS
winkerVSbecks Aug 19, 2022
0bdad6d
hard code GRAPHCMS_ENDPOINT
winkerVSbecks Aug 19, 2022
0e5fc0a
optimize and update images
winkerVSbecks Aug 20, 2022
8478d88
remove use-cases screen
winkerVSbecks Aug 20, 2022
47ce630
new animation for community section and add links to videos
winkerVSbecks Aug 20, 2022
aa3209f
new images for embed carousel
winkerVSbecks Aug 21, 2022
e224e32
embed integrations carousel
winkerVSbecks Aug 21, 2022
2358d17
EmbedIntegrationsCarousel wip
winkerVSbecks Aug 21, 2022
e118aad
source marketing data
winkerVSbecks Aug 22, 2022
7fa7895
disable gatsby build on circleci
winkerVSbecks Aug 22, 2022
e23af8e
re-enable gatsby build on circleci
winkerVSbecks Aug 22, 2022
684d670
remove duplicate onCreateWebpackConfig
winkerVSbecks Aug 22, 2022
4e45d30
source npm downloads from dx-fn
winkerVSbecks Aug 22, 2022
5634ce9
Import examples
winkerVSbecks Aug 23, 2022
8306b49
TestIntegrations and EmbedIntegrations sizing
winkerVSbecks Aug 23, 2022
7070ec0
Share scroll triggered animation
winkerVSbecks Aug 23, 2022
9ed1ba7
share publish animation
winkerVSbecks Aug 24, 2022
146a98c
animation adjustments
winkerVSbecks Aug 24, 2022
becb6b4
Develop animation wip
winkerVSbecks Aug 25, 2022
60634dd
disable scroll animation for the share section on mobile
winkerVSbecks Aug 25, 2022
3fa11ca
fix useMediaquery hook for SSR
winkerVSbecks Aug 25, 2022
f1bab96
fix npmDownloads
winkerVSbecks Aug 25, 2022
8add13b
StorybookDemo wip
winkerVSbecks Aug 26, 2022
1561711
develop wip
winkerVSbecks Aug 26, 2022
2786060
inline svg version of the scroll animation
winkerVSbecks Aug 27, 2022
6804346
layered imgs version of the scroll animation
winkerVSbecks Aug 27, 2022
12d4108
scroll anim wip
winkerVSbecks Aug 27, 2022
eb5670c
scroll anim step 4 wip
winkerVSbecks Aug 27, 2022
e01d964
scroll animation
winkerVSbecks Aug 28, 2022
29f6eb2
scroll anim adjustments for mobile
winkerVSbecks Aug 28, 2022
98acb3e
scrim positioning
winkerVSbecks Aug 28, 2022
18780e7
addons panel fonts
winkerVSbecks Aug 28, 2022
b6eb088
Hero animation wip
winkerVSbecks Aug 29, 2022
44ec99d
Hero animation
winkerVSbecks Aug 29, 2022
adc58eb
loop and reset for hero animation
winkerVSbecks Aug 30, 2022
a0b49db
hero animation
winkerVSbecks Aug 30, 2022
dc3b0d5
hero anim tweaks
winkerVSbecks Aug 30, 2022
8cbb199
conector animation for embeds
winkerVSbecks Aug 31, 2022
3db5efa
fix page layout stories
winkerVSbecks Aug 31, 2022
c14eb38
various little tweaks
winkerVSbecks Sep 1, 2022
bc53422
animate opacity instead of presence
winkerVSbecks Sep 1, 2022
f62ff50
add @docsearch/css
winkerVSbecks Sep 1, 2022
2fe05ff
update images for hero animation
winkerVSbecks Sep 1, 2022
4039314
update images for scroll animation
winkerVSbecks Sep 1, 2022
6e20cac
Stickynav
winkerVSbecks Sep 2, 2022
93f730d
font-family for svg images
winkerVSbecks Sep 2, 2022
2851e12
add section ids and updte links context
winkerVSbecks Sep 3, 2022
c373f16
remove Testimonial (unused)
winkerVSbecks Sep 3, 2022
4d7f745
HeroDemo sizing on mobile
winkerVSbecks Sep 3, 2022
78422bf
SocialProof responsive sizing
winkerVSbecks Sep 3, 2022
9adcbbe
Delete old header and footer
winkerVSbecks Sep 3, 2022
1207c94
fetch star count from dx data fn
winkerVSbecks Sep 4, 2022
0745293
feed version and framework to nav
winkerVSbecks Sep 5, 2022
07ffdb1
Wire up homepage links
winkerVSbecks Sep 6, 2022
a6dd8ee
fix import stories carousel
winkerVSbecks Sep 6, 2022
54a5221
docs layout wip
winkerVSbecks Sep 6, 2022
86a8871
update Docs layout
winkerVSbecks Sep 6, 2022
e48b3cb
Update community layout
winkerVSbecks Sep 6, 2022
c35b02b
Update changelog layout
winkerVSbecks Sep 6, 2022
3b4af38
get latest post from dx fn and rename scren stories
winkerVSbecks Sep 6, 2022
2bd216d
Fix styling issues on AddonItemDetail screen and add update addon scr…
winkerVSbecks Sep 7, 2022
5e6a5b2
refactor logic to add framework suffix to intro page only
winkerVSbecks Sep 7, 2022
f88169f
404 page puzzle pieces animation
winkerVSbecks Sep 7, 2022
9cdb984
remove react-github-button
winkerVSbecks Sep 7, 2022
19f09e0
404 page
winkerVSbecks Sep 7, 2022
7daff99
clean up z-indeces
winkerVSbecks Sep 7, 2022
e9ad2cf
fix jasmine snippet
winkerVSbecks Sep 7, 2022
2d86141
fix broken CommunityHero story
winkerVSbecks Sep 8, 2022
1890fd6
fix PageLayout stories
winkerVSbecks Sep 8, 2022
d61e405
fix npmDownloadCount story
winkerVSbecks Sep 8, 2022
9c4a097
play functions for FrameworkSelector and VersionSelector
winkerVSbecks Sep 8, 2022
548e017
add links to storybooks and little tweaks
winkerVSbecks Sep 8, 2022
3287ee2
use NotFoundScreen from components-marketing
winkerVSbecks Sep 9, 2022
d171ef8
clean up svgs, order of contributor images and remove ui review anima…
winkerVSbecks Sep 9, 2022
416414a
QA fixes
winkerVSbecks Sep 9, 2022
404afa9
Sticky nav logic and mark navitem as active
winkerVSbecks Sep 10, 2022
5bd7a2c
jump to top of page
winkerVSbecks Sep 10, 2022
14960ea
tweak scroll anim
winkerVSbecks Sep 10, 2022
2b11fdf
tweaks
winkerVSbecks Sep 11, 2022
a4693fb
integrations grid sizing
winkerVSbecks Sep 11, 2022
6078e5e
fix embed connector animation
winkerVSbecks Sep 11, 2022
5cdba89
tweaks
winkerVSbecks Sep 12, 2022
6058635
fetch more data from dx-fns
winkerVSbecks Sep 12, 2022
e788ec9
fix linting error
winkerVSbecks Sep 12, 2022
d66d811
add future prerelease label
winkerVSbecks Sep 12, 2022
8d28e26
tweaks
winkerVSbecks Sep 13, 2022
fe86657
update @storybook/themeing to fix multiple emotion issue
winkerVSbecks Sep 13, 2022
6a99b35
fix DocsLayout stories
winkerVSbecks Sep 13, 2022
e0872ab
update links
winkerVSbecks Sep 13, 2022
dd90c40
Scroll animation for share section
winkerVSbecks Sep 13, 2022
f42062b
fix linting errors
winkerVSbecks Sep 13, 2022
c146e3b
fix formatting for code snippets
winkerVSbecks Sep 13, 2022
e51a3ff
fix mobile layout
winkerVSbecks Sep 13, 2022
2895aa7
optimize images and tweak share scroll animation
winkerVSbecks Sep 13, 2022
d53f3b2
give scroll demo more space
winkerVSbecks Sep 13, 2022
9d70d2f
fix linting issue
winkerVSbecks Sep 13, 2022
e784476
fix mobile layout
winkerVSbecks Sep 13, 2022
baf9fa0
Debounce resize handler
winkerVSbecks Sep 13, 2022
75e2c45
fix herodemo on ios 16
winkerVSbecks Sep 13, 2022
e0a955d
Tweak homepage spacing for multiple viewports
Sep 13, 2022
fe8e401
Merge branch 'v2' of https://github.com/storybookjs/frontpage into pr…
Sep 13, 2022
ebf95f8
fix storybook frame bg color leak
winkerVSbecks Sep 13, 2022
e5f70f4
scroll anim tweaks
winkerVSbecks Sep 14, 2022
9602948
animation tweaks
winkerVSbecks Sep 14, 2022
368983d
More spacing refinement
Sep 14, 2022
1fff349
More style refinements and tweaks
Sep 14, 2022
d055c9b
Minor copy edits and tweaks
Sep 14, 2022
773d771
Tweak grid one last time
Sep 14, 2022
46299e8
Update `/docs/<?framework>` redirect
kylegach Sep 14, 2022
3dce465
Merge pull request #386 from storybookjs/update-docs-intro-redirect
winkerVSbecks Sep 14, 2022
f822f4a
only animate community section when in view
winkerVSbecks Sep 14, 2022
2bca7f4
upgrade components marketing
winkerVSbecks Sep 14, 2022
2ebf656
mobile sticky nav trigger height
winkerVSbecks Sep 14, 2022
7a50938
scroll animation position on mobile
winkerVSbecks Sep 14, 2022
30280ec
tweak
winkerVSbecks Sep 14, 2022
c335dba
fix linting error
winkerVSbecks Sep 14, 2022
5d5a51e
remove debug outline
winkerVSbecks Sep 14, 2022
044ec5a
swap version and framework selector order
winkerVSbecks Sep 14, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ src/generated/versions
/functions

# Local Netlify folder
.netlify/
.netlify/
.env
11 changes: 8 additions & 3 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ module.exports = {
webpack: async (config) => {
config.module.rules[0].exclude = [/node_modules\/(?!(gatsby)\/)/];

config.module.rules[0].use[0].options.plugins.push(
require.resolve('babel-plugin-remove-graphql-queries')
);
// use babel-plugin-remove-graphql-queries to remove static queries from components when rendering in storybook
config.module.rules[0].use[0].options.plugins.push([
require.resolve('babel-plugin-remove-graphql-queries'),
{
stage: config.mode === `development` ? 'develop-html' : 'build-html',
staticQueryDir: 'page-data/sq/d',
},
]);

// TODO: Figure out why Gatsby is throwing this error:
// 'The result of this StaticQuery could not be fetched' & remove this alias.
Expand Down
49 changes: 49 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,55 @@ export const decorators = [
),
];

export const parameters = {
backgrounds: {
default: 'light',
values: [
{ name: 'light', value: '#fff' },
{ name: 'dark', value: '#171C23' },
],
},
viewport: {
viewports: {
smallMobile: {
name: 'Mobile (Small)',
styles: {
width: '320px',
height: '100%',
},
},
mobile: {
name: 'Mobile',
styles: {
width: '440px',
height: '100%',
},
},
tablet: {
name: 'Tablet',
styles: {
width: '600px',
height: '100%',
},
},
desktop: {
name: 'Desktop',
styles: {
width: '900px',
height: '100%',
},
},
desktopXL: {
name: 'DesktopXL',
styles: {
width: '1200px',
height: '100%',
},
},
},
},
};

// Gatsby's Link overrides:
// Gatsby Link calls the `enqueue` & `hovering` methods on the global variable ___loader.
// This global object isn't set in storybook context, requiring you to override it to empty functions (no-op),
Expand Down
11 changes: 7 additions & 4 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,17 @@ module.exports = {
fieldName: `addons`,
url: `https://boring-heisenberg-43a6ed.netlify.app/`,
typeName: `ADDON`,
// refetchInterval: 60,
},
},
{
resolve: 'gatsby-source-ghost',
resolve: 'gatsby-source-graphql',
options: {
apiUrl: 'https://storybookblog.ghost.io',
contentApiKey: process.env.GHOST_STORYBOOK_API_KEY,
fieldName: `storybookProjects`,
url: `https://api-us-west-2.hygraph.com/v2/ckyko33ox031l01xo8a944g1b/master`,
typeName: `STORYBOOK_PROJECTS`,
headers: {
Authorization: `Bearer ${process.env.GRAPHCMS_PAT}`,
},
},
},
'gatsby-transformer-sharp',
Expand Down
28 changes: 15 additions & 13 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ const buildPathWithFramework = require('./src/util/build-path-with-framework');
const createAddonsPages = require('./src/util/create-addons-pages');
const getReleaseBranchUrl = require('./src/util/get-release-branch-url');
const { versionString, latestVersionString, isLatest } = require('./src/util/version-data');
const sourceDXData = require('./src/util/source-dx-data');
const { versions } = require('./src/util/versions');

const docsTocWithPaths = addStateToToc(docsToc);

const nextVersionString = versions.preRelease[0].string;

let frameworks;
let firstDocsPageSlug;
const FIRST_DOCS_PAGE_SLUG = '/docs/get-started/introduction';

exports.onCreateWebpackConfig = ({ actions }) => {
actions.setWebpackConfig({
Expand All @@ -29,6 +30,10 @@ exports.onCreateWebpackConfig = ({ actions }) => {
});
};

exports.sourceNodes = async ({ actions, createNodeId, createContentDigest }) => {
await sourceDXData({ actions, createNodeId, createContentDigest });
};

exports.onCreateNode = ({ actions, getNode, node }) => {
const { createNodeField } = actions;

Expand Down Expand Up @@ -187,7 +192,7 @@ exports.createPages = ({ actions, graphql }) => {
nextTocItem.type === 'bullet-link' && {
nextTocItem,
}),
isFirstTocItem: docsPagesSlugs.length === 0,
isIntroPage: slug === FIRST_DOCS_PAGE_SLUG,
},
});
});
Expand All @@ -206,7 +211,6 @@ exports.createPages = ({ actions, graphql }) => {
};

createDocsPages(docsTocWithPaths);
[firstDocsPageSlug] = docsPagesSlugs;
}
)
.then(() => {
Expand Down Expand Up @@ -267,16 +271,14 @@ function updateRedirectsFile() {
const versionBranch = isLatestLocal ? '' : getReleaseBranchUrl(versionStringLocal);
const redirectCode = isLatestLocal ? 301 : 200;

if (firstDocsPageSlug) {
acc.push(
// prettier-ignore
`/docs${versionSlug} ${versionBranch}${buildPathWithFramework(firstDocsPageSlug, frameworks[0], versionStringLocal)} ${redirectCode}`
);
frameworks.forEach((f) =>
// prettier-ignore
acc.push(`/docs${versionSlug}/${f} ${versionBranch}${buildPathWithFramework(firstDocsPageSlug, f, versionStringLocal)} ${redirectCode}`)
);
}
acc.push(
// prettier-ignore
`/docs${versionSlug} ${versionBranch}${buildPathWithFramework(FIRST_DOCS_PAGE_SLUG, frameworks[0], versionStringLocal)} ${redirectCode}`
);
frameworks.forEach((f) =>
// prettier-ignore
acc.push(`/docs${versionSlug}/${f} ${versionBranch}${buildPathWithFramework(FIRST_DOCS_PAGE_SLUG, f, versionStringLocal)} ${redirectCode}`)
);

if (!isLatestLocal) {
acc.push(`/docs/${string}/* ${versionBranch}/docs/${versionStringLocal}/:splat 200`);
Expand Down
22 changes: 12 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,21 @@
"sharp": "^0.29.0"
},
"dependencies": {
"@docsearch/css": "^3.0.0",
"@docsearch/css": "^3.2.1",
"@docsearch/react": "^3.0.0",
"@emotion/server": "^11.4.0",
"@google-cloud/bigquery": "^5.2.0",
"@mdx-js/mdx": "^1.6.16",
"@mdx-js/react": "^1.6.16",
"@storybook/api": "^6.5.8",
"@storybook/design-system": "7.3.8",
"@storybook/theming": "6.5.8",
"@storybook/api": "^6.5.9",
"@storybook/components-marketing": "^2.0.31",
"@storybook/design-system": "7.8.1",
"@storybook/theming": "^6.5.9",
"core-js": "^3.22.8",
"date-fns": "^2.16.1",
"dotenv": "^8.2.0",
"encoding": "^0.1.13",
"framer-motion": "7.0.0",
"gatsby": "^4.16.0",
"gatsby-cli": "4.16.0",
"gatsby-image": "^3.11.0",
Expand Down Expand Up @@ -62,7 +64,6 @@
"querystring": "^0.2.0",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-github-button": "^0.1.11",
"react-helmet": "^5.2.1",
"react-lazyload": "^2.6.5",
"rehype": "^11.0.0",
Expand All @@ -72,6 +73,7 @@
"request": "^2.88.2",
"semver": "^7.3.2",
"unist-util-visit": "^2.0.3",
"use-debounce": "^8.0.4",
"validatorjs": "^3.15.1"
},
"keywords": [
Expand Down Expand Up @@ -109,12 +111,12 @@
"@graphql-codegen/cli": "^1.9.1",
"@graphql-codegen/introspection": "1.16.3",
"@graphql-codegen/typescript": "^1.9.1",
"@storybook/addon-actions": "^6.5.8",
"@storybook/addon-essentials": "^6.5.8",
"@storybook/builder-webpack5": "^6.5.8",
"@storybook/addon-actions": "^6.5.9",
"@storybook/addon-essentials": "^6.5.9",
"@storybook/builder-webpack5": "^6.5.9",
"@storybook/eslint-config-storybook": "^3.1.2",
"@storybook/manager-webpack5": "^6.5.8",
"@storybook/react": "^6.5.8",
"@storybook/manager-webpack5": "^6.5.9",
"@storybook/react": "^6.5.9",
"@storybook/testing-library": "^0.0.11",
"babel-preset-gatsby": "^2.16.0",
"chromatic": "^5.0.0",
Expand Down
56 changes: 56 additions & 0 deletions src/components/basics/CodeExample.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import React from 'react';
import { styled } from '@storybook/theming';
import { CodeExample } from './CodeExample';

export default {
title: 'Frontpage|basics/CodeExample',
component: CodeExample,
};

const StyledCodeExample = styled(CodeExample)`
width: 800px;
height: 600px;
margin: 20px;
`;

const codeSnippet = `import React from 'react';
import { render, unmountComponentAtNode } from 'react-dom';
import { act } from 'react-dom/test-utils';
import { composeStories } from '@storybook/testing-react';
import * as stories from './UserCard.stories';

// Compile the "MissingProfileImage" story
const { MissingProfileImage } = composeStories(stories);

let container = null;
beforeEach(() => {
container = document.createElement('div');
document.body.appendChild(container);
});

afterEach(() => {
unmountComponentAtNode(container);
container.remove();
container = null;
});

it('renders a fallback profile image', () => {
// Render the story
act(() => {
render(<MissingProfileImage />, container);
});

// Verify the DOM structure
expect(container.querySelector('img').getAttribute('src')).toEqual(
'/images/user-fallback.png'
);
});`;

export const Default = () => (
<StyledCodeExample language="jsx" fileName="UserCard.test.js">
{codeSnippet}
</StyledCodeExample>
);
Default.parameters = {
backgrounds: { default: 'dark' },
};
Loading