Page MenuHomePhabricator

Create XTools API with namespace endpoint, using JS to update to namespace selector
Closed, ResolvedPublic3 Estimated Story Points

Description

The old XTools had an API that was used for a gadget, among other things. We want to create a new API service, but as a starting point let's only add a namespace endpoint. With that we can use JS to dynamically update the namespace selector when they change the project. If they happen to enter an invalid project, an error message will be shown and the project input field will revert back to the last valid value.

Currently forms in XTools that have a namespace selector include Pages created and Top edits.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 11 2017, 10:37 PM
MusikAnimal set the point value for this task to 3.Apr 11 2017, 10:38 PM

Relevant commit: https://github.com/x-tools/xtools-rebirth/commit/65577854b2ef7250e60d3e14930dd7816ef9d8af

This is done but we need to resolve T162753 before you can test it on Tool Labs.

MusikAnimal updated the task description. (Show Details)Apr 21 2017, 4:06 AM

Note T163527 means currently the API and namespace selector will break if you try certain projects like es.wikipedia.org or sq.wikinews.org

Samwilson closed this task as Resolved.Apr 26 2017, 1:51 AM
Samwilson added a subscriber: Samwilson.

This works in my testing.

I've made one slight change for T160721 that should take care of when there's no 'all' option (it was cloning the first <option> regardless, resulting in a duplication of Article).

MusikAnimal moved this task from Inbox to Complete on the XTools board.Jul 23 2017, 7:46 PM