marimo-team / marimo

A reactive notebook for Python — run reproducible experiments, execute as a script, deploy as an app, and version with git.
https://marimo.io
Apache License 2.0
7.95k stars 278 forks source link

Please make the download options configurable. #2918

Open maxtheman opened 23 hours ago

maxtheman commented 23 hours ago

Description

I'm hoping to be able to make it so I can disable different download options for the notebook. In particular, I would like to remove "download as HTML" to prevent confusion with my users.

Image

Suggested solution

Ideally, it's configurable somewhere in the app, maybe even you just put in tools.marimo when that comes out in the pyproject.

Alternative

Here's some CSS that removes it for now. You could customize this to remove the other option based on the text or the icon.

[role="menuitem"]:has(:contains("Download as HTML")) {
    display: none !important;
}
[role="menuitem"]:has(.lucide.lucide-folder-down) {
    display: none !important;
}

Result:Image

Additional context

No response

mscolnick commented 22 hours ago

thanks for sharing your workaround, we can add this. (i may consider using your workaround as the solution and programmatically add/remove css 😄 )

diehl commented 18 hours ago

Is there a way via CSS to remove the entire menu?

maxtheman commented 17 hours ago

@mscolnick you're welcome to it!

@diehl here's one that would remove the whole menu. I'm just looking at the icon and selecting for that, with specificity on the button, so you should be able to copy that for any item you want to hide really.

button[aria-haspopup="menu"]:has(.lucide-ellipsis) {
    display: none !important;
}
diehl commented 17 hours ago

Thank you @maxtheman! My HTML/CSS skills are basically nonexistent so this a significant help ;-)