-
Notifications
You must be signed in to change notification settings - Fork 27
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
Still visible in the sidebar but nothing appears in the tracklist (ISRC, comments, AcoustID) any more #596
Comments
There is still problems with the other tools (recording open edits, relate/merge tools and Edit rec. buttons). |
Mass Merge Recordings & Set Comments for Recordings for a release have just stopped working for me. They show that they are loaded, but the button for Set Comments for Recordings no longer shows up and when I add a release into the field for remote release box, it never loads them. |
It must be because of https://tickets.metabrainz.org/browse/MBS-11703 that may have introduced react-hydrate (page redraw) stuff. |
The release comment script is back working. So at least that was short lived. |
The release comment script was not updated in 10 month but will hopefully be fixed by its author @mwiencek soon. ;) Maybe it works for you because it is running enough late (behind lots of other scripts), after react has done its deferred page redraw, or something. As I don't understand react, I will be able to learn from his fix. |
In fact I found the react hydrate stuff in:
|
Sorry this causes so much trouble. :\ The main issue I see is that React will remove any elements you inject whenever it re-renders the parent. I'm not sure of the best way to handle this. I could also add some callbacks in the MBS components that userscripts could hook into and modify stuff, though this probably still requires some minor knowledge of React. It might be the most reliable option though. Could you make a list of the different elements on the release page you need to modify/inject into? |
Thanks for chiming in, @mwiencek. :)
Exatcly! I thought there were some React functions that I could call to tell React this and this had to be kept at next page redraw, I don't think MBS code should go as far as to include specific callbacks for user scripts, though. If there is no clean react way, I try to make some clean new code based on |
Sadly no. |
Thanks! 😁 |
Hi @mwiencek, did the
Which makes it difficult with multilingual MBS. Before that, I used to have UpdateIndeed: Before<tr>
<td>
<div class="loading-message">
{l('Loading...')}
</div>
</td>
</tr> After<tr>
<td>
{l('Load all tracks...')}
</td>
</tr> Do you think this kind of stuff could be put back? |
I'm pretty sure it could. I'll look into making the change. |
metabrainz/musicbrainz-server#2166 - does that look like it would work? (it'd need a small change at least since there's no longer a |
Good release exampleTo test this out: https://musicbrainz.org/release/16caa039-aba9-45e8-9ff1-8cca8635ff52 |
Work amount is also broken, I now see only Tracks: https://musicbrainz.org/release/5ebe09a7-2451-47aa-91eb-9a9ce5973ef3 |
I will fix this by finally writing a new version that handles all kinds paginated releases (#38), like recently done for COLLECTION HIGHLIGHTER. It will solve this issue at the same time! |
This bug will soon trigger all the time, like on beta: see examples in #682. |
Now triggering on non-beta site too. |
@jesus2099 wrapping your INLINE STUFF script into a
I don't think it's truly a reliable workaround, but the React hydration errors disappeared and INLINE STUFF seems to do its job. Alternatively, The reason it's not a reliable workaround is that it's also waiting for all images to finish loading. So, if the Internet Archive/CAA is having a particularly bad day, this workaround could make it so your script will only execute after the sidebar cover art is loaded, which is of course not ideal.
What I think could be a decent solution would be a custom event that gets dispatched whenever hydration of a component has finished. Userscripts could then listen for that event and postpone their modifications until it arrives. Ideally the event would bubble and be dispatched on the hydrated component's root, so we can listen to it anywhere in the parent chain but still figure out which element exactly was hydrated. That also wouldn't require any tricky hooks made specifically for userscripts, and no deep React knowledge required for the userscript authors. Similar events dispatched in the client-side rendering hooks ( |
Thank you very much. But it might be good to put most of my scripts in But at the moment I am on several other stuff, that I need more. |
In my past
react-hydrate
|
@redactedscribe @Alfge, tell me if my quick fix did the trick for you. |
last update works fine now. Thanks |
Yep, works, thanks (on beta too)! |
Tried the "Workaround is to make this script near or at the end of your userscript list." |
Yes, I think custom events is a good idea. |
Just updated to version 2022.6.14 and now it works for me too. |
Currently it's difficult for userscripts to determine when hydration is completed so that it's safe to modify the page. This adds a custom mb-hydration event that scripts can listen for. Based on a suggestion by @ROpdebee in jesus2099/konami-command#596 (comment)
Currently it's difficult for userscripts to determine when hydration is completed so that it's safe to modify the page. This adds a custom mb-hydration event that scripts can listen for. Based on a suggestion by @ROpdebee in jesus2099/konami-command#596 (comment)
Currently it's difficult for userscripts to determine when hydration is completed so that it's safe to modify the page. This adds a custom mb-hydration event that scripts can listen for. Based on a suggestion by @ROpdebee in jesus2099/konami-command#596 (comment)
https://musicbrainz.org/release/16caa039-aba9-45e8-9ff1-8cca8635ff52 For this release, still no comments, no ISRC, no AcoustID. |
Today, that release recording comments show up (on mobile). |
I added that same old lame react hydrate workaround (delay): e540156?w=1 |
↖ #38 – NG with release with more than 10 mediums after MBS-3841
Workaround is to make this script near or at the end of your userscript list.
We cannot see recording comments since some change on beta, that will probably occur on MBS to, soon.
Spotted by @Lotheric: #445 (comment)
Fix amounts of tracks and works in 10+ medium releasesSee Handle collapsed mediums and trimmed tracks #38Related to
The text was updated successfully, but these errors were encountered: