Get help from the marimo community

Updated 3 months ago

Anywidget not displaying correctly

At a glance

The community member is using the ipyaladin astronomical sky survey viewer, built on anywidget, but it is not displaying properly in Marimo. The GUI icons are below the image, and the region to pan and zoom is below the image. The community member is unsure if this is an issue on the Marimo side or if it needs to be addressed with the ipyaladin developers.

In the comments, another community member suggests that the issue may be related to the style sheets not being properly loaded, as Marimo renders the widgets in a ShadowDOM while Jupyter does not, which could cause compatibility issues. The community members agree to investigate further and potentially file issues on both the ipyaladin and Marimo repositories.

Useful resources
I'm using the ipyaladin (https://github.com/cds-astro/ipyaladin) based astronomical sky survey viewer, built on anywidget and it is not displaying properly, with the icons for the GUI below the image when displayed in Marimo. In the screenshot attached, I've zoomed out within the browser to 30% to show the buttons. The region to pan and zoom in/out for the image is below region where the image is displayed. Is there something I'm doing incorrectly from Marimo's side, or is this a problem I need to figure out with the devs of ipyaladin? I'm using the latest version of both ipyaladin (0.4.0) and marimo (0.8.2).

Code to reproduce
Plain Text
import marimo

__generated_with = "0.8.2"
app = marimo.App(width="full")


@app.cell
def __():
    import marimo as mo
    from ipyaladin import Aladin
    return Aladin, mo


@app.cell
def __(Aladin, mo):
    aladin = Aladin(target="ngc4151", fov=2)
    aladin = mo.ui.anywidget(aladin)
    aladin
    return aladin,


if __name__ == "__main__":
    app.run()
Attachment
image.png
M
p
3 comments
It looks like the style sheets are not being properly loaded. We render the widgets in a ShadowDOM while jupyter does not, so it could be they aren’t compatible with shadow doms
We can spend some time investigating - but if you’d like to file an issue, can you do so on both repos?
I can do that - thanks for the quick response
Add a reply
Sign up and join the conversation on Discord