HomePhabricator

searchSatisfaction: Allow for async initialisation

Description

searchSatisfaction: Allow for async initialisation

The Vue.js-based search autocomplete widget is mounted only after the
user clicks the server-rendered search input.

Prior to this change, the SearchSatisfaction instrument would select
qualifying search inputs on DOMContentLoaded. Consequently, there's a
race between the Vue.js-based search autocomplete widget mounting and
the SearchSatisfaction instrument loading.

Update the SearchSatisfaction instrument to initialise when the above
events bubble to the body element. This correctly initialises the
instrument when the the user interacts with the server-rendered search
input before and after the Vue.js-based search autocomplete widget has
mounted.

Bug: T274869
Change-Id: I2710b28ea75037174c6309491dfa81ebb012225f

Details

Provenance
phuedxAuthored on Mar 10 2021, 12:33 PM
Parents
rEWMV69eb6cc2fe8e: Session tick: Lazily evaluate data-qa group membership
Branches
Unknown
Tags
Unknown
References
refs/changes/59/670459/1
ChangeId
I2710b28ea75037174c6309491dfa81ebb012225f