Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Clean up general Storybook structure and docs pages #1894

Merged
merged 18 commits into from
Jan 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
c70ba64
:recycle: remove group numbers, and remove the grouping from the abou…
ArnaudWeyts Jan 6, 2022
a7639d4
:wrench: specify the order of the groups manually
ArnaudWeyts Jan 6, 2022
3e7ff0e
:fire: remove redundant property
ArnaudWeyts Jan 6, 2022
0a5ac5f
:memo: update the about documentation page
ArnaudWeyts Jan 6, 2022
65ffe3b
:fire: remove the depths and icons documentation pages
ArnaudWeyts Jan 6, 2022
fada3ea
:recycle: link the design system page on colours instead of redefinin…
ArnaudWeyts Jan 6, 2022
0439951
:recycle: group all of the pages under Foundation instead of Primitives
ArnaudWeyts Jan 6, 2022
d901b0e
:fire: remove redundant group import
ArnaudWeyts Jan 6, 2022
3e012f7
:recycle: simplify definition of typography stories
ArnaudWeyts Jan 6, 2022
9890c14
:fire: remove redundant globals
ArnaudWeyts Jan 6, 2022
a04dd8c
:wrench: hide the tabs based on environment variables
ArnaudWeyts Jan 6, 2022
72cab42
:truck: move illustrations to components folder
ArnaudWeyts Jan 6, 2022
87be4df
:memo: add installation instructions for illustrations and icons
ArnaudWeyts Jan 6, 2022
6b34612
:sparkles: add a docs page that contains the changelog
ArnaudWeyts Jan 6, 2022
fa4e704
:fire: remove faulty new line in markdown caught by storybook rendering
ArnaudWeyts Jan 6, 2022
1119186
:wrench: explicitly set the order
ArnaudWeyts Jan 6, 2022
117f4cc
:truck: move single docs files out of folder
ArnaudWeyts Jan 6, 2022
aac3620
:recycle: filter out the relevant illustrations up front instead of r…
ArnaudWeyts Jan 7, 2022
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
2 changes: 2 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
STORYBOOK_HIDE_CANVAS_TAB=false
STORYBOOK_HIDE_DOCS_TAB=false
2 changes: 2 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
STORYBOOK_HIDE_CANVAS_TAB=true
STORYBOOK_HIDE_DOCS_TAB=true
7 changes: 0 additions & 7 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@
"env": {
"browser": true
},
"globals": {
"__DEV__": false,
"__PROD__": false,
"__DEBUG__": false,
"__BASENAME__": false,
"__VERSION__": false
},
"rules": {
"prefer-const": [
"error",
Expand Down
32 changes: 30 additions & 2 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ import { withDesign } from 'storybook-addon-designs';
import { COLOR } from '../src/constants';

import theme from './theme';
import {
ABOUT_AHOY,
CHANGELOG,
COMPOSITIONS,
FOUNDATION,
LOW_LEVEL_BLOCKS,
MARKETING,
MID_LEVEL_BLOCKS,
PLAYGROUND,
} from './utils';

addParameters({
backgrounds: {
Expand All @@ -21,8 +31,18 @@ addParameters({

addParameters({
options: {
showRoots: true,
storySort: (a, b) => (a[1].kind === b[1].kind ? 0 : a[1].id.localeCompare(b[1].id, undefined, { numeric: true })),
storySort: {
order: [
ABOUT_AHOY,
CHANGELOG,
FOUNDATION,
LOW_LEVEL_BLOCKS,
MID_LEVEL_BLOCKS,
COMPOSITIONS,
MARKETING,
PLAYGROUND,
],
},
},
});

Expand All @@ -34,6 +54,14 @@ addParameters({

addParameters({
viewMode: 'docs',
previewTabs: {
canvas: {
hidden: process.env.STORYBOOK_HIDE_CANVAS_TAB === 'true',
},
'storybook/docs/panel': {
hidden: process.env.STORYBOOK_HIDE_DOCS_TAB === 'true',
},
},
});

// addon-designs
Expand Down
34 changes: 34 additions & 0 deletions .storybook/stories/about.stories.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { Meta } from '@storybook/addon-docs';
import { ABOUT_AHOY } from '../utils';

<Meta title={ABOUT_AHOY} parameters={{ previewTabs: { canvas: { hidden: true } } }} />

# Ahoy

A React implementation of Ahoy, Teamleader’s design system.

[Principles](https://teamleader.design)

[Figma Library](https://www.figma.com/community/file/817528775203111349/Ahoy-Desktop-Components)

[GitHub](https://github.com/teamleadercrm/ui)

# Getting started

## Installation

To install the latest version of Ahoy in your project, run the following command when using yarn:

```
yarn add @teamleader/ui
```

or if you're using npm:

```
npm install @teamleader/ui
```

## PostCSS

This library internally uses PostCSS and also requires end users to install and configure PostCSS in their project. Check the [PostCSS documentation](https://postcss.org/) for more information.
27 changes: 0 additions & 27 deletions .storybook/stories/about/about.stories.mdx

This file was deleted.

7 changes: 7 additions & 0 deletions .storybook/stories/changelog.stories.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Meta, Description } from '@storybook/addon-docs';

import changelog from '../../CHANGELOG.md';

<Meta title="Changelog" />
ArnaudWeyts marked this conversation as resolved.
Show resolved Hide resolved

<Description markdown={changelog} />
8 changes: 8 additions & 0 deletions .storybook/stories/colors.stories.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Meta, ColorPalette, ColorItem, Story } from '@storybook/addon-docs/blocks';
import { Box, COLOR, Heading2, Island, StatusLabel, TextBody } from '../../src';

<Meta title="Foundation / Colors" parameters={{ previewTabs: { canvas: { hidden: true } } }} />

# Colors

For more information about the color palette, see the [principles page](https://ahoy.teamleader.design/3547946e7/p/015bf2-color/b/66edd6).
168 changes: 0 additions & 168 deletions .storybook/stories/colors/colors.stories.mdx

This file was deleted.

159 changes: 0 additions & 159 deletions .storybook/stories/depths/assets/depths.svg

This file was deleted.

49 changes: 0 additions & 49 deletions .storybook/stories/depths/depths.stories.mdx

This file was deleted.

9 changes: 0 additions & 9 deletions .storybook/stories/icons/assets/bounding_1.svg

This file was deleted.

9 changes: 0 additions & 9 deletions .storybook/stories/icons/assets/bounding_2.svg

This file was deleted.

Loading