improve: Home button in notebook menu#1997
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
akshayka
left a comment
There was a problem hiding this comment.
Thanks for the PR! Two pieces of feedback.
-
The home button is styled differently than the NotebookMenuDropdown and Config buttons — can you update the style of the home button to match the NotebookMenuDropdown and Config buttons?
-
When a notebook is started with
marimo newormarimo edit notebook.py, we don't serve the home page — in which case the home button is just refreshing the notebook, which is confusing. I suggest only showing the home button when we're actually serving the home page.
| {!closed && ( | ||
| <div className={topRightControls}> | ||
| {presenting && <LayoutSelect />} | ||
| <HomeButton /> |
There was a problem hiding this comment.
Nit: I suggest putting HomeButton after ConfigButton.
|
Ah I didn't account for Looks like both of these commands open a notebook at https://domain.com/, while opening a notebook from home does "https://domain.com/?file=". |
|
Sure! Personally I think a navigation item might get lost in the hamburger menu (would a user intuitively open a menu to return home?), but I'm not particularly opinionated about this |
The home action I view as a convenience, not an integral part of the top-bar, so I'd like to emphasize it less. |
| divider: true, | ||
| icon: <Home size={14} strokeWidth={1.5} />, | ||
| label: "Return home", | ||
| hidden: !location.search.includes("file"), |
There was a problem hiding this comment.
@mscolnick can you comment whether this is an acceptable way to check whether the server is capable of serving the "home" page?
There was a problem hiding this comment.
Yea this is fine. Potentially in a future change, we should allow going back home regardless, and just use the current directory for "marimo new"
|
Seems as though a test is failing with Python 3.11, is it just a fluke? |
Yea don't worry about the failure, it's unrelated, I'm handling it in another PR. |
|
🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.7.20-dev11 |



📝 Summary
Completes #1984. Adds home button at top left of open notebook page next to app config and shutdown buttons.
Also updates "Running notebooks" section on home page to open running notebooks in the same tab for navigation consistency.
🔍 Description of Changes
📋 Checklist
📜 Reviewers
@mscolnick