Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More generic plugin system #28

Open
moonglum opened this issue Jan 4, 2019 · 3 comments
Open

More generic plugin system #28

moonglum opened this issue Jan 4, 2019 · 3 comments

Comments

@moonglum
Copy link
Member

moonglum commented Jan 4, 2019

Instead of just offering component previews, the plugin system could be a more generic "some text to some widget" system. This would allow things like:

```colors
#111222
#222111
```

to be converted to a color swatch, or:

```font
Helvetica Neue
11, 13, 17
```

to be converted to a font preview. It could also be used for things like mermaid

@moonglum
Copy link
Member Author

Great suggestion by @blynx: A plugin that renders Figma artifacts. This way, we can more easily compare the state in Figma with the state in HTML/CSS/JS. We can also create a component for which we only have a Figma version, and no HTML/CSS/JS yet.

@blynx
Copy link
Collaborator

blynx commented May 22, 2019

I just had the idea to also inject parameters into the widgets.

```html(height: 100, noFullscreen)
<nav>
    <a href="yay.html">yay</a>
</nav>
```

which would directly be put into the rendered widget element

<component-preview height="100" noFullscreen></component-preview>

That way you could control for example the height of the rendered component preview window. Sometimes you just want to render a narrow button, sometimes you want to render a vertical navigation.
Also you could enable/disable features, etc. of that widget.

@moonglum
Copy link
Member Author

I really like that 👍 I would prefer the following way to write it though:

```html height="100" noFullscreen
<nav>
    <a href="yay.html">yay</a>
</nav>
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants