The problem arises from the existing logic within the WikimediaEvents system, which currently fires events by querying client preferences for the vector skin but not for minerva (mobile) skin.
Here's a brief description of the problem:
In the existing code:
function getFont() { return mw.user.clientPrefs.get('vector-feature-custom-font-size') || '0'; }
This code checks for the presence of a <html> class named 'vector-feature-custom-font-size-clientpref-0' within Vector 2022. This approach works in the Vector 2022 skin. However, it fails to function correctly in the Minerva (mobile) skin, where a different class naming scheme is employed, specifically 'mf-font-size-clientpref-xlarge'.
The inconsistency in class naming between the vector and minerva skins is causing inaccurate event logging data for mobile users when it comes to the 'font' field. This discrepancy must be resolved to ensure that event data is reliable and uniform across both skin types.
Success Criteria Options
Option 1: Update the 'getFont()' function to account for the minerva skin's class naming scheme. Add conditional checks to determine the user's skin and fetch the appropriate class name accordingly.
Option 2: Implement a uniform class naming scheme across all skins to simplify the event logging process and ensure consistency.
Modify the WikimediaEvents logic to query client preferences for both Vector 2022 and Minerva skins, providing a comprehensive solution for accurate event logging data across all platforms.
QA Results - Beta
AC | Status | Details |
---|---|---|
1 | ✅ | T349740#9296785 |
2 | ✅ | T349740#9296785 |
3 | ✅ | T349740#9296785 |
4 | ✅ | T349740#9296785 |
QA Results - Prod
AC | Status | Details |
---|---|---|
1 | ✅ | T349740#9325223 |
2 | ✅ | T349740#9325223 |
3 | ✅ | T349740#9325223 |
4 | ✅ | T349740#9325223 |