observablehq / feedback

Customer submitted bugs and feature requests
42 stars 3 forks source link

Browser > Window menu continues to show old notebook title after change #626

Closed Martien closed 3 months ago

Martien commented 3 months ago

Browser > Window menu continues to show old notebook title after change.

  1. Notebook was titled “Argumentenkaart gemengde scholen”.
  2. Renamed notebook to just “Gemengde scholen” by changing the first markdown cell into # Gemengde scholen.
  3. Changed the URL as well to/@martien/gemengde-scholen.
  4. Refreshed page/Quit browsers/Emptied caches.
  5. Notebook title in browser > Window menu continues to show old title.

Expected to see new title throughout.

Desktop

mootari commented 3 months ago

Unfortunately dynamic titles are not supported. You'll have to replace your interpolated value with a static string or you'll continue to see the title change seemingly at random.

mootari commented 3 months ago

As a workaround you can add a hidden title to your title cell:

<h1 style="display:none">The actual title</h1>

# ${myDynamicTitle}

As long as this h1 is the first element in your notebook it will always get picked as title.

Martien commented 3 months ago

Thanks.

The dynamic title is indeed what caused it.

I tried your workaround with success.

Next, I removed the workaround, and now it shows the proper title.

mootari commented 3 months ago

Next, I removed the workaround, and now it shows the proper title.

I recommend to keep the hidden title or just provide a static one. Observable will only register title changes if you also edit the first cell.