Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialog widget fixed width seems problematic #47

Closed
deepfire opened this issue Mar 30, 2016 · 5 comments
Closed

Dialog widget fixed width seems problematic #47

deepfire opened this issue Mar 30, 2016 · 5 comments

Comments

@deepfire
Copy link

That the dialog widget is parametrised with a fixed width makes it very hard to use in a way, that would preclude crashes on terminal resize.

Most other widgets are resize-agnostic, yet the dialog isn't.

@jtdaugherty
Copy link
Owner

Can you elaborate on what is made more difficult for you by this API?

The reason that the dialog takes a width is because it needs the width to determine how much padding to add to center the dialog. An alternative design would be to remove the width parameter and the automatic dialog centering. The reason I didn't go with that approach is that I assumed that anyone using the dialog API would never find that a useful outcome and would prefer the dialog centered. However, I can also see a non-centered dialog useful as an independent layer along with a translation.

Thanks!

@deepfire
Copy link
Author

How does one make a dialog that doesn't crash, when the terminal window is too small?

Alternatively, how does one make a dialog that takes 100% of screen width?

@jtdaugherty
Copy link
Owner

Can you be more specific about what you mean by "crash"?

As for the width, as I described above, the automatic centering would need to be removed.

@deepfire
Copy link
Author

Basically, I get program exit with:

corr: row 1 now exceeds region width

..where the render code is like this..

..whoops, the recent modifications I've made, which the git history doesn't have, and which I'm not sure how to undo, apparently fix this.

Hmm. I'm not sure how to proceed with this anymore..

@jtdaugherty
Copy link
Owner

Okay. If you encounter the problem again, see if you can provide me with a minimal test program. I'd be happy to try to run it and debug it for myself. I'll close this in the mean time; feel free to re-open it if this comes up again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants