fix(notebooks): strip Tutorials, settings and Shutdown from marimo's home page
The landing page's top-right cluster (Tutorials dropdown, user-settings gear, server Shutdown X) is removed in the overlay. Unlike the Resources strip, this step fails the image build if an upstream bump leaves any of the three on the home page, so they cannot quietly come back. The editor keeps its gear: that component hosts the settings dialog the notebook menu, AI footer and packages panel open.
This commit is contained in:
@@ -90,6 +90,28 @@ open(p, 'w').write(s)
|
||||
PY
|
||||
fi
|
||||
|
||||
# 4c. Strip the home page's top-right cluster: the Tutorials dropdown, the
|
||||
# user-settings gear and the server Shutdown X. None of them may ever
|
||||
# reach the landing page, so unlike 4b this fails the build when an
|
||||
# upstream bump leaves any of them in place rather than skipping quietly.
|
||||
# (The editor keeps its own gear: it hosts the settings dialog that the
|
||||
# notebook menu, AI footer and packages panel open.)
|
||||
python3 - "$SRC/frontend/src/components/pages/home-page.tsx" <<'PY'
|
||||
import sys, re
|
||||
p = sys.argv[1]
|
||||
s = open(p).read()
|
||||
s = re.sub(
|
||||
r'^[ \t]*<div[^>]*>\s*<OpenTutorialDropDown />.*?^[ \t]*</div>\n',
|
||||
'', s, count=1, flags=re.M | re.S,
|
||||
)
|
||||
s = re.sub(r'^import \{ (ConfigButton|ShutdownButton) \} from "[^"]+";\n', '', s, flags=re.M)
|
||||
s = re.sub(r'\bOpenTutorialDropDown,\s*', '', s)
|
||||
left = sorted(set(re.findall(r'\b(OpenTutorialDropDown|ConfigButton|ShutdownButton)\b', s)))
|
||||
if left:
|
||||
sys.exit(f"overlay: home page still references {', '.join(left)} in {p}")
|
||||
open(p, 'w').write(s)
|
||||
PY
|
||||
|
||||
# 5. Inject the lucide-react → shim alias into vite.config.mts.
|
||||
# Match the `resolve: {` block and insert an `alias` entry right after.
|
||||
if ! grep -q 'lucide-shim' "$SRC/frontend/vite.config.mts"; then
|
||||
|
||||
Reference in New Issue
Block a user