Giter Site home page Giter Site logo

no rendered output about react-blessed HOT 5 CLOSED

devsnek avatar devsnek commented on June 11, 2024
no rendered output

from react-blessed.

Comments (5)

Yomguithereal avatar Yomguithereal commented on June 11, 2024

hello @devsnek. It will be hard for me to help you without any kind of code as I don't know what to make of your screenshots. However I see some katakana chars and I know blessed can have issues with non-ascii chars so you should maybe test the fullUnicode or forceUnicode screen settings documented here: https://github.com/chjj/blessed ?

from react-blessed.

devsnek avatar devsnek commented on June 11, 2024

@Yomguithereal i use fullUnicode and forceUnicode. managed to get a simpler repro though:

const screen = blessed.screen({
  autoPadding: true,
  smartCSR: true,
  fullUnicode: true,
  forceUnicode: true,
  sendFocus: true,
  title: 'aaa',
});

render(
  <element>
    <box>hello</box>
    <box>hi</box>
  </element>
, screen);

from react-blessed.

Yomguithereal avatar Yomguithereal commented on June 11, 2024

@devsnek your example produce the correct result as blessed interpret this as "stack those two boxes on top of one another". Try this for instance:

const screen = blessed.screen({
  autoPadding: true,
  smartCSR: true,
  fullUnicode: true,
  forceUnicode: true,
  sendFocus: true,
  title: 'aaa',
});

render(
  <element>
    <box>hello</box>
    <box top="20%">hi</box>
  </element>
, screen);

One point you may have is that, if I recall correctly, blessed List widget is not very suited to React declarative logic because of its imperative implementation.

from react-blessed.

devsnek avatar devsnek commented on June 11, 2024

How do i display lines of text without manually giving each one a top offset?

from react-blessed.

Yomguithereal avatar Yomguithereal commented on June 11, 2024

I haven't been using blessed since at least 2-3 years now so I may be forgetting something but I don't remember blessed having dynamic layout options. Which means you either need to give a top offset yourself (which is not too complicated to wrap as a custom component if your list don't need incremental updates), or wrap the list/table components using refs and hooks etc. to allow the imperative parts of blessed to be used declaratively within react's workflow.

from react-blessed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.