question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide available terminal space

See original GitHub issue

See https://github.com/vadimdemedes/ink/pull/3#discussion_r126292283.

The problem is demonstrated perfectly when rendering a progress bar:

<div>
  <Label/>
  <ProgressBar/>
</div>

In order to render a progress bar that takes entire terminal space (width), <ProgressBar> needs to know how much space <Label> takes.

I’m short of ideas on how to implement this properly, so any thoughts are welcome!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:20 (16 by maintainers)

github_iconTop GitHub Comments

4reactions
sindresorhuscommented, Apr 23, 2018

Yoga has an asm.js build for browsers, which we could use in Node.js to not need a native dependency: https://github.com/facebook/yoga#build-platforms

0reactions
vadimdemedescommented, Jun 18, 2020

Going to close this issue, as there’s a <Box flexGrow={1}> component which will fill all available space and https://github.com/vadimdemedes/ink/issues/168 is going to introduce an API to measure <Box> width.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AMC Space Available Travel Page - Air Mobility Command
Manual Sign-up Form | Click to download, fill and submit AMC Form 140, Space Available Travel Request, to your nearest AMC Passenger Terminal....
Read more >
How can I write space in Terminal on OS X? - Super User
Show activity on this post. Or just drag and drop the folder into the Terminal. But why don't you just type a few...
Read more >
Space Available Flight: Gateways - Military.com
The following is a list of AMC passenger terminals. See the AMC website for more information.
Read more >
Terminal space Definition | Law Insider
Terminal space means any area within a structure designated as a terminal and used by the public for transitioning between aircraft and ground...
Read more >
How To Deal With Spaces in Paths on Mac and Linux - Medium
The Problem of Spaces On the Command Line. In the macOS Terminal or any Linux/Unix shell, a common command line might look like:-...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found