Closed mwinokan closed 2 months ago
You are expecting too much. Rich is a terminal out library. Jupyter support is there so you can run code in terminal and Jupyter context. But Rich can't detect what your Jupyter background color is. It can't know the width of your browser. And it can't be certain how the browser's style will impact the output. There are so many implementations of Jupyter, that pleasing everyone is quite literally impossible.
I'm glad you like Rich. But it is a terminal library first and foremost.
I hope we solved your problem.
If you like using Rich, you might also enjoy Textual
Describe the bug
Opening a new issue as #236 did not help me to fully resolve my Jupyter issues.
Namely I have not found a way to set up a
rich.console.Console
object for use in Jupyter that is consistent with the terminal output.A default Console object used in Jupyter adds an unwanted line spacing, increased font size, and the reversed text is white on green rather than black on green:
Compare the above to the output when setting
force_jupyter=False, force_terminal=True
to restore the expected font size, line spacing, and reverse colours (although now the bright colours are not supported):However, it goes without saying that being limited to using
force_terminal=True
causes issues with interactive objects such asconsole.status
:Using the console as the context manager is also not desirable as the interactive status/spinner displays are thereby useless.
I am a big fan of rich and would love to include it across my packages which should behave consistently in both terminal and Jupyter notebooks, any suggestions are much appreciated. Thank you
Platform
Jupyter platform report
```python ╭────────────────────