jesus2099 / konami-command

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

[MBS] Adapt to React hydrate redraw of recording list #537

Closed jesus2099 closed 3 years ago

jesus2099 commented 3 years ago

New div.recording-list on top of table.tbland (deferred?) redrawing(/hydrate?) of its content:

https://github.com/metabrainz/musicbrainz-server/commit/53fc7e3c18ff7fd4231cb1461ee58f01f29c0f2e#diff-8faa5353a1c84c9ee6dcf90be9bd62c669390f97c07ad8cf8401a8cee0bc7a6fR137-R140

export default (hydrate<Props>(
  'div.recording-list',
  RecordingList,
): React.AbstractComponent<Props, void>);

This redraws the DOM at any time, thus wiping all what userscripts may have added.

Workaround

One way to cope with that appears to be waiting for any p.loading-message to disappear, when DOM may be stable again.

For event listeners, attach them to the body, instead.

Happens in:

Sub-issues

mb_COLLECTION-HIGHLIGHTER

mb_MERGE-HELPOR-2

mb_SUPER-MIND-CONTROL-II-X-TURBO

jesus2099 commented 3 years ago

Detach mb_MERGE-HELPOR-2 #516 as it’s a new feature request.