Page MenuHomePhabricator

Unify ways to get a link to a query in the Query Service UI
Closed, ResolvedPublic

Description

Problem:
When trying to link to a query there are two ways to do this:

  1. link to the query itself (e.g. https://w.wiki/3$KT)
  2. link to the result of the query (e.g. https://w.wiki/42jW)

The places to generate the links are in two complete different parts of the UI. This leads to a lot of sharing of the query results when people might actually want to share the link to the query itself

Solution:
Add a second link for generating the link to the query to the link menu. (We want to keep the existing one as well for now because that is also accessible before running the query.)

Screenshots:
The two places to generate links:

image.png (722×1 px, 84 KB)

We want to add an additional link here:

image.png (276×500 px, 16 KB)

BDD
GIVEN the Query Service UI
WHEN running a query
AND clicking on the link menu
THEN I can generate a link to the query as well as the query result

Acceptance criteria:

  • additional entry is added to the links menu that generates a link to the current query. Link text is "Short URL to query"

Event Timeline

Lydia_Pintscher renamed this task from Unify links to query in the Query Service UI to Unify ways to get a link to a query in the Query Service UI.Dec 1 2022, 4:29 PM

Change 864750 had a related patch set uploaded (by Michael Große; author: Michael Große):

[wikidata/query/gui@master] Add link to query that retrieved the results

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

Short note, that the link added in the patch above is not exactly the same as the link in the left sidebar. The link in the left sidebar creates a shortlink to the current editor-contents. But as the new link is part of the "Results" section, it creates a shortlink to the query that was used to retrieve the results. Even if the user has messed around with the contents of the editor afterward.

I think that this is what is intended and what makes sense, but the task description is a bit ambiguous, and so I wanted to state it here again explicitly.

Ah good catch and yes I think that's what we'd want.

Where should the link be in the list? The patch currently adds it at the beginning:

image.png (191×192 px, 9 KB)

Change 864750 merged by jenkins-bot:

[wikidata/query/gui@master] Add link to query that retrieved the results

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

Change 865050 had a related patch set uploaded (by WDQSGuiBuilder; author: WDQSGuiBuilder):

[wikidata/query/gui-deploy@production] Merging from 54e1fae23b6c18716b6bda4bba2fb3007b9b46b5

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

Change 865050 merged by Lucas Werkmeister (WMDE):

[wikidata/query/gui-deploy@production] Merging from 54e1fae23b6c18716b6bda4bba2fb3007b9b46b5

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