material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[docs] Auto reload interrupting flow

Open howlettt opened this issue 7 months ago • 6 comments

Steps to reproduce

Steps:

  1. Navigate to https://mui.com/
  2. Click on the search field at the top
  3. Start typing
  4. Browser reloads window clearing search
  5. Note I believe it only happens when a new version has been deployed since your last visit to the docs site

Current behavior

Browser reloads window clearing search. I suspect it's caused by the service worker logic https://github.com/mui/material-ui/blob/2d5a0bc597fb9d954504221f21f521042be969fe/docs/pages/_app.js#L50C7-L50C32

Expected behavior

Can complete search without interruption

Context

No response

Your environment

Search keywords: docs refresh reload

howlettt avatar Jun 28 '25 15:06 howlettt

I have been experiencing this behavior and it's quite annoying. Open to suggestion to better solution that auto reloading.

One behavior I like from Ashby is to show a toast that a new site is released, click refresh to get the latest content.

siriwatknp avatar Jun 30 '25 13:06 siriwatknp

Another option could be to wait until the user clicks a navigation link before doing the reload. This disadvantage of this though is they could be looking at old content on the first page they landed on and not know it

howlettt avatar Jun 30 '25 15:06 howlettt

cc: @mui/docs-infra

DiegoAndai avatar Jul 01 '25 20:07 DiegoAndai

@alexfauquette @DiegoAndai @howlettt

Hi! We are a team of 3 CMU students and would like to work on this issue as part of our Software Engineering course project. Could you confirm this is available to work on, and if so assign the issue to me? Thanks!

harsher216 avatar Dec 06 '25 05:12 harsher216

@oliviertassinari @siriwatknp

harsher216 avatar Dec 10 '25 06:12 harsher216

@harsher216 Feel free to open a PR. But be aware that this issue could be tricky

alexfauquette avatar Dec 10 '25 08:12 alexfauquette