chjj / blessed

A high-level terminal interface library for node.js.
Other
11.19k stars 529 forks source link

React wrapper #112

Open jussi-kalliokoski opened 9 years ago

jussi-kalliokoski commented 9 years ago

Just throwing an idea in the air... It would be really cool to be able to define terminal UIs in a React-style way, and this library seems like a perfect fit for wrapping into a React-style API (in a separate module of course).

chjj commented 9 years ago

This is definitely one of the directions I want to see blessed go. I have a few in mind actually, just off the top of my head:

  1. Create a markup language for blessed (already done, and pretty cool: https://github.com/kevinhikaruevans/blessedoo)
  2. Use blessed as a rendering backend for jsdom, allowing us to create an insanely good terminal web browser (have you ever seen a terminal browser with hover effects and hoverable text boxes?).
  3. Wrap blessed with any other APIs that have a concept of rendering, such as this.
chjj commented 9 years ago

Of course, I wouldn't include this in core blessed. These are things that should be separate in my opinion.

dbkaplun commented 9 years ago

:+1:

Use blessed as a rendering backend for jsdom, allowing us to create an insanely good terminal web browser (have you ever seen a terminal browser with hover effects and hoverable text boxes?).

This would be the best thing ever. A relevant lib might be facebook/css-layout.

taneltm commented 9 years ago

I've been having the same idea since I first learned about blessed - More specifically, blessing backbone/marionette. Blessedoo should make it much easier!

Yomguithereal commented 8 years ago

Hello everyone. With the latest changes in react@0.14.0 and the separation of the rendering logic from the components' one, I started a little proof of concept of react-blessed here. It does not much for the time being but if you like the idea, we can start working on that and extend the features of the renderer quite easily.

chjj commented 8 years ago

@Yomguithereal, good job. I wasn't aware React was modularized in that way. That makes things a lot easier. That's one idea. I think it's worth pursuing.

But the ultimate goal I have in my head should be to combine JSDOM with a CSSOM module (anyone know of a good headless CSSOM?) and use Blessed for the rendering backend. Then we could use whatever frontend framework we wanted without changing a thing. It would definitely be a non-trivial task, but it would be awesome. Plus, nevermind the frameworks, we could also make the best terminal web browser ever created (complete with hover effects, images, ansiimages, etc).

Yomguithereal commented 8 years ago

What about cssom the npm package (sorry if this is not headless and for some stupid reasons I missed it)?

Beotian question: is jsdom rendering backend modifiable without a kind of fork?

Yomguithereal commented 8 years ago

@chjj, I just started experimenting with the latest jsdom version (which packs a partial CSSOM) and am trying to use facebook's css-layout module on the resultant DOM to see whether the produced layout is of sufficient quality

cancerberoSgx commented 5 years ago

Just JSX no react, one file implementation with types and supporting, FunctionElement, ClassElement, function attributes and things like {arr.map(a=>} or {condition && <box...}