Comments (5)
A good pull request would be welcomed, but not something I personally need.
from boxen.
Coming back on this late.
I've experimented a bit, I've managed to create a stable height
option. Next was the fullscreen
option, which is just a boolean that sets width
and height
as the terminal's dimensions. Although after experimenting a bit with it I have to conclude that the fullscreen
option does not work quite well, because on most terminals there is say 15 rows available, but after boxen prints out the 15 row box, the terminal will always add a line break or stuff like that. Thus far on every different terminals I've tried this option on, the top of the box gets cropped because the terminal adds one or more blank line in the output. I don't know if I explained it correctly but in short: It does not look good at all.
So should I keep fullscreen
or only add height
?
from boxen.
The line break shows that because your CLI process finished.
But for some living process, the line break will not be a problem.
You could design your fullscreen API according to your requirement.
Something like this:
type FullscreenOption =
| boolean
| (width: number, height: number) => [width: number, height: number];
// Default use
app({
fullscreen: true
});
// With modifications
app({
fullscreen: ([w, h]) => [w, h - 1]
});
BTW, I had a branch before but it's outdated now. I can back to this work when I have time.
from boxen.
If you have interest in this, I would like to help to review.
from boxen.
@LitoMore Your idea of the implementation is very nice ! I'll try implementing it as soon a I can !
from boxen.
Related Issues (20)
- Boxen colors don't get saved to console logs HOT 1
- Problem with BorderStyle HOT 2
- Do you mind if I do some code refactoring? HOT 2
- Border style type issue HOT 5
- New option width HOT 1
- Text wrapping doesn't account for margin
- Multiple boxes on same line (feature request) HOT 2
- New option: title HOT 1
- cropping leading whitespace in new version ?? HOT 4
- Upgrade `cli-boxes` dependency HOT 1
- Update widest-line vulnerability? HOT 2
- Upgrade `boxen-cli` HOT 3
- require() of ES Module not supported. With Typescript 4.6 and boxen 6.0.0 or higher. HOT 1
- Newlines get stripped out HOT 6
- ES module not supported HOT 1
- Max width option HOT 3
- Allow border to be optional. HOT 2
- Mark Spacing properties optional
- boxen is not working HOT 2
- Table border wrongly formatted HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boxen.