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
5.31k stars 155 forks source link

fix: use basename for document title (#1630) #1647

Closed ericjanto closed 1 week ago

ericjanto commented 1 week ago

📝 Summary

This PR fixes #1630 by displaying the basename only instead of the entire path in the tab.

🔍 Description of Changes

I introduced a new atom useFiletitle() which simply extracts the string after the last / character in the path (path.basename not available in the client). It depends on the full filename so reacts to changes in the filename accordingly.

📋 Checklist

📜 Reviewers

@akshayka OR @mscolnick

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2024 1:39pm
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2024 1:39pm