-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:wingsuit-designsystem/wingsuit
- Loading branch information
Showing
179 changed files
with
4,476 additions
and
3,793 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Showroom | ||
Storybook patterns overwhelm most customer. To provide only the patterns the customer needs Wingsuit (>=1.2) | ||
adds a showroom feature. | ||
|
||
To configure the structure of Wingsuit adds a alterStory and alterPattern hook. Open `apps/storybook/preview.js`: | ||
|
||
Here a sample for a Drupal Layout Builder centric project. | ||
```js | ||
configure( | ||
module, | ||
[ | ||
require.context('./patterns', true, /\.stories(\.jsx|\.js|\.mdx)$/), | ||
require.context('wspatterns', true, /\.stories(\.jsx|\.js|\.mdx)$/), | ||
], | ||
require.context('./config', false, /\.json|\.ya?ml$/), | ||
require.context('wspatterns', true, /\.twig$/), | ||
namespaces, | ||
renderImpl, | ||
{ | ||
alterStory: (story) => { | ||
if (process.env.STORYBOOK_DOCS === 'true') { | ||
const docsStories = { | ||
Welcome: 'Welcome', | ||
}; | ||
if (docsStories[story.title]) { | ||
return { ...story, ...{ title: docsStories[story.title] } }; | ||
} | ||
return null; | ||
} | ||
return story; | ||
}, | ||
alterPattern: (pattern) => { | ||
if (process.env.STORYBOOK_DOCS === 'true') { | ||
const docsPages = { | ||
section: 'Section', | ||
section_slider: 'Section', | ||
hero: 'Blocks', | ||
card: 'Blocks', | ||
rich_text: 'Blocks', | ||
button_group: 'Blocks', | ||
avatar: 'Blocks', | ||
}; | ||
if (docsPages[pattern.getId()]) { | ||
pattern.setNamespace(docsPages[pattern.getId()]); | ||
return pattern; | ||
} | ||
return null; | ||
} | ||
return pattern; | ||
}, | ||
} | ||
``` | ||
## Start storybook in showroom mode | ||
Run either | ||
``` | ||
yarn ws build --docs | ||
``` | ||
or execute | ||
``` | ||
yarn ws dev --docs | ||
``` | ||
to start storybook in dev mode. |
23 changes: 23 additions & 0 deletions
23
docs/apps/pages/pages/guides/showroom-guide/showroom-guide.pages.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import 'protons'; | ||
import MDX from './index.mdx'; | ||
|
||
const template = require('../../docs.twig'); | ||
|
||
export default { | ||
path: '/guides/showroom', | ||
template, | ||
MDX, | ||
vars: { | ||
meta_title: 'Showroom', | ||
meta_description: 'Display storybook components for your customer.', | ||
|
||
next: [ | ||
{ | ||
title: 'Configure your app?', | ||
text: 'Check the parameters under the "App details" section and extend your wingsuit.config.js', | ||
link_title: 'Details', | ||
href: '/configurations/details', | ||
}, | ||
], | ||
}, | ||
}; |
26 changes: 26 additions & 0 deletions
26
docs/apps/pages/pages/guides/twing-extensions-guide/index.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Twing extensions | ||
You can add your own twing extensions to wingsuit. | ||
|
||
Here a sample to add a new function `apps/storybook/preview.js`: | ||
|
||
```js | ||
const renderImpl = new TwingRenderer(); | ||
const twingEnvironment = renderImpl.getEnvironment(); | ||
let function = new TwingFunction('function_name', function () { | ||
// ... | ||
}); | ||
twingEnvironment.addFunction(function); | ||
|
||
configure( | ||
module, | ||
[ | ||
require.context('./patterns', true, /\.stories(\.jsx|\.js|\.mdx)$/), | ||
require.context('wspatterns', true, /\.stories(\.jsx|\.js|\.mdx)$/), | ||
], | ||
require.context('./config', false, /\.json|\.ya?ml$/), | ||
require.context('wspatterns', true, /\.twig$/), | ||
namespaces, | ||
renderImpl | ||
); | ||
``` | ||
[Click here for more infos about twing extensions](https://nightlycommit.github.io/twing/advanced.html#context-aware-filters). |
11 changes: 11 additions & 0 deletions
11
docs/apps/pages/pages/guides/twing-extensions-guide/index.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
extends: | ||
- page | ||
fields: | ||
content: | ||
preview: | ||
- | ||
id: rich_text | ||
variant: default | ||
fields: | ||
text: 'test' | ||
|
23 changes: 23 additions & 0 deletions
23
docs/apps/pages/pages/guides/twing-extensions-guide/twing-extensions-guide.pages.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import 'protons'; | ||
import MDX from './index.mdx'; | ||
|
||
const template = require('../../docs.twig'); | ||
|
||
export default { | ||
path: '/guides/twing-extensions-guide', | ||
template, | ||
MDX, | ||
vars: { | ||
meta_title: 'Twing extensions', | ||
meta_description: 'Add twing extensions.', | ||
|
||
next: [ | ||
{ | ||
title: 'Configure your app?', | ||
text: 'Check the parameters under the "App details" section and extend your wingsuit.config.js', | ||
link_title: 'Details', | ||
href: '/configurations/details', | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# What's new in Version 1.2 | ||
We added a showroom feature and we updated the performance and starterkit templates. | ||
|
||
## Showroom | ||
Now you can run and build storybook in showroom mode | ||
The following example renders storybook in showroom. | ||
```sh | ||
yarn ws build --docs | ||
``` | ||
```sh | ||
yarn ws dev --docs | ||
``` | ||
[Click here for more infos](/guides/showroom/). | ||
## Performance | ||
Thanks to storybook 6.4 and a updated babel configuration storybook starts now in less than 15 seconds. | ||
|
||
## Updated placeholder component. | ||
Image styles are generated automatically. |
22 changes: 22 additions & 0 deletions
22
docs/apps/pages/pages/releases/onedottwo/onedottwo.pages.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import 'protons'; | ||
import MDX from './index.mdx'; | ||
|
||
const template = require('../../docs.twig'); | ||
|
||
export default { | ||
path: '/releases/onedottwo', | ||
template, | ||
MDX, | ||
vars: { | ||
meta_title: 'Wingsuit Version 1.2', | ||
meta_description: 'We have added a lot of new features in Version 1.2.', | ||
next: [ | ||
{ | ||
title: 'Did we catch your interest?', | ||
text: 'Do the 10 minute quickstart guide!', | ||
href: '/guides/quick-start-guide', | ||
link_title: 'Quickstart', | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.