Page MenuHomePhabricator

Make the URL in wdqs-gui for fetching examples configurable
Closed, ResolvedPublic5 Estimate Story Points

Description

Problem:
Currently when someone running a 3rd-party Wikibase instance sets up their own query service then the examples dialog still points to Wikidata's examples. They should be able to collect their own examples as these are highly dependent on the topic and existing properties/items in that particular installation.

Acceptance criteria:

  • A 3rd-party Wikibase instance can have their own page with query examples that populate the examples dialog in their query service.

The parameters @ https://github.com/wikimedia/wikidata-query-gui/blob/321b9030c5656ea8c48974e0156b8c79f1a72d49/wikibase/queryService/api/QuerySamples.js#L20-L23 should be configurable.

Note: this change will only have an effect for installations that have RESTbase and Parsoid installed and available.

Approach

  • Add constructor parameters to the QuerySamples class for all related options.
  • Add configuration to config.js for the options
  • init.js needs to then pass this config from config.js to QuerySamples

Details

Related Gerrit Patches:

Event Timeline

Addshore created this task.Oct 30 2017, 8:17 AM

Change 388035 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[wikidata/query/gui@master] WIP: optionally load query examples from action API

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

Addshore triaged this task as Medium priority.Jun 26 2018, 3:57 PM
Lydia_Pintscher moved this task from Incoming to Ready to estimate on the Wikidata-Campsite board.
Lydia_Pintscher added a subscriber: Olaf_Simons.

One option that would make this and other things we want to do with the WDQSUI easier would be to convert it from a static site to a real node js app.

But that’ll require us to rework the whole deployment process of the WDQS UI, and place extra requirements on third-party installs as well (a static site can be served from any service provider). We already have a build step before deployment – we could also apply the necessary adjustments there.

WMDE-leszek updated the task description. (Show Details)Dec 4 2018, 2:17 PM
Addshore updated the task description. (Show Details)Dec 4 2018, 2:19 PM
Addshore set the point value for this task to 5.
Addshore updated the task description. (Show Details)Dec 4 2018, 2:54 PM
Michael claimed this task.Dec 6 2018, 9:30 AM
Restricted Application added a project: User-Michael. · View Herald TranscriptDec 6 2018, 9:31 AM

Change 477977 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[wikidata/query/gui@master] Make the URL in wdqs-gui for fetching examples configurable

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

Change 477977 merged by jenkins-bot:
[wikidata/query/gui@master] Make the URL for fetching examples configurable

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

Change 388035 abandoned by Lucas Werkmeister (WMDE):
WIP: optionally load query examples from action API

Reason:
– this now has merge conflicts in all of the files it touches, and can’t work without a lot more changes, as detailed in the linked tasks.

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