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

Bug: Long texts length is not matching output area in Jupyter #60

Open
manrajgrover opened this issue May 15, 2018 · 7 comments
Open

Bug: Long texts length is not matching output area in Jupyter #60

manrajgrover opened this issue May 15, 2018 · 7 comments

Comments

@manrajgrover
Copy link
Owner

Description

Currently, on using long texts with animations in Jupyter results in output wrapping in next line. Fix for this would be to give it a fixed layout width or try and get the width of display area while creating frames.

System settings

  • Operating System: Mac OS
  • Terminal in use: NA
  • Python version: 2.7.14
  • Halo version: HEAD
  • pip freeze output: NA

Error

Output wraps in display area for Jupyter notebook when long texts are used.

Expected behaviour

Output should take width of display area before creating frames.

Steps to recreate

longtext

People to notify

@jungwinter @manrajgrover

@manrajgrover
Copy link
Owner Author

@jungwinter Could you look into this?

@winterjung
Copy link
Contributor

I checked it occurred because of wrong get_terminal_size(). In jupyter, width of Output widget is not related with terminal size. But in HaloNotebook._get_text(), it use get_terminal_columns() via backports.shutil_get_terminal_size.get_terminal_size().

backports.shutil_get_terminal_size.get_terminal_size() decide terminal width using columns = int(os.environ["COLUMNS"]). But jupyter widget is independent with terminal size and related with HMTL/CSS. So I'm searching to get current jupyter cell's width and how to convert to ascii terminal size like 80, 120, etc.

@manrajgrover
Copy link
Owner Author

@jungwinter That is correct. I was trying to find a way around this but I think there is no official way. I was thinking of injecting some javascript code to get actual width and converting it to terminal size.

@manrajgrover
Copy link
Owner Author

@jungwinter I've made a release with Jupyter support for now. This issue is still not resolved and needs to be fixed (probably with a new approach).

@ajjayymahato
Copy link

Is this issue still open? I would like to work on this issue. Can you please assign this to me?

@winterjung
Copy link
Contributor

I think it's still happening. @manrajgrover Could you confirm ajjayymahato's request? (At least, #165 issue is also needed to check.)

@ajjayymahato
Copy link

If this issue is open can you please assign it to me so that I can work on it?

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

No branches or pull requests

3 participants