Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Storybook with documentation site (Phase 1) #1654

Closed
wants to merge 104 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
fc7a356
feat(docs): initial commit
nstuyvesant Jul 30, 2023
3d1a733
docs(readme): update
nstuyvesant Jul 30, 2023
cb4bcfc
updates
nstuyvesant Jul 30, 2023
33f2593
match other PR
nstuyvesant Jul 31, 2023
62f71c8
bump eslint-plugin-vue
nstuyvesant Jul 31, 2023
cfb3d91
Merge branch 'master' into docs
nstuyvesant Jul 31, 2023
322521b
update
nstuyvesant Jul 31, 2023
329792b
chore(angular): add types
nstuyvesant Jul 31, 2023
d0abbf8
fix(yarn, links)
nstuyvesant Jul 31, 2023
02480eb
chore(docs): restructure
nstuyvesant Jul 31, 2023
63007f8
Merge branch 'master' into docs
nstuyvesant Jul 31, 2023
1fd7e1d
feat(docs): refine PageTitle, add content
nstuyvesant Aug 2, 2023
ae05e59
chore(repo): bump storybook, vite
nstuyvesant Aug 2, 2023
c59f204
docs(installation): Add information about styling for charts
nstuyvesant Aug 2, 2023
0ec2a0c
Merge branch 'master' into docs
nstuyvesant Aug 2, 2023
aa6bce7
chore(app): remove extra step in release, bump angular, carbon-compon…
nstuyvesant Aug 2, 2023
91d70c3
chore(docs): package.json - remove prettier, add pub:demo script
nstuyvesant Aug 3, 2023
a7c0b5a
chore(docs): remove prettier config
nstuyvesant Aug 3, 2023
a3e3762
chore(docs): drop prettier config from package.json
nstuyvesant Aug 3, 2023
87ce599
chore(prettier): move svelte config to root level
nstuyvesant Aug 3, 2023
55af6e6
chore(docs): installation content
nstuyvesant Aug 3, 2023
d2549fd
chore(app): bump angular, cds, storybook
nstuyvesant Aug 5, 2023
9d1f69c
chore(docs): content creation
nstuyvesant Aug 6, 2023
c51de50
Merge branch 'master' into docs
nstuyvesant Aug 6, 2023
6199467
chore(docs): anatomy page content
nstuyvesant Aug 6, 2023
760c7e7
chore(docs): design pages
nstuyvesant Aug 6, 2023
44ecd7b
chore(docs): finish design section
nstuyvesant Aug 7, 2023
b0543a6
chore(docs): StackBlitz code sample component
nstuyvesant Aug 8, 2023
83b6507
fix(html): update example to match where UMD bundle is
nstuyvesant Aug 8, 2023
04b49ad
fix(html): name
nstuyvesant Aug 8, 2023
22cd934
chore(app): bump dependencies
nstuyvesant Aug 8, 2023
50267c3
chore(app): bump storybook, eslint-plugin-vue
nstuyvesant Aug 9, 2023
30e389c
chore(docs): cleanup installation instructions
nstuyvesant Aug 9, 2023
c023468
chore(angular): bump ng-packagr, fix doc
nstuyvesant Aug 9, 2023
1cec325
Merge branch 'master' into docs
nstuyvesant Aug 9, 2023
827f3b3
fix(html): use new name
nstuyvesant Aug 9, 2023
31fc24a
Merge branch 'master' into docs
nstuyvesant Aug 10, 2023
56675e4
chore(docs): formatting
nstuyvesant Aug 10, 2023
5d6a4aa
Merge branch 'master' into docs
nstuyvesant Aug 10, 2023
149d19c
chore(yarn): update lock
nstuyvesant Aug 10, 2023
227d47f
chore(app): bump storybook, eslint, svelte, svelte-check
nstuyvesant Aug 11, 2023
09577a2
fix(umd): bundle creation
nstuyvesant Aug 11, 2023
dc05762
Merge branch 'master' into docs
nstuyvesant Aug 14, 2023
27b69fe
chore(yarn): update lock
nstuyvesant Aug 14, 2023
1fbc2b3
chore(installation): revise
nstuyvesant Aug 14, 2023
91d023f
chore(app): bump storybook, @typescript*,
nstuyvesant Aug 15, 2023
6c4af6a
chore(scss): Update SCSS to use non-deprecated calls, use namespaces,…
nstuyvesant Aug 15, 2023
9a85945
chore(docs): Updated to remove references to @carbon/styles needing t…
nstuyvesant Aug 15, 2023
76efcc6
chore(demo): Removed @carbon/styles and sass dependencies from StackB…
nstuyvesant Aug 15, 2023
46c8a30
chore(app): bump storybook, prettier
nstuyvesant Aug 15, 2023
0e047cc
chore(docs): Updates to remove @carbon/styles references
nstuyvesant Aug 15, 2023
5d3d67c
Merge branch 'scss-optimization' into docs
nstuyvesant Aug 16, 2023
4c0ccec
chore(yarn): update lock
nstuyvesant Aug 16, 2023
b8cd062
chore(docs): installation page refinements
nstuyvesant Aug 16, 2023
8a980b8
chore(app): bump angular, storybook
nstuyvesant Aug 16, 2023
1e9b8f1
chore(setup): update
nstuyvesant Aug 16, 2023
50de4c9
chore(app): angular
nstuyvesant Aug 17, 2023
cad3260
chore(docs): finish setup
nstuyvesant Aug 17, 2023
ba276bd
chore(docs): update pages
nstuyvesant Aug 17, 2023
bac89a5
chore(docs): color palette, dashboard, api pages
nstuyvesant Aug 17, 2023
99e6532
chore(docs): trim stackblitz configs
nstuyvesant Aug 17, 2023
e1a8773
chore(docs): adjust dashboard image
nstuyvesant Aug 17, 2023
84c6dae
chore(docs): bump dependencies
nstuyvesant Aug 18, 2023
83a8c15
chore(docs): alluvial data and options
nstuyvesant Aug 18, 2023
7e576cb
chore(docs): refactor
nstuyvesant Aug 19, 2023
5a7eda7
chore(docs): alluvial demos
nstuyvesant Aug 20, 2023
0bc5edb
chore(docs): api iframe
nstuyvesant Aug 20, 2023
5790d9e
chore(yarn): update lock
nstuyvesant Aug 20, 2023
e4654cf
chore(docs): detect Chrome on install page
nstuyvesant Aug 20, 2023
e25a84d
chore(docs): alluvial - heading
nstuyvesant Aug 20, 2023
ee49e3f
chore(docs): Area and AreaStacked
nstuyvesant Aug 21, 2023
7aaf6e9
chore(app): bump @typescript*, eslint-plugin-svelte, publint
nstuyvesant Aug 22, 2023
675cc38
chore(docs): publish docs and api to pages
nstuyvesant Aug 22, 2023
be5638a
chore(app): bump angular, carbon-componets, concurrently, @types
nstuyvesant Aug 23, 2023
c577195
chore(docs): temporarily use old api site
nstuyvesant Aug 23, 2023
b5d6008
chore(yarn): update lock
nstuyvesant Aug 24, 2023
844e746
chore(angular): angular.json schema is at monorepo root node_modules
nstuyvesant Aug 29, 2023
de22c53
fix(docs): update URL to better API docs page for options
nstuyvesant Aug 29, 2023
8779dae
chore(storybook): hoist storybook devdependencies, bump storybook, an…
nstuyvesant Aug 31, 2023
b06ac0c
Merge branch 'master' into docs
nstuyvesant Sep 5, 2023
8d75efa
chore(app): bump dependencies
nstuyvesant Sep 5, 2023
e1dd5ff
chore(app): bump angular, vue-tsc
nstuyvesant Sep 7, 2023
29c6231
chore(app): bump dependencies
nstuyvesant Sep 12, 2023
df4077c
Merge branch 'master' into docs
nstuyvesant Sep 25, 2023
ad5b6d1
chore(yarn): update lock
nstuyvesant Sep 25, 2023
fe8bbda
chore(app): make docs package use same versions
nstuyvesant Sep 25, 2023
f70ea8b
chore(app): bump vue-tsc, @typescript*
nstuyvesant Sep 25, 2023
8e6f8b6
Merge branch 'master' into docs
nstuyvesant Oct 7, 2023
ce28c8a
Merge branch 'master' into docs
nstuyvesant Oct 30, 2023
e772b89
Merge branch 'master' into docs
nstuyvesant Nov 19, 2023
f7cf7ea
Merge branch 'master' into docs
nstuyvesant Dec 3, 2023
f784afb
chore(app): update gitignore for new nx
nstuyvesant Dec 3, 2023
dc0e7d3
chore(app): bump @babel, @carbon/icons, @carbon/styles, @carbon/theme…
nstuyvesant Dec 3, 2023
0cbaf4a
Merge branch 'master' into docs
nstuyvesant Dec 18, 2023
2dc8a15
chore(app): bump @typescript*, @carbon/styles, sveltekit, carbon-comp…
nstuyvesant Dec 18, 2023
482980b
Merge branch 'master' into docs
nstuyvesant Dec 18, 2023
b754aa8
Merge branch 'master' into docs
nstuyvesant Dec 22, 2023
e940721
Merge branch 'master' into docs
nstuyvesant Dec 27, 2023
1739531
Merge branch 'master' into docs
nstuyvesant Jan 20, 2024
fd65216
Merge branch 'master' into docs
nstuyvesant Jan 21, 2024
6205438
chore(merge): master into docs
nstuyvesant Feb 4, 2024
1bd2bee
chore(merge): master to docs
nstuyvesant Feb 5, 2024
1db6e68
Merge branch 'master' into docs
nstuyvesant Feb 10, 2024
73efa48
chore(deps): update
nstuyvesant Feb 10, 2024
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
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ jobs:
- name: Install dependencies 🔧
run: yarn install --immutable --check-cache

- name: Set git user and get git into the right state
- name: Set git user
run: |
git config --global user.email "[email protected]"
git config --global user.name "carbon-bot"
git checkout master

- name: Create version and change logs
env:
Expand Down
672 changes: 336 additions & 336 deletions .yarn/releases/yarn-4.0.2.cjs → .yarn/releases/yarn-4.1.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.0.2.cjs
yarnPath: .yarn/releases/yarn-4.1.0.cjs
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
"engines": {
"node": "^18.19.0"
},
"packageManager": "yarn@4.0.2",
"packageManager": "yarn@4.1.0",
"prettier": "./prettier.config.mjs",
"devDependencies": {
"@nrwl/devkit": "^18.0.3",
"@nrwl/devkit": "^18.0.4",
"@storybook/addon-essentials": "~7.6.13",
"@storybook/addon-interactions": "~7.6.13",
"@storybook/addon-links": "~7.6.13",
Expand Down Expand Up @@ -65,8 +65,8 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"storybook": "~7.6.13",
"vite": "^5.1.0",
"vue": "^3.4.16"
"vite": "^5.1.1",
"vue": "^3.4.18"
},
"husky": {
"hooks": {
Expand Down
4 changes: 2 additions & 2 deletions packages/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"dependencies": {
"@carbon/charts": "workspace:*",
"@ibm/telemetry-js": "1.2.0",
"@ibm/telemetry-js": "1.2.1",
"tslib": "^2.6.2"
},
"devDependencies": {
Expand All @@ -55,7 +55,7 @@
"@angular/platform-browser": "^16.2.12",
"@angular/platform-browser-dynamic": "^16.2.12",
"@carbon/icon-helpers": "~10.45.1",
"@carbon/icons": "^11.35.0",
"@carbon/icons": "^11.36.0",
"@stackblitz/sdk": "^1.9.0",
"@storybook/angular": "^7.6.13",
"@types/carbon__icon-helpers": "^10.7.4",
Expand Down
10 changes: 5 additions & 5 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"dependencies": {
"@carbon/colors": "^11.20.1",
"@carbon/utils-position": "^1.1.4",
"@ibm/telemetry-js": "1.2.0",
"@ibm/telemetry-js": "1.2.1",
"carbon-components": "^10.58.13",
"d3": "^7.8.5",
"d3-cloud": "^1.2.7",
Expand Down Expand Up @@ -110,8 +110,8 @@
"devDependencies": {
"@carbon/import-once": "^10.7.0",
"@carbon/layout": "^11.20.1",
"@carbon/styles": "1.49.0",
"@carbon/themes": "^11.30.0",
"@carbon/styles": "1.50.0",
"@carbon/themes": "^11.31.0",
"@rollup/plugin-replace": "^5.0.5",
"@stackblitz/sdk": "^1.9.0",
"@types/d3": "^7.4.3",
Expand All @@ -126,9 +126,9 @@
"resize-observer-polyfill": "^1.5.1",
"sass": "^1.70.0",
"storybook": "~7.6.13",
"typedoc": "^0.25.7",
"typedoc": "^0.25.8",
"typescript": "^5.3.3",
"vite": "^5.1.0",
"vite": "^5.1.1",
"vite-plugin-dts": "^3.7.2",
"vitest": "^1.2.2"
},
Expand Down
10 changes: 10 additions & 0 deletions packages/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
2 changes: 2 additions & 0 deletions packages/docs/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
engine-strict=true
resolution-mode=highest
23 changes: 23 additions & 0 deletions packages/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Carbon Charts Documentation Website

Future replacement for Storybook to be deployed to GitHub Pages.

## Testing

```bash
yarn install
yarn dev

# or start the server and open the app in a new browser tab
yarn dev -- --open
```

## Building

To create a production version of this website (then look in build folder):

```bash
yarn build
```

You can preview the production build with `npm run preview`.
32 changes: 32 additions & 0 deletions packages/docs/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
export default {
root: true,
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:svelte/recommended',
'prettier',
'plugin:storybook/recommended'
],
plugins: ['@typescript-eslint'],
ignorePatterns: ['*.cjs'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
extraFileExtensions: ['.svelte']
},
env: {
browser: true,
es2017: true,
node: true
},
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser'
}
}
]
}
59 changes: 59 additions & 0 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "@carbon/charts-docs",
"version": "1.11.17",
"description": "Carbon Charts Documentation",
"private": true,
"publishConfig": {
"access": "restricted"
},
"type": "module",
"scripts": {
"dev": "vite dev",
"pub:api": "typedoc --tsconfig ../core/tsconfig.json ../core/src/index.ts --out ../../pages/api",
"build:package": "vite build && yarn pub:api",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --plugin-search-dir . --check . --ignore-path ../../.eslintignore && eslint . --ignore-path ../../.eslintignore",
"format": "prettier --plugin-search-dir . --write .",
"clean": "rm -rf ../../pages/docs"
},
"devDependencies": {
"@carbon/charts-svelte": "workspace:*",
"@carbon/styles": "^1.50.0",
"@stackblitz/sdk": "1.9.0",
"@sveltejs/adapter-static": "^3.0.1",
"@sveltejs/kit": "^2.5.0",
"@sveltejs/vite-plugin-svelte": "^3.0.2",
"carbon-components-svelte": "^0.82.9",
"carbon-icons-svelte": "^12.4.2",
"d3": "^7.8.5",
"d3-cloud": "^1.2.7",
"d3-sankey": "^0.12.3",
"eslint": "^8.56.0",
"highlight.js": "^11.9.0",
"sass": "^1.70.0",
"svelte": "^4.2.10",
"svelte-check": "^3.6.4",
"tslib": "^2.6.2",
"typedoc": "^0.25.8",
"typescript": "^5.3.3",
"vite": "^5.1.1"
},
"repository": {
"type": "git",
"url": "[email protected]:carbon-design-system/carbon-charts.git",
"homepage": "https://carbon-design-system.github.io/carbon-charts/svelte/"
},
"bugs": {
"url": "https://github.com/carbon-design-system/carbon-charts/issues"
},
"author": "IBM",
"license": "Apache-2.0",
"maintainers": [
{
"name": "Eliad Moosavi",
"email": "[email protected]"
}
]
}
28 changes: 28 additions & 0 deletions packages/docs/src/app.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface Platform {}
}

interface ChartTypes {
vanilla: string
svelte: string
react: string
vue: string
angular: string
}

interface Example {
name: string
data: ChartTabularData
options: ChartOptions
}

type Framework = 'vanilla' | 'svelte' | 'react' | 'vue' | 'angular' | 'html'
}

export {}
19 changes: 19 additions & 0 deletions packages/docs/src/app.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width" />
<link rel="preconnect" crossorigin="anonymous" href="https://fonts.googleapis.com" />
<link
href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans+Condensed:300,400|IBM+Plex+Sans:400,600&display=swap"
rel="stylesheet" crossorigin="anonymous" />
%sveltekit.head%
</head>

<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>

</html>
40 changes: 40 additions & 0 deletions packages/docs/src/lib/ChartTypeButton.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<script lang="ts">
import { base } from '$app/paths'
import { Button } from 'carbon-components-svelte'
export let title = ''
export let svg = ''
export let alt = ''
export let href = ''
</script>

<span class="thin-margin">
<Button kind="ghost" {href}>
<div class="container">
<span class="title">{title}</span>
<img class="icon" src="{base}/images/{svg}.svg" {alt}/>
</div>
</Button>
</span>

<style lang="scss">
.container {
display: flex;
flex-direction: column;
align-items: flex-start;
}

.title {
font-size: 0.75rem;
color: black;
}

.icon {
height: 15rem;
width: 15rem;
}

.thin-margin {
margin-right: 1px;
margin-bottom: 1px;
}
</style>
21 changes: 21 additions & 0 deletions packages/docs/src/lib/CodeSample.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<script lang="ts">
import type { EmbedOptions } from '@stackblitz/sdk'
import type { ChartOptions, ChartTabularData } from '@carbon/charts-svelte'
import sdk from '@stackblitz/sdk'
import { onMount } from 'svelte'
import { getProject } from './stackblitz'

export let framework: Framework
export let chartType: string = ''
export let data: ChartTabularData
export let options: ChartOptions
let ref: HTMLDivElement

const embedOptions: EmbedOptions = { height: 600, view: 'default', showSidebar: true }

onMount(() => {
sdk.embedProject(ref, getProject[framework](chartType, data, options), embedOptions)
})
</script>

<div bind:this={ref}></div>
15 changes: 15 additions & 0 deletions packages/docs/src/lib/PageTitle.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<script lang="ts">
export let title = ''
</script>

<h1 class="page-title">{title}</h1>

<style lang="scss">
.page-title {
color: white;
background: black;
padding: 4rem 0 3rem 4.5rem;
margin: -2rem -4.5rem 3rem -4.5rem;
font-size: 3rem;
}
</style>
27 changes: 27 additions & 0 deletions packages/docs/src/lib/StackBlitzLauncher.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<script lang="ts">
import sdk from '@stackblitz/sdk'
import { Button } from 'carbon-components-svelte'
import Launch from "carbon-icons-svelte/lib/Launch.svelte"
import { getProject } from './stackblitz'

export let example: Example
export let chartTypes: ChartTypes

const openStackBlitz = (framework: Framework, chartType: string) => {
sdk.openProject(getProject[framework](chartType, example.data, example.options), { newWindow: true })
}
</script>

<div class="launch-buttons">
<Button on:click={() => openStackBlitz('vanilla', chartTypes.vanilla)} icon={Launch} iconDescription="StackBlitz" size="field" kind="secondary">JavaScript</Button>
<Button on:click={() => openStackBlitz('svelte', chartTypes.svelte)} icon={Launch} iconDescription="StackBlitz" size="field" kind="secondary">Svelte</Button>
<Button on:click={() => openStackBlitz('react', chartTypes.react)} icon={Launch} iconDescription="StackBlitz" size="field" kind="secondary">React</Button>
<Button on:click={() => openStackBlitz('vue', chartTypes.vue)} icon={Launch} iconDescription="StackBlitz" size="field" kind="secondary">Vue.js</Button>
<Button on:click={() => openStackBlitz('angular', chartTypes.angular)} icon={Launch} iconDescription="StackBlitz" size="field" kind="secondary">Angular</Button>
</div>

<style lang="scss">
.launch-buttons {
margin-top: .25rem;
}
</style>
1 change: 1 addition & 0 deletions packages/docs/src/lib/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// place files you want to import through the `$lib` alias in this folder.
Loading
Loading