Page MenuHomePhabricator

Invalid prop: type check failed for prop "label". Expected Object, got Null
Closed, ResolvedPublic

Description

This prop warning is being yield in any editor form containing checkboxes which do not inform a label and just inform a control-label instead.

Warning output:

vue.js:1623 [Vue warn]: Invalid prop: type check failed for prop "label". Expected Object, got Null  
  at <ControlWrapper name="GEMentorshipAutomaticEligibility" label=null controlLabel= 
Message {map: Map, key: 'communityconfiguration-mentorship-gementorshipautomaticeligibility-control-label', parameters: Array(0)}
  ... > 
  at <BooleanControl uischema=

We should fix this by allowing both labels to be nullable and probably add a custom validator. (Ideally once validators have access to the rest of props not just the prop value in Vue3.4, see validation docs.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

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

[mediawiki/extensions/CommunityConfiguration@master] Editor: fix label warnings for boolean control

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

Sgs triaged this task as Low priority.
Sgs edited projects, added Growth-Team (Sprint 14 (Growth Team)); removed Growth-Team.
Sgs moved this task from Incoming to Code Review on the Growth-Team (Sprint 14 (Growth Team)) board.

Change #1032768 merged by jenkins-bot:

[mediawiki/extensions/CommunityConfiguration@master] Editor: fix label warnings for boolean control

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