Page MenuHomePhabricator

Migrate GrowthExperiments to Vue 3
Closed, ResolvedPublic

Description

See migration instructions in T289020.

This code was written after the first part of the Vue 2->3 migration, so there hopefully shouldn't be much to migrate.

Modules/folders

  • vue-components
  • MentorDashboard. Nice to have T340104
  • NewImpact

Checklist per module

  • Review v-bind order conflicts
  • Review is only used in <component>
  • Clean deprecation warnings.
  • Add compilerOptions: { whitespace: 'condense' },to components definition
  • Test with core patch

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Catrope added a subscriber: egardner.
Sgs updated the task description. (Show Details)
Sgs updated the task description. (Show Details)

Change 932203 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/extensions/GrowthExperiments@master] Mentor dashboard: migrate to Vue 3

https://gerrit.wikimedia.org/r/932203

Sgs moved this task from Inbox to Triaged on the Growth-Team board.

Change 932203 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Mentor dashboard: migrate to Vue 3

https://gerrit.wikimedia.org/r/932203

Change 933607 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/extensions/GrowthExperiments@master] NewImpact: migrate to Vue 3

https://gerrit.wikimedia.org/r/933607

Sgs changed the task status from Open to In Progress.Jun 27 2023, 7:00 PM
Sgs moved this task from In Progress to Code Review on the Growth-Team (Sprint 0 (Growth Team)) board.

Change 933607 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] NewImpact: migrate to Vue 3

https://gerrit.wikimedia.org/r/933607

Sgs changed the task status from In Progress to Open.Jul 4 2023, 2:47 PM
Sgs moved this task from Code Review to QA on the Growth-Team (Sprint 0 (Growth Team)) board.

Note for QA engineers; only the mentor dashboard and the (new) impact module are affected by this change. For testing we should check that "nothing is broken" and that the Vue warnings ([Vue warn]:...) thrown in the JS console are safe to ignore, see warnings that can be ignored.

Change 936255 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/extensions/GrowthExperiments@master] Mentor dashboard: add Vue compiler options

https://gerrit.wikimedia.org/r/936255

Even with the new patch I just +2'ed, I can see a new warning present:

[Vue warn]: (deprecation ATTR_FALSE_VALUE) Attribute "aria-disabled" with v-bind value `false` will render aria-disabled="false" instead of removing it in Vue 3. To remove the attribute, use `null` or `undefined` instead. If the usage is intended, you can disable the compat behavior and suppress this warning with:

  configureCompat({ ATTR_FALSE_VALUE: false })

  Details: https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html 
  at <CdxMenuItem key=5 ref_for=true ref=fn<ref>  ... > 
  at <CdxMenu id="cdx-select-menu-3" ref="menu" selected=10  ... > 
  at <CdxSelect selected=10 onUpdate:selected= (2) [ƒ, ƒ] class="ext-growthExperiments-DataTableLimit__select"  ... > 
  at <Anonymous limit-options= (5) [5, 10, 15, 20, 25] limit=10 onUpdate=fn<bound onLimitChange> > 
  at <Anonymous key=0 class="ext-growthExperiments-MenteeOverview__table" limit=10  ... > 
  at <App>

Not sure how that got (re)introduced? It doesn't seem to break anything with or without the core patch though.

Change 936255 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Mentor dashboard: add Vue compiler options

https://gerrit.wikimedia.org/r/936255

Even with the new patch I just +2'ed, I can see a new warning present:

[Vue warn]: (deprecation ATTR_FALSE_VALUE) Attribute "aria-disabled" with v-bind value `false` will render aria-disabled="false" instead of removing it in Vue 3. To remove the attribute, use `null` or `undefined` instead. If the usage is intended, you can disable the compat behavior and suppress this warning with:

  configureCompat({ ATTR_FALSE_VALUE: false })

  Details: https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html 
  at <CdxMenuItem key=5 ref_for=true ref=fn<ref>  ... > 
  at <CdxMenu id="cdx-select-menu-3" ref="menu" selected=10  ... > 
  at <CdxSelect selected=10 onUpdate:selected= (2) [ƒ, ƒ] class="ext-growthExperiments-DataTableLimit__select"  ... > 
  at <Anonymous limit-options= (5) [5, 10, 15, 20, 25] limit=10 onUpdate=fn<bound onLimitChange> > 
  at <Anonymous key=0 class="ext-growthExperiments-MenteeOverview__table" limit=10  ... > 
  at <App>

Not sure how that got (re)introduced? It doesn't seem to break anything with or without the core patch though.

@Urbanecm_WMF - I didn't encounter that one, there is another vue warning on Special"MentorDashboard page that is not on the list of Migration_warnings_that_can_be_ignored

[Vue warn]: (deprecation ATTR_FALSE_VALUE) (2) 
 at <CdxSelect selected=15 onUpdate:selected= (2) [ƒ, ƒ] class="ext-growthExperiments-DataTableLimit__select"  ... > 
 at <Anonymous limit-options= (5) [5, 10, 15, 20, 25] limit=15 onUpdate=fn<bound onLimitChange> > 
 at <Anonymous key=0 class="ext-growthExperiments-MenteeOverview__table" limit=15  ... >

Any concerns?

@Urbanecm_WMF - I didn't encounter that one, there is another vue warning on Special"MentorDashboard page that is not on the list of Migration_warnings_that_can_be_ignored

[Vue warn]: (deprecation ATTR_FALSE_VALUE) (2) 
 at <CdxSelect selected=15 onUpdate:selected= (2) [ƒ, ƒ] class="ext-growthExperiments-DataTableLimit__select"  ... > 
 at <Anonymous limit-options= (5) [5, 10, 15, 20, 25] limit=15 onUpdate=fn<bound onLimitChange> > 
 at <Anonymous key=0 class="ext-growthExperiments-MenteeOverview__table" limit=15  ... >

Any concerns?

At the time of writing this comment the warning is gone. Maybe because the underlying component causing it (Codex's Select) has been refactored. In any case Migration_warnings_that_can_be_ignored mentions about this warning annoyingly sticking after the migration process is done so no concerns about it.