Page MenuHomePhabricator

Improve the interface of Special:ViewData in the Cargo extension
Closed, ResolvedPublic

Description

The Cargo extension (https://www.mediawiki.org/wiki/Extension:Cargo) defines a page, Special:ViewData, that serves two purposes: (1) to display additional query results when a user clicks on "More results" from within a main set of query results; and (2) to provide a user interface - if a user goes directly there - to run any Cargo query. For this 2nd use, the interface could be improved quite a bit: right now the UI is just some text inputs, with no autocompletion, no validation, no additional, format-based inputs, and in general no help to the user. It would be great to have a much more user-friendly interface, using autocompletion, dropdowns, and/or other form elements, so that users didn't have to, for example, guess what tables and fields exist on the wiki. It could be helpful to look at existing interfaces that do similar things - like Semantic MediaWiki's Special:Ask page, or the phpMyAdmin interface - for inspiration.

It probably also makes sense to rename Special:ViewData to Special:CargoQuery at the same time - I don't really like the name Special:ViewData any more.

Prerequisites: Knowledge of PHP, JavaScript, and Ajax, and an interest in interface design.

Mentors: Yaron Koren, Nikhil Kumar

Microtasks: T217529, T184342, T184343

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 11 2019, 4:29 AM

Hello Everyone!
I want to contribute with Wikimedia this year under GSoC 2019.

Hello everyone, I'd Like to contribute to this project as a part of GSoC 2019.

This project really looks interesting.

Please how can I set it up on my local machine, I'm using an Ubuntu 16.04 os

Alishamohanty added a subscriber: Alishamohanty.EditedFeb 5 2019, 5:44 PM

Hello, everyone! I am Alisha and I am certainly looking forward to contribute to WikiMedia. I am an aspired GSoC2019 aspirant and looking forward to having good mentorship and guidance and would like to contribute to this project. I have almost completed the setup of Cargo locally in my computer as asked. But I am facing some warning and certainly not sure if I am done with the proper setup. I am looking foward to get some tasks @Yaron_Koren. Thanks

Prosper added a comment.EditedFeb 9 2019, 3:46 AM

🙂 @priyanshu_varshney thanks for those links, they have been helpful as I'm almost done setting up my development environment.

I currently have an issue with logging into phabricator on my PC(I'm currently logged in with my Android device).

My first login to phabricator was with my Android phone and was done using the OAuth API connected to my mediawiki account. But then, I tried logging in with my PC but the OAuth Login method is prompting me to register instead of login into my already registered account. Each time I try registering with my email (used already for my initial login) I get an error message: (duplicate) "user with email already exists", I understand this totally.

But I'm confused as to why it does not give me an explicit button for logging in but keeps prompting me to register.

I'd appreciate any answer to help me solve this.

Thank you 🙂

Yaron_Koren updated the task description. (Show Details)Feb 11 2019, 12:14 AM

I finally resolved my phabricator login issue.

I downloaded google chrome(my mobile device browser) on my PC(as i was using the firefox browser previously) and my login sync automatically.

Quick request to everyone: Please do not post general development environment issues or questions about Phabricator itself in this task, as that's unrelated to the very topic of this task. See https://www.mediawiki.org/wiki/How_to_become_a_MediaWiki_hacker#Feedback,_questions_and_support - thanks a lot!

Quick request to everyone: Please do not post general development environment issues or questions about Phabricator itself in this task, as that's unrelated to the very topic of this task. See https://www.mediawiki.org/wiki/How_to_become_a_MediaWiki_hacker#Feedback,_questions_and_support - thanks a lot!

Ok, Noted.

I'm sorry for making the mistake initially.

I found the MediaWiki Developers Support helpful

I'm done with my MediaWiki installation and i'm setting up Cargo Extension on my wiki:

I included the following variables to my LocalSettings.php file:
$wgCargoDBtype
$wgCargoDBserver
$wgCargoDBname
$wgCargoDBuser
$wgCargoDBpassword

defined with the appropriate values and DataBase user and Password tailored to my wiki. Then I ran the php update.php command within the maintenance directory again. The New Database was not created.

Please Is my approach wrong?

@Prosper - again, this isn't the place for these kinds of questions. But to answer your question: you don't need to set any of those values, because you don't need a separate Cargo database. But if you do want a separate Cargo database, you have to create it yourself; the code won't create it for you.

@Prosper - again, this isn't the place for these kinds of questions. But to answer your question: you don't need to set any of those values, because you don't need a separate Cargo database. But if you do want a separate Cargo database, you have to create it yourself; the code won't create it for you.

Wow 😣😣

I'm really sorry, I really thought I could ask here since it relates to the Cargo extension.

I really appreciate the response @Yaron_Koren

Bahl24 added a subscriber: Bahl24.Feb 24 2019, 8:51 PM
Yaron_Koren updated the task description. (Show Details)Mar 4 2019, 5:02 AM

Hi I am interested in contributing to this for GSOC 2019. I already have developed an extension before (https://www.mediawiki.org/wiki/Extension:ChangeUserPasswords)
Therefore I have the right skillsets for this.
Assigning myself the microtasks :)

Looking forward to some really great work!

Change 518369 had a related patch set uploaded (by Ankita Mandal; owner: Ankita Mandal):
[mediawiki/extensions/Cargo@master] Renamed View Data to Cargo Query. Select2 library added. Does not yet fully address T213513. Bug: T213513

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

Change 521184 had a related patch set uploaded (by Ankita Mandal; owner: Ankita Mandal):
[mediawiki/extensions/Cargo@master] Added CargoQueryAutocompleteAPI and ext.cargo.query.js. Bug: T213513

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

Change 521184 had a related patch set uploaded (by Aklapper; owner: Ankita Mandal):
[mediawiki/extensions/Cargo@master] Replace select2 with jquery ui autocomplete.

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

Change 521184 had a related patch set uploaded (by Ankita Mandal; owner: Ankita Mandal):
[mediawiki/extensions/Cargo@master] Modified CargoQueryAutocompleteAPI to fetch predefined fields. Bug: T213513

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

Change 521184 abandoned by Ankita Mandal:
CargoQuery messages updated. Bug: T213513

Reason:
Final Patch is @ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Cargo/ /532246/

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

Change 518369 abandoned by Ankita Mandal:
Renamed View Data to Cargo Query. Select2 library added. Does not yet fully address T213513. Bug: T213513

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

Is there anything remaining in this task from GSoC'19? If not, then please consider marking it as resolved! If yes, and would need another GSoC or volunteer help then consider creating a new task with the leftover items. Thanks!

Yaron_Koren closed this task as Resolved.Wed, Sep 4, 12:55 AM
Yaron_Koren claimed this task.

Done!