Page MenuHomePhabricator

[WDQS-GUI] WDQS UI uses deprecated DOMSubtreeModified to update query helper width
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Load https://query.wikidata.org on Edge Dev 127 (or probably Chrome Dev)
  • There is no obvious issue but a deprecation warning/violation fires

What happens?:
The following warnings are logged in the console:

vendor.min.fb6bdb8….js:1 [Violation] Listener added for a 'DOMSubtreeModified' mutation event. This event type is deprecated, and will be removed from this browser VERY soon. Usage of this event listener will cause performance issues today, and represents a large risk of imminent site breakage. Consider using MutationObserver instead. See https://chromestatus.com/feature/5083947249172480 for more information.
vendor.min.fb6bdb8….js:1 [Deprecation] Listener added for a 'DOMSubtreeModified' mutation event. This event type is deprecated, and will be removed from this browser VERY soon. Usage of this event listener will cause performance issues today, and represents a large risk of imminent site breakage. Consider using MutationObserver instead. See https://chromestatus.com/feature/5083947249172480 for more information.

What should have happened instead?:

There should have been no deprecation warning.

The code concerned appears to be in App.js (compiled to wdqs.js), _initQueryHelper,

$( '.query-helper' ).bind( 'DOMSubtreeModified', _.debounce( function () {
    self._updateQueryHelperMinWidth();
    self._updateQueryEditorSize();
}, 100 ) );

Overriding to remove this code removes the deprecation warning, but the width of the query helper and editor windows are no longer updated when long-named items are selected in the helper, causing them to overflow the helper panel.

The information page states:

Mutation event support will be disabled by default starting in Chrome 127, around July 30, 2024. Code should be migrated before that date to avoid site breakage.

...before offering a way to apply to extend use for a year for particular sites (or use an enterprise policy).

Other information (browser name/version, screenshots, etc.):

Microsoft Edge Version 127.0.2620.3 (Official build) dev (64-bit)

Event Timeline

Prio Notes:

Impact AreaAffected
production / end usersyes
monitoringno
development effortsno
onboarding effortsno
additional stakeholdersmaybe
ItamarWMDE renamed this task from WDQS UI uses deprecated DOMSubtreeModified to update query helper width to [WDQS-GUI] WDQS UI uses deprecated DOMSubtreeModified to update query helper width.Jul 18 2024, 1:12 PM
ItamarWMDE moved this task from Incoming to [QT] Prioritized on the wmde-wikidata-tech board.