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

Switch to iframes for in-line examples #145

Open
damncabbage opened this issue May 4, 2017 · 4 comments
Open

Switch to iframes for in-line examples #145

damncabbage opened this issue May 4, 2017 · 4 comments

Comments

@damncabbage
Copy link
Contributor

The in-line examples on the component pages sorta work, but it's mostly an artefact of the static assets/loom.css lining up with the current Bikeshed setup.

I think the only real way of making this work long-term is to have sandbox for each example. And that sandbox would need to have everything provided; examples would need to start providing the <html> onwards.

I'd probably do this via a convenience template calling bikeshed/modules/general/template, eg.

{- bikeshed/modules/my/actualthingtotest/example/e1.prj -}
{ bikeshed/modules/general/example
    { bikeshed/modules/my/actualthingtotest (...) ... ... }
}

Examples would still be distinct from Mocks in that the former would be in-line and the latter would still be on a new page: it's just that the construction of Examples will more closely match Mocks than they have previously.

The only problem that I can see: iframes need to have a fixed size (they don't autoexpand). Suggests welcome on this front. 😰

@sphvn
Copy link
Contributor

sphvn commented May 4, 2017

Would really like to avoid iframes.

@charleso
Copy link
Contributor

charleso commented May 4, 2017

Let's leave this until next week so we can discuss with a whiteboard

@damncabbage
Copy link
Contributor Author

damncabbage commented May 4, 2017

Sure. :)

@sphvn looking forward to your css+js reset hax

@sphvn
Copy link
Contributor

sphvn commented May 4, 2017

I'm not. :)

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

3 participants