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

Tracklist userscripts are breaking the requested track highlight in release page #773

Closed
jesus2099 opened this issue Jul 21, 2023 · 8 comments

Comments

@jesus2099
Copy link
Owner

When browsing to a specific track with https://musicbrainz.org/track/eb41e55a-ea05-3b52-b0bf-ff49cf6d7496 the URL will get replaced by special release URL https://musicbrainz.org/release/17ca3011-430c-3063-af7b-4465fc82ec91/disc/1#eb41e55a-ea05-3b52-b0bf-ff49cf6d7496 to enable the highlighting of requested track.

With FUNKEY userscript turned on, it seems that this highlight is lost most of the time.

@jesus2099
Copy link
Owner Author

No problems when deactivating big pictures!

var bigpics = false;

@jesus2099
Copy link
Owner Author

Actually bigpics is even breaking smallpics in release page!

If bigpics works (not often), then both smallpics and track highlight are good.
Otherwise, they are both broken.

It seems to work only when userscript is late.
If the script is early, then React hydrate seems to break it, or something like that, because I have time to see the track highlight show up and disappear.

@jesus2099
Copy link
Owner Author

Indeed:

react-dom.production.min.js:147 Uncaught Error: Minified React error #418; visit https://reactjs.org/docs/error-decoder.html?invariant=418 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
Hydration failed because the initial UI does not match what was rendered on the server.

Uncaught Error: Minified React error #423; visit https://reactjs.org/docs/error-decoder.html?invariant=423 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering.

@jesus2099 jesus2099 added server change react-hydrate new hint: custom mb-hydration event and removed bug labels Jul 21, 2023
@jesus2099
Copy link
Owner Author

jesus2099 commented Jul 21, 2023

It happens less frequently on mobile.
Probably because things are not loading in the same sequence and at the same speed. My userscript list is not ordered the same either.

Screenrecorder-2023-07-21-16-33-06-931.mp4

I could reproduce the bug above, on my second reload.

But then I realoaded again many many times, without reproducing the bug, and stopped trying after 5 minutes, when my smartphone memory had no space left for the video I was capturing.

@jesus2099
Copy link
Owner Author

I may do the same lame thing as usual, delay userscript on pages that run React hydrate.

@jesus2099
Copy link
Owner Author

This brownish bar is there thanks to a table.tbl tr:target td CSS selector in common.css, and the #mbid hash is still in the address bar, so it's strange that it disappears... 🤔

@jesus2099
Copy link
Owner Author

jesus2099 commented Jul 31, 2023

Oh no it's not only my FUNKEY in the end!
There is INLINE STUFF, too.

@jesus2099 jesus2099 changed the title FUNKEY is breaking the requested track highlight in release page Tracklist userscripts are breaking the requested track highlight in release page Jul 31, 2023
@jesus2099
Copy link
Owner Author

jesus2099 commented Jul 31, 2023

I added that same old lame react hydrate workaround (delay): e540156?w=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant