Page MenuHomePhabricator

[Replace/Prefill] Examples in the QueryService
Open, HighPublicFeature

Description

Background

When using the QueryService, in the UI the user is supported with "Examples" in the top. This serves to help people trying to get information out of Wikibase to understand how querying works and how to structure their own queries. In Wikibase Cloud, these examples are by default empty. Administrators can add these Examples themselves, but this requires them to be familiar with Wikibase or somewhat versed to understand how to do this. In Wikidata, these examples are provided by WMDE.

Story

As a novice manager of a Wikibase Cloud instance, when I use the Query Service UI in the beginning of my journey, I want to understand how to populate the SPARQL query examples, so they would be available for the users of my instance.

Acceptance Criteria

  • For Cloud instances that have no examples configured yet, there is a 'default' example shown in the QS UI Examples pop-up (see wireframes),
  • For Cloud instances that have at least some example configured, the default example is not shown. TBC with UXUI
  • A link to the documentation is shown in the banner.

Screenshot from 2023-12-14 16-02-09.png (570×1 px, 32 KB)

Figma link

Event Timeline

Evelien_WMDE renamed this task from Add Wikidata Examples to the QueryService to [Replace/Prefill] Examples in the QueryService.Dec 14 2023, 3:07 PM
Evelien_WMDE updated the task description. (Show Details)
Anton.Kokh triaged this task as Medium priority.Jun 11 2024, 3:27 PM
Anton.Kokh raised the priority of this task from Medium to High.Jun 14 2024, 2:30 PM

This came up in the novice user research

@Charlie_WMDE
Could you have a look at the ticket?

We have have documentation that describes how to pre-fill examples: https://www.mediawiki.org/wiki/Wikibase/Wikibase.cloud/FAQ#How_can_I_add_examples_to_the_Query_Service_interface?
Pre-filling the examples with default queries is not too meaningful, because examples need to respect the data model of a specific instance. In the documentation, I used one universal example that can be run on all instances. Maybe we could use this example as default?

@Anton.Kokh hey Anton, i had a look and I mocked my suggested solution in figma (linked in description). Feel free to leave me feedback there :)

@Charlie_WMDE Thanks, it looks good!
I added a comment with the name of the example query

Note to self: we did receive confirmation from the Wikidata team that we can introduce changes to this part of the interface upstream - see T358602

@Charlie_WMDE
I updated the description with more refined requirements and came up with some questions about the desired behavior.

Do we want this example also shown for users who already configured some examples of their own?
Should this example show up on the page where they are supposed to configure it (Project:SPARQL/Examples)?
If we want the default example to show up on the page, maybe we don't need to provide the link to documentation, but instead provide the link directly to the page where examples belong on the instance?