porsager / flems

A single file web playground and sandbox
Do What The F*ck You Want To Public License
490 stars 85 forks source link

Feature request: Console instead of html output #27

Open tormodvm opened 6 years ago

tormodvm commented 6 years ago

It would be nice to have another option for the console that would make it full height where the html output normally would be. In short: no html output, only javascript console.

Like this: http://jsbin.com/?html,console

Maybe even automatically if there's a .js file but no .html file in the files array?

pygy commented 6 years ago

👍 for the idea, but not automatically, at least not for existing flems (there are existing flems+mithril samples where I've deleted the HTML tab since I mount the app on the document body.

porsager commented 6 years ago

I think that's a really good idea, but as pygy says, shouldn't be toggled automatically. Perhaps toggling it with console: 'primary' in the state object?

I'll try to think about how to toggle it in the interface as well.

barneycarroll commented 6 years ago

I mostly use flems on mobile where A) this feature would be extremely useful B) the existing UI controls (halt, refresh, results link) are slightly confusing because they look like part of the console panel as opposed to the output. In this context the 'full screen' icon looks like it's referring to the console. I think new icons for standalone results / collapsed results should involve direction (switching axis based on orientation) to indicate one panel over the other…

porsager commented 6 years ago

@barneycarroll Do you mean the (halt, refresh, fullscreen) links are confusing now, or that they would be if the console took up the iframe space?

Assuming you mean if the console took up the iframe space, aren't they just as relevant when tied to the console? I'm thinking a layout button could replace the fullscreen icon and contain something like the following.

screen shot 2018-02-04 at 20 54 20
porsager commented 6 years ago

For portrait (mobile) it could be something like this?

screen shot 2018-02-04 at 21 01 38
tormodvm commented 6 years ago

Looks good, porsager.

CreaturesInUnitards commented 6 years ago

I believe the non-mobile versions should also have a vert/horiz stacking toggle.

CreaturesInUnitards commented 6 years ago

...and the API just follows naturally 😄