jesus2099 / konami-command

power‐ups for various web sites
121 stars 25 forks source link

MASS SET WORKS’ RECORDING DATES broken with the new relationship editor #807

Open kellnerd opened 8 months ago

kellnerd commented 8 months ago

The selector for the checkboxes has changed and MB.relationshipEditor.UI.checkedWorks() no longer exists. I am trying to implement this feature with the new exposed functions.

jesus2099 commented 8 months ago

I made an attempt: https://github.com/jesus2099/konami-command/commit/24cf11e84f116301db1fe9d3a47d2ee2b993876d

But it does not work:

jesus2099 commented 8 months ago

It seems that I have to convert this feature to old school userscript where have to simulate user interactions: click pencil, focus inputs, type in inputs, press Enter.

kellnerd commented 8 months ago

I've tried to implement this yesterday, but didn't get it to do anything besides MBS trying to report an error to sentry 🤯 Today I've found a few things which I was missing when I created the necessary relationship state object and managed to create a working bookmarklet 🎉 It is currently in a separate branch: https://github.com/kellnerd/musicbrainz-scripts/compare/main...recording-dates The most complex and important stuff is in https://github.com/kellnerd/musicbrainz-scripts/commit/0e46814ff8a7a45189769b7a375d0e976a686134

Without my copies of the MBS type definitions it would have been a pain to find out which properties are expected by the exposed methods. It expects the properties of the existing relationship to be passed three times currently... maybe I should ask bitmap if this is really necessary.

jesus2099 commented 8 months ago

Hi @kellnerd, Do you have a working userscript with this feature fixed? Please link it. I will try it and most probably drop my feature in favour of your script.

kellnerd commented 8 months ago

There is only the bookmarklet version so far as I haven't thought about the UI to expose it yet. Currently the code only modifies relationships which were already existing when the editor was opened, but it should be possible to also modify new relationships and take changes into account which were made during the current editing session. I will try to support that as well.

jesus2099 commented 3 hours ago

MBS trying to report an error to sentry 🤯

How do you know when this happens? I may also often produce these remote logs, probably!