Skip to content

Commit

Permalink
chore: new documentation website (#2468)
Browse files Browse the repository at this point in the history
* chore: base of new website documentation

* Welcome UI Tokens & Styles (Markdown) (#2167)

* Updated styles and tokens

* Updated styles and tokens

* Updated styles and tokens

* Updated styles and tokens

* Updated styles and tokens

* Updated styles and tokens

---------

Co-authored-by: Supernova Bot <[email protected]>

* docs: change route for design

* docs: remove wrong design folder

* docs: add table of contents

* docs: add sidebar navigation

* docs: add static params generation

* feat: change folder for docs

* docs: format data to have the same between design and dev

* docs: upgrade for nextjs 13 packages

* docs: add theme

* docs: add code mirror

* ci: bring back yarn build:docs

* docs: remove old design pages

* Updated styles and tokens (#2269)

Co-authored-by: Supernova Bot <[email protected]>

* feat: add new pages overview and props on components

* feat: remove old pages from design

* fix: change path for components properties

* Updated styles and tokens (#2308)

Co-authored-by: Supernova Bot <[email protected]>

* feat: rework imports

* feat: add foundations page on static build

* chore: upgrade nextjs

* feat: add header

* docs: rework documentation template

* docs: add alerts

* Updated styles and tokens (#2320)

Co-authored-by: Supernova Bot <[email protected]>

* fix: dont

* feat: rework style of titles etc

* feat: add Tokens

* Updated styles and tokens (#2322)

Co-authored-by: Supernova Bot <[email protected]>

* feat: add sticky on navigations

* feat: add pages from supernova components

* feat: rework mdx components and add toc on props page

* feat: add style on navigations

* fix: wrong case imports

* fix: navigation subpages

* fix: props page

* chore: fix depcheck

* feat: add playground component

* feat: change lerna config import to avoid alert in console

* chore: remove old documentation and upgrade linters

* fix: typescript on website

* feat: upgrade to nextjs 14

* feat: rebase and upgrade to last nextjs version

* feat: rework props page

* feat: rework page design

* feat: update properties

* feat: rebase

* feat: add installation block for components

* feat: rework pages

* fix: table of content and add prev next page on footer

* fix: missing ts config on docs

* feat: add strong mdx component

* feat: add Alert page

* feat: add StackBlitz

* feat: responsive

* feat: rework foundations pages

* feat: button build with Ariakit

* feat: add Footer and theming badic examples

* feat: add new components docs

* feat: add new components docs

* feat: add new components docs

* feat: add icons pages

* feat: add new components docs

* feat: add new components docs

* chore: fix linters

* feat: final touch for release new documentation

* feat: add Field and fix some issue on preview

* feat: add blog page

* docs: add contributing

---------

Co-authored-by: supernovaio[bot] <85947601+supernovaio[bot]@users.noreply.github.com>
Co-authored-by: Supernova Bot <[email protected]>
  • Loading branch information
3 people authored Jul 12, 2024
1 parent 65bc6fd commit 275b209
Show file tree
Hide file tree
Showing 678 changed files with 35,431 additions and 12,829 deletions.
33 changes: 16 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,39 +113,39 @@ jobs:
- packages/IconFont/fonts

# current version build (common to previews & prod)
docs_build:
website_build:
<<: *defaults
steps:
- attach_workspace:
at: ~/welcome-ui
- restore_cache:
key: << pipeline.parameters.cache_version >>-welcome-ui-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn docs:build
- run: yarn website:build
- persist_to_workspace:
root: ~/welcome-ui
paths:
- docs/out
- website/out

# current version deploy for previews
docs_deploy_preview:
website_deploy_preview:
<<: *defaults
steps:
- attach_workspace:
at: ~/welcome-ui
- restore_cache:
key: << pipeline.parameters.cache_version >>-welcome-ui-{{ .Environment.CIRCLE_SHA1 }}
- run: node_modules/.bin/netlify deploy --dir=docs/out --alias $CIRCLE_BRANCH
- run: node_modules/.bin/netlify deploy --dir=website/out --alias $CIRCLE_BRANCH

# current version deploy for production
docs_deploy_prod:
website_deploy_prod:
<<: *defaults
steps:
- attach_workspace:
at: ~/welcome-ui
- restore_cache:
key: << pipeline.parameters.cache_version >>-welcome-ui-{{ .Environment.CIRCLE_SHA1 }}
- aws-s3/sync:
from: docs/out
from: website/out
to: s3://welcome-ui/docs_production
arguments: |
--metadata GitCommit=$CIRCLE_SHA1
Expand All @@ -155,7 +155,7 @@ jobs:
- run: node_modules/.bin/netlify deploy --dir=docs_production --prod

# previous versions build & deploy for production
previous_docs_versions_build_deploy_prod:
previous_website_versions_build_deploy_prod:
<<: *defaults
steps:
- attach_workspace:
Expand All @@ -164,9 +164,9 @@ jobs:
key: << pipeline.parameters.cache_version >>-welcome-ui-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: build w/ prefix
command: VERSION=$CIRCLE_BRANCH yarn docs:build
command: VERSION=$CIRCLE_BRANCH yarn website:build
- aws-s3/sync:
from: docs/out
from: website/out
to: s3://welcome-ui/docs_production/$CIRCLE_BRANCH
arguments: |
--metadata GitCommit=$CIRCLE_SHA1 --delete
Expand Down Expand Up @@ -204,7 +204,6 @@ jobs:
command: yarn lerna publish from-git --yes --no-verify-access --dist-tag next

workflows:
version: 2
btd:
jobs:
- checkout:
Expand Down Expand Up @@ -252,13 +251,13 @@ workflows:
requires:
- yarn_install
- build
- docs_build:
- website_build:
filters:
tags:
only: /.*/
requires:
- build
- docs_deploy_prod:
- website_deploy_prod:
context:
- aws
- netlify
Expand All @@ -271,18 +270,18 @@ workflows:
requires:
- test
- lint
- docs_build
- website_build
- build_and_release_icon_font
- docs_deploy_preview:
- website_deploy_preview:
context:
- netlify
- welcome-ui
requires:
- test
- lint
- docs_build
- website_build
- build_and_release_icon_font
- previous_docs_versions_build_deploy_prod:
- previous_website_versions_build_deploy_prod:
context:
- aws
- netlify
Expand Down
7 changes: 3 additions & 4 deletions .depcheckrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"ignores": [
"@testing-library/*"
]
}
"ignores": ["@testing-library/*"],
"ignorePatterns": ["docs/*"]
}
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
module.exports = {
extends: './node_modules/wttj-config/lib/eslint/eslintrc-typescript',
ignorePatterns: ['docs'],
}
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/update-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ body:
attributes:
label: '[Tech] Implementation'
description: 'If possible, describe how this feature could be implemented.'
placeholder: 'See [CONTRIBUTING.mdx](https://github.com/WTTJ/welcome-ui/blob/main/CONTRIBUTING.mdx)'
placeholder: 'See [CONTRIBUTING.mdx](https://github.com/WTTJ/welcome-ui/tree/main/CONTRIBUTING.mdx)'
- type: 'input'
id: 'due-date'
attributes:
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.env
dist/
docs/out
docs/.next
website/out
website/.next
.cache/
node_modules/
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1 +1 @@
yarn icons:collect && yarn lint && yarn test && yarn check:deps
yarn icons:collect && yarn lint && yarn lint:website && yarn test && yarn check:deps
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
!/dist/*.js
*.test.js
/docs
/website
27 changes: 26 additions & 1 deletion CONTRIBUTING.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,37 @@ Each component will consist of:
- `src/index.tsx`: The React component
- `src/styles.ts`: Any related `styled-components`
- `src/utils.ts` : utils for this component
- `src/docs` : documentation for this component [See more](#documentation)
- `tests/index.test.ts`: Jest / react-testing-library tests for this component

## Adding icons

Check the [Icon README](https://github.com/WTTJ/welcome-ui/blob/main/icons/README.md)
Check the [Icon README](https://github.com/WTTJ/welcome-ui/tree/main/icons/README.md)

## Reporting issues

You can report issues on our [github project](https://github.com/WTTJ/welcome-ui/issues) 🐛

## Documentation

Our documentation is based on NextJS with mdx files and nodejs script.

### For a Component

All component documentation is now located in its repository's `docs` folder:

- `index.mdx`:
- **Header**: Contains the following information:
- `ariakit`: Link (if used in this component, will be transformed into a button on the page header)
- `description`: From ChatGPT
- `name`
- `packageName`: Name of the npm package
- `usage`: If needed, for example, if the import is different from the component name
- `/examples`:
- **overview.mdx**: The main example shown at the top of the component page
- Others: Your other examples
- `properties.json`: Auto-generated with `yarn watch`. It includes the list of the component's properties.

### For a foundation page

Simply add your new page on it, it's magic!
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Welcome UI

<img src="docs/public/illustration.png" width="300" />

Welcome to the _Welcome UI library_ created by [Welcome to the jungle](https://www.welcometothejungle.com), a customizable design system with react • typescript • styled-components • styled-system and ariakit.

Here you'll find all the core components you need to create a delightful webapp.
Expand All @@ -10,7 +8,7 @@ Here you'll find all the core components you need to create a delightful webapp.

---

[![License](https://img.shields.io/npm/l/welcome-ui.svg)](https://github.com/WTTJ/welcome-ui/blob/main/LICENSE) ![Code formating](https://img.shields.io/badge/code%20formating-prettier-blue.svg) ![Code style](https://img.shields.io/badge/code%20style-styled--components-ff69b4.svg) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-mediumspringgreen.svg)](https://github.com/WTTJ/welcome-ui/blob/main/CONTRIBUTING.mdx) [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
[![License](https://img.shields.io/npm/l/welcome-ui.svg)](https://github.com/WTTJ/welcome-ui/tree/main/LICENSE) ![Code formating](https://img.shields.io/badge/code%20formating-prettier-blue.svg) ![Code style](https://img.shields.io/badge/code%20style-styled--components-ff69b4.svg) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-mediumspringgreen.svg)](https://github.com/WTTJ/welcome-ui/tree/main/CONTRIBUTING.mdx) [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)

---

Expand Down
17 changes: 0 additions & 17 deletions docs/babel.config.js

This file was deleted.

51 changes: 0 additions & 51 deletions docs/components/App.js

This file was deleted.

57 changes: 0 additions & 57 deletions docs/components/Colors.js

This file was deleted.

37 changes: 0 additions & 37 deletions docs/components/ComponentsList/Link.js

This file was deleted.

Loading

0 comments on commit 275b209

Please sign in to comment.