Skip to content

Commit

Permalink
feat: context links in sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Jun 29, 2020
1 parent 0789148 commit ed12379
Show file tree
Hide file tree
Showing 26 changed files with 374 additions and 201 deletions.
2 changes: 2 additions & 0 deletions core/config/test/__snapshots__/stories.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Array [
"/Users/atanasster/component-controls/ui/components/src/ExternalLink/ExternalLink.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Header/Header.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Link/Link.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/LinkHeading/LinkHeading.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Markdown/Markdown.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Navmenu/Navmenu.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Pagination/Pagination.stories.tsx",
Expand Down Expand Up @@ -88,6 +89,7 @@ Array [
"/Users/atanasster/component-controls/ui/components/src/ExternalLink/ExternalLink.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Header/Header.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Link/Link.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/LinkHeading/LinkHeading.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Markdown/Markdown.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Navmenu/Navmenu.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Pagination/Pagination.stories.tsx",
Expand Down
12 changes: 6 additions & 6 deletions core/instrument/test/__snapshots__/csf-hoisted.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Object {
"componentsLookup": Object {
"ControlsTable": "a5c8750149d81a8bf4e29242df86960c",
},
"date": 2020-06-28T15:34:24.198Z,
"dateModified": 2020-06-28T15:35:12.922Z,
"date": 2020-06-29T01:18:57.680Z,
"dateModified": 2020-06-29T01:18:57.681Z,
"package": "ec71283d1606ec1307a72179d47d2255",
"title": "Story",
},
Expand Down Expand Up @@ -101,8 +101,8 @@ Object {
"doc": Object {
"components": Object {},
"componentsLookup": Object {},
"date": 2020-06-28T15:34:24.200Z,
"dateModified": 2020-06-28T15:36:04.549Z,
"date": 2020-06-29T01:18:57.681Z,
"dateModified": 2020-06-29T01:18:57.681Z,
"package": "99930802624c5d84c6815b0aa494de28",
"title": "Story",
},
Expand Down Expand Up @@ -204,8 +204,8 @@ Object {
"doc": Object {
"components": Object {},
"componentsLookup": Object {},
"date": 2020-06-28T15:34:24.201Z,
"dateModified": 2020-06-28T15:36:27.589Z,
"date": 2020-06-29T01:18:57.682Z,
"dateModified": 2020-06-29T01:18:57.682Z,
"package": "f0c3d627ecddef021936755ba261c5e9",
"title": "Story",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Object {
"componentsLookup": Object {
"ControlsTable": "2ee8b0e9e58c6034c09cf994cd086170",
},
"date": 2020-03-07T03:52:40.832Z,
"dateModified": 2020-06-27T00:45:31.057Z,
"date": 2020-06-29T01:18:57.682Z,
"dateModified": 2020-06-29T01:18:57.683Z,
"package": "27309cd065c1624443c9c2cdb62d73ed",
"title": "Story",
},
Expand Down Expand Up @@ -103,8 +103,8 @@ Object {
"doc": Object {
"components": Object {},
"componentsLookup": Object {},
"date": 2020-03-07T03:53:56.234Z,
"dateModified": 2020-06-27T00:45:42.379Z,
"date": 2020-06-29T01:18:57.683Z,
"dateModified": 2020-06-29T01:18:57.684Z,
"package": "15ca3a76fad6a8b03adedc0e9e4a590d",
"title": "Story",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2423,8 +2423,8 @@ user setting can display only props table or only controls",
"componentsLookup": Object {
"PropsTable": "26090286b0d42fa7a92590e6843f1687",
},
"date": 2020-04-18T23:11:55.469Z,
"dateModified": 2020-06-27T00:45:48.597Z,
"date": 2020-06-29T01:18:57.684Z,
"dateModified": 2020-06-29T01:18:57.684Z,
"package": "dd9d92dc79a97d724bc2dff2c5f2aa7a",
"title": "Storybook/Blocks/PropsTable",
},
Expand Down
8 changes: 4 additions & 4 deletions core/instrument/test/__snapshots__/csf-story-doc.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ Object {
"componentsLookup": Object {
"ControlsTable": "72da0b761debbc67acfdcfe4cc253e29",
},
"date": 2020-06-17T18:28:16.347Z,
"dateModified": 2020-06-27T00:40:51.026Z,
"date": 2020-06-29T01:18:57.679Z,
"dateModified": 2020-06-29T01:18:57.679Z,
"package": "aef0eeece1e59f4690b7e3f0065cdc41",
"smartControls": Object {
"smart": false,
Expand Down Expand Up @@ -165,8 +165,8 @@ Object {
"value": "Mark",
},
},
"date": 2020-06-17T18:28:16.347Z,
"dateModified": 2020-06-27T00:45:10.864Z,
"date": 2020-06-29T01:18:57.679Z,
"dateModified": 2020-06-29T01:18:57.680Z,
"package": "4dd4688f69a323d0b893ca9c902cc47a",
"title": "Storybook/Kind",
},
Expand Down
28 changes: 14 additions & 14 deletions core/instrument/test/__snapshots__/mdx-stories.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Object {
"componentsLookup": Object {
"Button": "2855216c2faa4ab43ed978e3ff6743e4",
},
"date": 2020-03-07T05:21:15.061Z,
"dateModified": 2020-06-27T00:46:11.579Z,
"date": 2020-06-29T01:18:57.686Z,
"dateModified": 2020-06-29T01:18:57.686Z,
"package": "8c5cf9d9fa1d5bc7742765b451f2a255",
"title": "Storybook/MDX",
},
Expand Down Expand Up @@ -102,8 +102,8 @@ Object {
"componentsLookup": Object {
"Button": "adb0a7ff2c278d595f4ce67bb4b42887",
},
"date": 2020-03-07T05:21:58.603Z,
"dateModified": 2020-06-27T00:46:23.617Z,
"date": 2020-06-29T01:18:57.687Z,
"dateModified": 2020-06-29T01:18:57.688Z,
"package": "5025d10bd14c417a3985dd520bbc8ce0",
"title": "Storybook/MDX",
},
Expand Down Expand Up @@ -241,8 +241,8 @@ export default Button;
"componentsLookup": Object {
"Button": "ceea0565a65f75c8c7b6b355d6d335ac",
},
"date": 2020-03-07T04:45:17.122Z,
"dateModified": 2020-06-27T00:46:36.491Z,
"date": 2020-06-29T01:18:57.688Z,
"dateModified": 2020-06-29T01:18:57.689Z,
"package": "9d6345a2d09c05cff0ad7c86fe40c4f9",
"title": "Storybook/MDX",
},
Expand Down Expand Up @@ -385,8 +385,8 @@ Object {
"componentsLookup": Object {
"Button": "c63d685efb0c65f18ffc63184e852ef4",
},
"date": 2020-03-07T05:26:10.375Z,
"dateModified": 2020-06-27T00:46:49.539Z,
"date": 2020-06-29T01:18:57.689Z,
"dateModified": 2020-06-29T01:18:57.689Z,
"package": "c151e21eacb60e5b077423daed2d02e2",
"title": "Storybook/MDX",
},
Expand Down Expand Up @@ -564,8 +564,8 @@ Object {
"componentsLookup": Object {
"Button": "88c2f5883a4daf6051d3f8a38ce7bf75",
},
"date": 2020-03-07T05:24:18.801Z,
"dateModified": 2020-06-27T00:47:00.416Z,
"date": 2020-06-29T01:18:57.690Z,
"dateModified": 2020-06-29T01:18:57.690Z,
"package": "9c0d66b95cdae13733bdeb986761ca47",
"title": "Storybook/MDX",
},
Expand Down Expand Up @@ -709,8 +709,8 @@ Object {
"componentsLookup": Object {
"Button": "fe664c2ffbbcacffdac896ace94db697",
},
"date": 2020-03-07T05:23:10.931Z,
"dateModified": 2020-06-27T00:47:13.163Z,
"date": 2020-06-29T01:18:57.690Z,
"dateModified": 2020-06-29T01:18:57.691Z,
"package": "82864065f08bddd8e5586424d90a51f0",
"title": "Storybook/MDX",
},
Expand Down Expand Up @@ -839,8 +839,8 @@ Object {
"componentsLookup": Object {
"Button": "0a73df5cffa26ca62ec534813a77384f",
},
"date": 2020-03-07T05:25:12.973Z,
"dateModified": 2020-06-27T00:47:23.685Z,
"date": 2020-06-29T01:18:57.691Z,
"dateModified": 2020-06-29T01:18:57.692Z,
"package": "fea8eb808fd320237df6714339cbe69b",
"title": "Storybook/MDX",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,8 @@ Button.propTypes = {
"componentsLookup": Object {
"Button": "ccd158de2e347c69fe7bf00b78db5145",
},
"date": 2020-06-28T15:52:24.433Z,
"dateModified": 2020-06-28T16:10:02.341Z,
"date": 2020-06-29T01:18:57.726Z,
"dateModified": 2020-06-29T22:44:26.979Z,
"fileName": "/Users/atanasster/component-controls/examples/stories/src/stories/controls-editors-starter.stories.tsx",
"package": "7661d674db5188cc22e26c1b22bef349",
"title": "Introduction/Starter",
Expand Down Expand Up @@ -631,7 +631,7 @@ Button.propTypes = {
"min": 10,
"type": "ControlTypes.NUMBER",
"undefined": Node {
"end": 923,
"end": 925,
"loc": SourceLocation {
"end": Position {
"column": 22,
Expand All @@ -642,7 +642,7 @@ Button.propTypes = {
"line": 43,
},
},
"start": 919,
"start": 921,
"type": "NullLiteral",
},
"value": 19,
Expand All @@ -651,7 +651,7 @@ Button.propTypes = {
"label": "Name",
"type": "ControlTypes.TEXT",
"undefined": Node {
"end": 735,
"end": 736,
"expressions": Array [],
"loc": SourceLocation {
"end": Position {
Expand All @@ -665,7 +665,7 @@ Button.propTypes = {
},
"quasis": Array [
Node {
"end": 734,
"end": 735,
"loc": SourceLocation {
"end": Position {
"column": 0,
Expand All @@ -681,12 +681,12 @@ Button.propTypes = {
"type": "TemplateElement",
"value": Object {
"cooked": "
## name of the person
**name of the person**
any text is allowed
",
"raw": "
## name of the person
**name of the person**
any text is allowed
",
Expand Down Expand Up @@ -723,8 +723,8 @@ any text is allowed
"author": "atanasster",
"components": Object {},
"componentsLookup": Object {},
"date": 2020-06-17T18:28:16.388Z,
"dateModified": 2020-06-28T16:17:29.773Z,
"date": 2020-06-29T01:18:57.727Z,
"dateModified": 2020-06-29T01:18:57.727Z,
"fileName": "/Users/atanasster/component-controls/examples/stories/src/stories/controls-editors.stories.jsx",
"package": "684baa68d45c8becd8f39da85795335b",
"title": "Introduction/Controls",
Expand Down Expand Up @@ -2150,8 +2150,8 @@ any text is allowed
"value": "Mark",
},
},
"date": 2020-06-17T18:28:16.389Z,
"dateModified": 2020-06-28T16:04:05.681Z,
"date": 2020-06-29T01:18:57.728Z,
"dateModified": 2020-06-29T01:18:57.728Z,
"fileName": "/Users/atanasster/component-controls/examples/stories/src/stories/inherit-from-doc.stories.tsx",
"package": "d1f03618863bd813182b2668bed6d262",
"title": "Introduction/Doc",
Expand Down Expand Up @@ -2274,8 +2274,8 @@ any text is allowed
"componentsLookup": Object {
"Button": "dd96934cfa10038428b57421ede5ec17",
},
"date": 2020-06-17T18:28:16.389Z,
"dateModified": 2020-06-28T16:04:54.609Z,
"date": 2020-06-29T01:18:57.728Z,
"dateModified": 2020-06-29T01:18:57.729Z,
"fileName": "/Users/atanasster/component-controls/examples/stories/src/stories/smart-prop-type.stories.js",
"package": "56bf0298abb3e6152739be8e0540ef47",
"title": "Introduction/Smart PropTypes",
Expand Down Expand Up @@ -2458,8 +2458,8 @@ any text is allowed
"componentsLookup": Object {
"Button": "b5fffc2a9e710b29374f13f1d7ef028c",
},
"date": 2020-06-17T18:28:16.390Z,
"dateModified": 2020-06-28T16:05:13.913Z,
"date": 2020-06-29T01:18:57.729Z,
"dateModified": 2020-06-29T01:18:57.730Z,
"fileName": "/Users/atanasster/component-controls/examples/stories/src/stories/smart-typescript.stories.js",
"package": "2971104eea653041fd49648ff7a04be8",
"title": "Introduction/Smart Typescript",
Expand Down Expand Up @@ -2639,8 +2639,8 @@ any text is allowed
"author": "atanasster",
"components": Object {},
"componentsLookup": Object {},
"date": 2020-06-17T18:28:16.391Z,
"dateModified": 2020-06-28T16:10:25.494Z,
"date": 2020-06-29T01:18:57.730Z,
"dateModified": 2020-06-29T01:18:57.731Z,
"fileName": "/Users/atanasster/component-controls/examples/stories/src/stories/stories-csf.stories.js",
"package": "85a1bf440fe016c4719e372255f5ffcb",
"title": "Introduction/CSF",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ overview.controls = {
label: 'Name',
value: 'Mark',
description: `
## name of the person
**name of the person**
any text is allowed
`,
},
age: {
type: ControlTypes.NUMBER,
description: `
## age of the person
**age of the person**
numeric, values between 10 and 75 allowed
`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ import { Button } from 'theme-ui';
```
````

## Emoji
# Emoji

You can use `:emoji:` in your documents

Expand Down
5 changes: 5 additions & 0 deletions integrations/gatsby-theme-stories/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- [<ins>Store</ins>](#insstoreins)
- [<ins>GatsbyLink</ins>](#insgatsbylinkins)
- [<ins>Layout</ins>](#inslayoutins)
- [<ins>DefaultName</ins>](#insdefaultnameins)
- [<ins>CategoryList</ins>](#inscategorylistins)
- [<ins>CategoryPage</ins>](#inscategorypageins)
- [<ins>DocPage</ins>](#insdocpageins)
Expand Down Expand Up @@ -90,6 +91,10 @@ _Layout [source code](https://github.com/ccontrols/component-controls/tree/maste
| `docId` | _string_ | |
| `type` | _PageType_ | |

## <ins>DefaultName</ins>

_DefaultName [source code](https://github.com/ccontrols/component-controls/tree/master/integrations/gatsby-theme-stories/src/pages/404.tsx)_

## <ins>CategoryList</ins>

_CategoryList [source code](https://github.com/ccontrols/component-controls/tree/master/integrations/gatsby-theme-stories/src/templates/CategoryList.tsx)_
Expand Down
Loading

0 comments on commit ed12379

Please sign in to comment.