Currently the VectorPrefDiffInstrumentation instrumentation checks for changes to the skinVersion key when the current skin is the skin key vector
With Vector being modelled as 2 separate skins, this logic will also need to consider the case where the skin is changed (instead of the skin version preference)
QA
IF
I go to http://localhost:8888/wiki/Special:Preferences?useskin=vector-2022 and chose the legacy 2010 version of Vector and hit save
THEN
VectorPrefDiffInstrumentation should log that I am going from skin version latest to skin version legacy.
IF
I go to http://localhost:8888/wiki/Special:Preferences?useskin=vector-2022 and chose Monobook and hit save
THEN
VectorPrefDiffInstrumentation should not log.
IF
I go to http://localhost:8888/wiki/Special:Preferences?useskin=vector and chose Vector (2022 version) and hit save
THEN
VectorPrefDiffInstrumentation should log that I am going from skin version legacy to skin version latest.
IF I go to http://localhost:8888/wiki/Special:Preferences?useskin=vector and modify the "Use Legacy Vector" preference and hit save
THEN
VectorPrefDiffInstrumentation should log
Developer notes
The method VectorPrefDiffInstrumentation::createEventIfNecessary should be updated to always inspect the vector key. It should look for the following scenarios:
- skin was "vector" before, now "vector-2022" then initial_state = 'vector1', final_state = 'vector2'
- skin was "vector-2022" before, now "vector" then initial_state = 'vector2', final_state = 'vector1'
It should check this before checking the skin version field.
Note, we can drop any events for any preference changes that change both the skin and skin version keys in the same change. These should be impossible with the UI, so would indicate someone testing/hacking.