Page MenuHomePhabricator

Convert Extension:Cargo to OOUI
Closed, ResolvedPublic

Description

&action=recreatedata

Before:
and After:

Special:DeleteCargoTable

Before:
and After:

Special:SwitchCargoTable

Before:
and After:

Details

Related Gerrit Patches:
mediawiki/extensions/Cargo : masterConvert Special:ViewData to OOUI
mediawiki/extensions/Cargo : masterConvert Special:SwitchCargoTable to OOUI
mediawiki/extensions/Cargo : masterCheck Widget existence before OO.ui.infuse
mediawiki/extensions/Cargo : masterConvert &action=recreatedata in OOUI
mediawiki/extensions/Cargo : masterConvert Special:DeleteCargoTable to OOUI

Event Timeline

Restricted Application added a project: User-Jayprakash12345. · View Herald TranscriptSep 7 2018, 6:58 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 458875 had a related patch set uploaded (by Jayprakash12345; owner: Jayprakash12345):
[mediawiki/extensions/Cargo@master] Convert &action=recreatedata in OOUI

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

Change 458885 had a related patch set uploaded (by Jayprakash12345; owner: Jayprakash12345):
[mediawiki/extensions/Cargo@master] Convert Special:DeleteCargoTable in OOUI

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

Change 459248 had a related patch set uploaded (by Jayprakash12345; owner: Jayprakash12345):
[mediawiki/extensions/Cargo@master] Convert Special:SwitchCargoTable to OOUI

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

Change 459254 had a related patch set uploaded (by Jayprakash12345; owner: Jayprakash12345):
[mediawiki/extensions/Cargo@master] Convert Special:ViewData to OOUI

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

Jayprakash12345 moved this task from Backlog to Doing on the MediaWiki-extensions-Cargo board.
Jayprakash12345 moved this task from Backlog to Configured on the User-Jayprakash12345 board.

@Volker_E Whole Extension is ready for OOUI, Please look at all Screen shoot.

Change 458885 merged by jenkins-bot:
[mediawiki/extensions/Cargo@master] Convert Special:DeleteCargoTable to OOUI

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

Change 458875 merged by jenkins-bot:
[mediawiki/extensions/Cargo@master] Convert &action=recreatedata in OOUI

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

@Jayprakash12345 - thanks for creating all these patches! I could never get myself to look into modifying the helper forms to use the new coding style, so I'm glad you've done the important work.

As you probably know, I've already checked in the patches for action=recreatedata and Special:DeleteCargoTable. I have some issues with the other two patches:

  • Special:SwitchCargoTable - right now, the button is blue, but it could be that the button should be red, i.e. that setSubmitDestructive() should be called. When a "switch" is done, that means that there is an "original" database table and a "replacement" database table, and the original one gets deleted, and the replacement gets renamed to the name of the original. So it's a destructive act, but it's not that destructive - maybe the equivalent of, in core MediaWiki, renaming a page and overwriting a redirect page in the process. Do you, or anyone else, have any thoughts about whether the button should be red or blue in that case?
  • Special:ViewData - I'm not sure that this is a good idea for two reasons: (1) I prefer the label to be on the same line as the input in this particular form, and (2) though right now these are just text inputs, I plan in the future to add autocompletion to some of these inputs. Any thoughts on either #1 or #2? I'm not sure if either are doable, or will be doable in the future, with OOUI.

By the way, there's one more interface provided by Cargo that could be potentially switched over to OOUI - Special:Drilldown. It already includes autocompletion, though - is that the reason why you didn't include it in this set?

  • Special:SwitchCargoTable - The button should be red or blue in that case?

I think we should use a Red button. But I want to @Volker_E's answer on that from UI point of view.

  • Special:ViewData - I prefer the label to be on the same line as the input in this particular form,

Nope, I had same question sometime before. But I got the answer from Volker_E, See T192099#4183399

I plan in the future to add autocompletion to some of these inputs.

You can do it, HTMLForm has many numbers of Autocomplete widget like title, username & email etc. But You can also implement custom Autocomplete. this will easy because there are already have numerous example. & also T188892 will be complete soon.

Is that the reason why you didn't include it in this set?

No, I had only checked Specials/* files. Now I got it.

Change 459271 had a related patch set uploaded (by Jayprakash12345; owner: Jayprakash12345):
[mediawiki/extensions/Cargo@master] Check Widget existence before OO.ui.infuse

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

Check Widget existence before OO.ui.infuse

I got an error on creating the new Table, The console says Widget is not found. This is because when we go to create a new table. $tableExists is return false. and OOUI\CheckboxInputWidget does not execute as expected. But OO.ui.infuse want to infuse "#createReplacement". And So the error comes. The above patch should fix it.

Change 459271 merged by jenkins-bot:
[mediawiki/extensions/Cargo@master] Check Widget existence before OO.ui.infuse

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

  • Special:SwitchCargoTable - The button should be red or blue in that case?

I think we should use a Red button. But I want to @Volker_E's answer on that from UI point of view.

No, staying with primary progressive flagged (“blue“ or Accent50) button is right here, as there's no data loss implied.

Change 459248 merged by jenkins-bot:
[mediawiki/extensions/Cargo@master] Convert Special:SwitchCargoTable to OOUI

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

@Jayprakash12345 and @Volker_E - thanks for all your help with this. The changes to action=recreatedata, Special:DeleteCargoTable and Special:SwitchCargoTable have now been merged in. That may be it as far as Cargo's special pages, though - for Special:Drilldown and Special:ViewData, I think the autocompletion (or, in the case of Special:ViewData, planned autocompletion) is more complex than what HTMLForm/OOUI currently supports. I did, however, just check in some changes to Special:ViewData to make the inputs more closely resemble those of HTMLForm/OOUI (taller and wider).

Change 459254 abandoned by Jayprakash12345:
Convert Special:ViewData to OOUI

Reason:
Per Yaron Koren

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

Jayprakash12345 closed this task as Resolved.Sep 12 2018, 3:19 AM
Jayprakash12345 claimed this task.
Jayprakash12345 removed a project: Patch-For-Review.
Jayprakash12345 updated the task description. (Show Details)
Jayprakash12345 removed a subscriber: gerritbot.