Page MenuHomePhabricator

Move the Graph extension's TableWidget upstream to core
Closed, ResolvedPublic

Description

The TableWidget is a generic widget for editing data that is in a tabular format. It is currently implemented in the Graph extension, because it was introduced for editing <graph> nodes in visual editor.

It would be helpful to be able to make use of TableWidget for any tabular data, e.g. for editing JsonConfig's .tab pages. Therefore, make TableWidget a core widget.

This entails moving TableWidget, RowWidget and their respective model classes to core. Although put in the ve namespace, they don't really depend on visual editor, just on OOUI. Not much should need to change, beyond some renaming and small things like calling mw.msg instead of ve.msg. We'll also need to update Graph.

Event Timeline

Hi, what is "upstream" here? MediaWIki Core? OOUI? Something else?

Tchanders renamed this task from Move the Graph extension's TableWidget upstream to Move the Graph extension's TableWidget upstream to core.May 1 2020, 6:23 PM

I was thinking core. It might be generic enough for OOUI, but might be a bit uncommonly needed and heavy-weight for that library.

@Tchanders Where can I see it in action? Do you have an URL for me?

Thanks, yes, that looks like it's better located as MW core mixin.

I think that the question of which "upstream" is a good one; ideally, this actually could be generic enough to be in OOUI tiself, but I agree that it probably just increases complexity and size for probably very low usage.

Upstreaming to an MW widget sounds reasonable to me, and if we see that there's a lot more need outside of that we can also re-upstream that again into OOUI, so this can also be an iterative process if we need it to be.

Change 593861 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[mediawiki/core@master] Introduce table widget, upstreamed from the Graph extension

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

Change 593862 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[mediawiki/extensions/Graph@master] Upstream TableWidget and related classes to MediaWiki core

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

Change 593861 merged by jenkins-bot:
[mediawiki/core@master] Introduce table widget, upstreamed from the Graph extension

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

Change 593862 merged by jenkins-bot:
[mediawiki/extensions/Graph@master] Upstream TableWidget and related classes to MediaWiki core

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