Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming notebook doesn't change title of tab #1428

Closed
akshayka opened this issue May 21, 2024 · 1 comment · Fixed by #1496
Closed

Renaming notebook doesn't change title of tab #1428

akshayka opened this issue May 21, 2024 · 1 comment · Fixed by #1496
Labels
bug Something isn't working good first issue (typescript) Good first issue on the frontend/typescript good first issue Good for newcomers

Comments

@akshayka
Copy link
Contributor

Describe the bug

When a notebook is renamed in the editor, its title in the browser tab didn't change. The title should change to reflect the new notebook name.

Environment

{
  "marimo": "0.6.0",
  "OS": "Darwin",
  "OS Version": "22.5.0",
  "Processor": "arm",
  "Python Version": "3.9.19",
  "Binaries": {
    "Browser": "124.0.6367.209",
    "Node": "v21.5.0"
  },
  "Requirements": {
    "click": "8.1.3",
    "importlib-resources": "6.4.0",
    "jedi": "0.19.1",
    "markdown": "3.6",
    "pymdown-extensions": "10.7.1",
    "pygments": "2.17.2",
    "tomlkit": "0.12.4",
    "uvicorn": "0.29.0",
    "starlette": "0.37.2",
    "websocket": "missing",
    "typing-extensions": "4.11.0",
    "black": "23.3.0"
  }
}

Code to reproduce

No response

@akshayka akshayka added bug Something isn't working good first issue Good for newcomers good first issue (typescript) Good first issue on the frontend/typescript labels May 21, 2024
@vrtnis
Copy link
Contributor

vrtnis commented May 23, 2024

Just tried to resolve this with changes to the edit app component. modified handleFilenameChange (i.e., added document.title = name || "Untitled Notebook";) to update tab title when the filename changes and handle cases where name might be null.
Also, added a useEffect hook to ensure the document title is set correctly whenever the filename changes with our default value (i.e.," "Untitled Notebook") if filename is null. Here is a screen recording:

marimotab1-2024-05-23_12.53.43.mp4

vrtnis added a commit to vrtnis/marimo that referenced this issue May 24, 2024
mscolnick pushed a commit that referenced this issue May 28, 2024
* Updates to edit-app.tsx to resolve #1428

* fix: update browser tab title on notebook rename, prioritize app title. Fixes #1428

---------

Co-authored-by: victg <123119434+statistron@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue (typescript) Good first issue on the frontend/typescript good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants