widgetti / solara

A Pure Python, React-style Framework for Scaling Your Jupyter and Web Apps
https://solara.dev
MIT License
1.9k stars 140 forks source link

Solara changes ipython notebook display of dataframes without notifications #534

Open paddymul opened 8 months ago

paddymul commented 8 months ago

My library, Buckaroo, registers itself as the default displayer for pandas and polars dataframes. I was confused as to why this wasn't working. I ended up removing import solara, and auto display worked again.

I have received feedback from users that buckaroo auto-displaying dataframes is confusing and surprising. It is also the point of buckaroo. as a compromise, I added this print statement when buckaroo.enable() is called

print("Buckaroo has been enabled as the default DataFrame viewer.  To return to default dataframe visualization use `from buckaroo import disable; disable()`")

maybe Solara could add a similar print statement so users aren't surprised.

paddymul commented 8 months ago

Interestingly, buckaroo remains the default displayer when it is imported before solara.

I'm open to suggestions as to how our two libraries can provide a consistent user experience.