Skip to content

Commit

Permalink
feat: add docs for other ui packages
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Mar 19, 2020
1 parent fb7b1a8 commit 6e87f65
Show file tree
Hide file tree
Showing 9 changed files with 641 additions and 22 deletions.
54 changes: 49 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,55 @@
# table of contents
# Table of contents

- [Core packages](#core-packages)

- [Overview](#overview)

- [package: @component-controls/instrument](#package-component-controlsinstrument)
- [@component-controls/instrument](#component-controlsinstrument)
- [UI packages](#ui-packages)
- [@component-controls/blocks](#component-controlsblocks)

# Core packages

<package-section file="./core/instrument/README.md" section="overview" />

<!-- START-PACKAGE-SECTION -->

## @component-controls/instrument

Component controls instrumentation library.
Parsing a source file will generate the following information:

- CSF: List of story named exports
- CSF: Default export stories file information
- MDX: List of `<Story />` story tags
- MDX: List of `<Meta />` stories file information
- Source code extracted for the stories
- Source code of the entire stories file
- List of all attributes(ie parameters) passed to CSF/MDX stories
- List of story function arguments passed to CSF/MDX stories
- Usage location (in thesource code) of the function arguments
- Extract 'component' information for stories: import clause, source file,source loction
- Extract package.json repository information for the stories file
- Extract package.json repository information for the components file (in canse the components and the stories and in different packages)

<!-- END-PACKAGE-SECTION -->

# UI packages

<package-section file="./ui/components/README.md" section="overview" />

<package-section file="./ui/editors/README.md" section="overview" />

<package-section file="./ui/blocks/README.md" section="overview" />

<!-- START-PACKAGE-SECTION -->

## @component-controls/blocks

A collection of core block components - intended to be displayed on the documentation page of stories.

Some of the guidingdesign goals for this library:

- Most components should have a 'plain' and a 'block' version, where the block versions adds a collapsible ox with a title.
- There are two main categories of components: components that display story data (i.e. story source, story render) and component(s) data (i.e. prop tables, component sources)
- All components accept a list of custom ActionItems to be extended.
- The compnents that deal with source code (sotory or component) display actions to visit the repositories.

<!-- END-PACKAGE-SECTION -->
2 changes: 1 addition & 1 deletion core/instrument/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Overview

## package: @component-controls/instrument
## @component-controls/instrument

Component controls instrumentation library.
Parsing a source file will generate the following information:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
},
"scripts": {
"clean": "lerna clean",
"docs": "lerna run docs && node ./scripts/docs.js",
"bootstrap": "lerna bootstrap",
"packages": "yarn fix && yarn lint && yarn build && yarn test",
"fix": "lerna run --parallel fix && echo",
Expand Down
4 changes: 3 additions & 1 deletion scripts/insert-overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ function insertOverview(options) {
foundDepth = section.depth;
} else if (foundDepth >= section.depth) {
break;
} else if (foundDepth > 0) {
overviewNodes.push(section)
}
}
if (foundDepth > 0) {
else if (foundDepth > 0) {
overviewNodes.push(section)
}
}
Expand Down
21 changes: 17 additions & 4 deletions ui/blocks/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Componnet Control Block UI components

# Table of contents

- [Components](#components)
- [Overview](#overview)
- [@component-controls/blocks](#component-controlsblocks)
- [List of components](#list-of-components)
- [<ins>ComponentSource</ins>](#inscomponentsourceins)
- [<ins>ControlsTable</ins>](#inscontrolstableins)
- [<ins>SingleControlsTable</ins>](#inssinglecontrolstableins)
Expand All @@ -14,7 +14,20 @@
- [<ins>Subtitle</ins>](#inssubtitleins)
- [<ins>Title</ins>](#institleins)

# Components
# Overview

## @component-controls/blocks

A collection of core block components - intended to be displayed on the documentation page of stories.

Some of the guidingdesign goals for this library:

- Most components should have a 'plain' and a 'block' version, where the block versions adds a collapsible ox with a title.
- There are two main categories of components: components that display story data (i.e. story source, story render) and component(s) data (i.e. prop tables, component sources)
- All components accept a list of custom ActionItems to be extended.
- The compnents that deal with source code (sotory or component) display actions to visit the repositories.

# List of components

<react-docgen-typescript path="./src" exclude="index.ts,repositoryActions.tsx,StoryContext.tsx,utils.ts,ComponentsContext.tsx,context.tsx,argument-utils.ts,PureStorySource.stories.tsx" />

Expand Down
Loading

0 comments on commit 6e87f65

Please sign in to comment.