Page MenuHomePhabricator

Add ve.dm.Model.static.allowedTypes
Closed, ResolvedPublic8 Story Points

Description

We should add ve.dm.Model.static.allowedTypes to specify which types that aren't in .static.matchTypes are also allowed to be present. It should take the following values:

  • [] to allow no other types (default)
  • null to allow any other types
  • array of string|RegExp specifying other types to allow

We should then get rid of extension specific types and the registerExtensionSpecificType( /^mw:/ ) call.

Note that this differs from the current behavior: currently, non mw:-prefixed types are allowed but no extra mw:-prefixed types are allowed. This change disallows all extra types by default, even non-mw:-prefixed ones. This probably isn't a big deal.

This will allow us to support mw:Error, and hopefully allow us to get rid of the matchFunction hack in ve.dm.MWTransclusionNode (or at least make it less hacky).

Event Timeline

Catrope created this task.May 13 2015, 7:03 PM
Catrope assigned this task to Esanders.
Catrope raised the priority of this task from to Needs Triage.
Catrope updated the task description. (Show Details)
Catrope added a subscriber: Catrope.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 13 2015, 7:03 PM
Catrope updated the task description. (Show Details)May 13 2015, 7:06 PM
Catrope set Security to None.

Change 211405 had a related patch set uploaded (by Esanders):
[BREAKING CHANGE] Allow models to specific which extra RDFa types they support

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

Change 211406 had a related patch set uploaded (by Esanders):
[PULL THROUGH] Use new allowedTypes property in model registry

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

Change 211405 merged by jenkins-bot:
[BREAKING CHANGE] Allow models to specify which extra RDFa types they support

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

Change 211406 merged by jenkins-bot:
Update VE core submodule to master (3c1f698)

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

Jdforrester-WMF closed this task as Resolved.May 18 2015, 10:15 PM
Jdforrester-WMF triaged this task as Normal priority.
Jdforrester-WMF edited a custom field.
Jdforrester-WMF moved this task from Nominated to Done on the VisualEditor 2014/15 Q4 blockers board.
Jdforrester-WMF moved this task from To Triage to Q4 on the VisualEditor board.Jun 17 2015, 11:35 PM

Change 217469 had a related patch set uploaded (by Trevor Parscal):
Remove redundant match function from block image

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

Change 217469 merged by jenkins-bot:
Remove redundant match function from block image

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