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

Also show rendered markup with code snippets #43

Open
blynx opened this issue Aug 3, 2019 · 2 comments
Open

Also show rendered markup with code snippets #43

blynx opened this issue Aug 3, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@blynx
Copy link
Collaborator

blynx commented Aug 3, 2019

It might actually be more interesting in some situations to see the rendered markup than the code which generated it. Aiur should also be possible to show that. The proposed tabbed interface would help here, too.

Given:

' ' ' thymeleaf
<div th:replace="~{components/molecules/Complex.html :: Complex}"></div>
' ' '

One does not get a hint about the actual Markup here.

@blynx blynx added the enhancement New feature or request label Aug 3, 2019
@moonglum
Copy link
Member

moonglum commented Aug 5, 2019

I don't think that a different syntax (' instead of ) is the right solution here. aiur allows you to register new engines. So you could register a jsxand ajsx-preview` Syntax. The first one just pretty-prints JSX and that's it. The second one creates a preview component as you can see right now.

What do you think?

@blynx
Copy link
Collaborator Author

blynx commented Aug 5, 2019

ah, please don't mind the ' ' ' syntax, that was just meant to prevent the code block from being rendered wrongly 😅

I rather think having everything at a glance would be nicer - if you need to use a different rendering engine to see different results you might need to duplicate your component code? (one for render, one for code preview!?)

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

No branches or pull requests

2 participants