This fixes a bug with setting the tab property on client-side Mixpanel events. The issue was an improperly scoped regular expression that relied on the tab search parameter to be in the first position (i.e. directly after the ? character). Now, the native URLSearchParams class is used to parse the entire search string and determine if the tab parameter has been specified. If not, it will default to the value of window.location.hash, if present.
MANUAL TESTING
Boot as normal and load any study that has clustering & expression data
Open the Chrome Dev Tools > Network tab
Query for a gene and then click into the Distribution tab and wait for the plot to load
In the network tab, find the entry for plot:violin and confirm that you see the tab parameter is correctly set:
(Note: if the violin plot renders before you click into the Distribution tab, this may be set to scatter or #study-visualize, depending on your URL state).
BACKGROUND & CHANGES
This fixes a bug with setting the
tab
property on client-side Mixpanel events. The issue was an improperly scoped regular expression that relied on thetab
search parameter to be in the first position (i.e. directly after the?
character). Now, the nativeURLSearchParams
class is used to parse the entire search string and determine if thetab
parameter has been specified. If not, it will default to the value ofwindow.location.hash
, if present.MANUAL TESTING
Distribution
tab and wait for the plot to loadplot:violin
and confirm that you see the tab parameter is correctly set:(Note: if the violin plot renders before you click into the
Distribution
tab, this may be set toscatter
or#study-visualize
, depending on your URL state).