From 6d884f2022679a4c6f20f8b659468ff1e220149f Mon Sep 17 00:00:00 2001 From: Akshay Agrawal Date: Thu, 26 Dec 2024 16:39:57 -0800 Subject: [PATCH] improve: no-show-code default for html-wasm export Responding to user feedback that export html-wasm --mode run should hide code by default. In contrast, export html (without wasm) still shows code by default because this command has no distinction between run and edit mode. --- marimo/_cli/export/commands.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/marimo/_cli/export/commands.py b/marimo/_cli/export/commands.py index 522033358d6..91d54bae936 100644 --- a/marimo/_cli/export/commands.py +++ b/marimo/_cli/export/commands.py @@ -412,15 +412,18 @@ def export_callback(file_path: MarimoPath) -> ExportResult: "--mode", type=click.Choice(["edit", "run"]), default="run", - help="Whether the notebook code should be editable or readonly", + help="Whether the notebook code should be editable or readonly.", show_default=True, required=True, ) @click.option( "--show-code/--no-show-code", - default=True, + default=False, show_default=True, - help="Whether to show code by default in the exported HTML file.", + help=( + "Whether to show code by default in the exported HTML file; " + "only relevant for run mode." + ), ) @click.argument( "name",