Skip to content

Commit

Permalink
Merge branch 'master' of github.com:wingsuit-designsystem/wingsuit
Browse files Browse the repository at this point in the history
  • Loading branch information
christianwiedemann committed Jan 30, 2022
2 parents a136645 + 619a9f9 commit be9bc3e
Show file tree
Hide file tree
Showing 179 changed files with 4,476 additions and 3,793 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ aliases:
working_directory: /tmp/storybook
CYPRESS_CACHE_FOLDER:
docker:
- image: circleci/node:14-browsers
- image: cimg/python:3.9.7-browsers

jobs:
install:
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
e2e:
working_directory: /tmp/storybook
docker:
- image: cypress/included:4.7.0
- image: cypress/included:4.12.0
environment:
TERM: xterm
steps:
Expand Down
18 changes: 17 additions & 1 deletion docs/apps/pages/pages/docs.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,25 @@

{% set body %}
{{ pattern('rich_text', {text: content}, 'default') }}
{% if next|length > 0 %}
<div class="pt-6 md:pt-14">
<div class="p-2 my-2.5 uppercase font-bold">NEXT</div>
{% for item in next %}
{{ pattern('next', {
title: item.title,
text: item.text,
button: pattern('button',{
text: item.link_title,
round: true,
size: 'medium',
url: item.href,
}, 'default')
}) }}
{% endfor %}
</div>
{% endif %}
{% endset %}


{% include "@templates/site-container.twig" with {
menu: pattern_preview('menu', {}, 'primary'),
top_menu: pattern_preview('menu', {}, 'top'),
Expand Down
64 changes: 64 additions & 0 deletions docs/apps/pages/pages/guides/showroom-guide/index.mdx
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.
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 docs/apps/pages/pages/guides/twing-extensions-guide/index.mdx
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 docs/apps/pages/pages/guides/twing-extensions-guide/index.yml
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'

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',
},
],
},
};
1 change: 0 additions & 1 deletion docs/apps/pages/pages/releases/onedotone/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ Thanks to [iuscare](https://github.com/iuscare) for these great presets.
## New App `Wingsuit Pages`
With this new App you can build static page with Wingsuit components and feed them with MDX files.
[Click here for more infos](/apps/pages/).
** >> This docs page is build with Wingsuit Pages. << **

## Awesome Drupal Kickstarter
We rebuild the Drupal Kickstarter. We removed Acquia Lightning and build a Layout Builder interface which makes fun to work with.
Expand Down
18 changes: 18 additions & 0 deletions docs/apps/pages/pages/releases/onedottwo/index.mdx
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 docs/apps/pages/pages/releases/onedottwo/onedottwo.pages.jsx
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',
},
],
},
};
26 changes: 13 additions & 13 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wingsuit-designsystem/docs",
"version": "1.1.5",
"version": "1.2.0-alpha.14",
"description": "Wingsuit documentation.",
"main": "",
"private": true,
Expand Down Expand Up @@ -49,18 +49,18 @@
"@types/react": "^16.9.35",
"@types/react-dom": "^16.9.8",
"@webpack-cli/serve": "^1.3.0",
"@wingsuit-designsystem/cli": "1.1.5",
"@wingsuit-designsystem/core": "1.1.5",
"@wingsuit-designsystem/pattern": "1.1.5",
"@wingsuit-designsystem/pattern-react": "1.1.5",
"@wingsuit-designsystem/preset-compression": "1.1.5",
"@wingsuit-designsystem/preset-imagemin": "1.1.5",
"@wingsuit-designsystem/preset-mdx": "1.1.5",
"@wingsuit-designsystem/preset-pages": "1.1.5",
"@wingsuit-designsystem/preset-postcss8": "1.1.5",
"@wingsuit-designsystem/preset-pwa": "1.1.5",
"@wingsuit-designsystem/preset-tailwind2": "1.1.5",
"@wingsuit-designsystem/storybook": "1.1.5",
"@wingsuit-designsystem/cli": "1.2.0-alpha.14",
"@wingsuit-designsystem/core": "1.2.0-alpha.14",
"@wingsuit-designsystem/pattern": "1.2.0-alpha.14",
"@wingsuit-designsystem/pattern-react": "1.2.0-alpha.14",
"@wingsuit-designsystem/preset-compression": "1.2.0-alpha.14",
"@wingsuit-designsystem/preset-imagemin": "1.2.0-alpha.14",
"@wingsuit-designsystem/preset-mdx": "1.2.0-alpha.14",
"@wingsuit-designsystem/preset-pages": "1.2.0-alpha.14",
"@wingsuit-designsystem/preset-postcss8": "1.2.0-alpha.14",
"@wingsuit-designsystem/preset-pwa": "1.2.0-alpha.14",
"@wingsuit-designsystem/preset-tailwind2": "1.2.0-alpha.14",
"@wingsuit-designsystem/storybook": "1.2.0-alpha.14",
"autoprefixer": "^9.7.4",
"browser-sync-webpack-plugin": "^2.3.0",
"core-js": "^3.4.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ menu:
url: "/guides/create-component-guide"
- title: Create new app
url: "/guides/create-app-guide"
- title: Showroom
url: "/guides/showroom"
- title: Twing extensions
url: "/guides/twing-extensions-guide"
- title: CONFIGURATIONS
url: "#"
below:
Expand Down Expand Up @@ -106,8 +110,8 @@ menu:
items:
- title: Documentation
url: "/guides/quick-start-guide/"
- title: <b>What's new in Version 1.1</b>
url: "/releases/onedotone"
- title: <b>What's new in Version 1.2</b>
url: "/releases/onedottwo"
footer:
label: Footer
description: The footer menu.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<div class="w-4/6 md:w-2/6 max-w-xs md:max-w-7xl ml-3">
<div class="flex items-center -ml-3 md:ml-0">
{% include "@atoms/logo/logo.twig" only %}
<span class="text-xs text-gray-300">v1.1</span>
<span class="text-xs text-gray-300">v1.2</span>
</div>
</div>
{% if show_hamburger == true %}
Expand Down
10 changes: 5 additions & 5 deletions examples/official-wingsuit/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "official-wingsuit",
"private": true,
"version": "1.1.5",
"version": "1.2.0-alpha.14",
"description": "A design system with Storybook, Tailwind and Drupal",
"main": "",
"license": "GPL-2.0",
Expand Down Expand Up @@ -34,10 +34,10 @@
"@storybook/linter-config": "^2.5.0",
"@storybook/react": "^6.1.0",
"@storybook/storybook-deployer": "^2.8.7",
"@wingsuit-designsystem/cli": "1.1.5",
"@wingsuit-designsystem/core": "1.1.5",
"@wingsuit-designsystem/pattern": "1.1.5",
"@wingsuit-designsystem/storybook": "1.1.5",
"@wingsuit-designsystem/cli": "1.2.0-alpha.14",
"@wingsuit-designsystem/core": "1.2.0-alpha.14",
"@wingsuit-designsystem/pattern": "1.2.0-alpha.14",
"@wingsuit-designsystem/storybook": "1.2.0-alpha.14",
"autoprefixer": "^9.7.4",
"core-js": "^3.4.1",
"cross-env": "^6.0.3",
Expand Down
Loading

0 comments on commit be9bc3e

Please sign in to comment.