Page MenuHomePhabricator

Consider exposing Vue form components
Closed, ResolvedPublic

Description

The Cite extension is using it's own editor capability to build a custom form instead of using the generic form that CommunityConfiguration provides by defaults. Re-using some of the Vue components that CC has would speed up the development process and makes sense to avoid duplication.

Specifically mentioned the Edit summary dialog, but we should look into others like EditorMessage, etc.

The task goal is to discuss whether this is a good idea or not, and if so have a rough estimate of the work it entails.

Event Timeline

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

[mediawiki/extensions/CommunityConfiguration@master] refactor(Editor): extract app components to a shared RL module

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

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

[mediawiki/extensions/Cite@master] poc(community-configuration): load component from Editor common module

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

After discussing with engineers our proposal would be to expose a limited set of components that facilitate the common features to build around form control such as validation and permissions errors. @awight @WMDE-Fisch let us know what do you think of this approach (see attached patches) and if it would satisfy your immediate needs. In the future we're thinking that as the work from T375220: [EPIC] Develop a set of shared MediaWiki-specific Codex components in MW Core evolves, some of these components could be up-streamed to core and loaded individually.

After discussing with engineers our proposal would be to expose a limited set of components that facilitate the common features to build around form control such as validation and permissions errors. @awight @WMDE-Fisch let us know what do you think of this approach (see attached patches) and if it would satisfy your immediate needs. In the future we're thinking that as the work from T375220: [EPIC] Develop a set of shared MediaWiki-specific Codex components in MW Core evolves, some of these components could be up-streamed to core and loaded individually.

Thanks for stitching this together so quickly @Sgs . Makes sense from the first impression I think that's what I was looking for. - Anything to add @awight ?

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

Change #1118085 merged by jenkins-bot:

[mediawiki/extensions/CommunityConfiguration@master] refactor(Editor): extract app components to a shared RL module

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

The module ext.communityConfiguration.Editor.common exposes the set of Vue components the extension uses internally for the editing workflow. The list of available components is:

  • ClientErrorMessage
  • EditorMessage
  • EditSummaryDialog
  • GenericSubmitErrorMessage
  • MissingPermissionsNoticeMessage
  • NetworkErrorMessage
  • PermissionsErrorMessage
  • SuccessMessage
  • ValidationErrorMessage

Sadly we don't have docs for these yet, so best reference is the source. We will document this better soon but Growth needs to discuss best way of doing it. Hope this set suits your immediate needs, feedback welcome, cc @awight @WMDE-Fisch

Testing note: the editor UI should stay intact after this change, just checking the UI doesn't break should be sufficient, cc @Etonkovidova