As a query writer, I want to stop my current query from running in order to not have to wait for the timeout to kick in when I spot a mistake in my query.
Problem:
When a query is running, the UI does not let you submit a new query until the current one is finished. (You can however change the query text already.) This is annoying people repeatedly, especially when they made a mistake in the query and want to fix it, but have to wait for the query to finish before executing their fixed query.
Background:
In T136479, it was ruled out to actually stop the query execution on the server. So we are limiting ourselves to the UI here.
Screenshots/mockups:
Copy
The progress bar while the query is running stays as is
When the stop button is pressed, a permanent message is displayed. It reads: "The query was cancelled"
The tooltip when hovering over the stop button (its title) reads: "Stop query (CTRL + ESC)"
BDD
GIVEN the Wikidata Query Service
AND a query has been entered
WHEN a user runs their query
AND they want to stop it on the UI
THEN they can press the Cancel button
AND the query will stop being executed on the UI
AND users are able to run their query again
Acceptance criteria:
- The current "Execute" button is replaced by the Codex CSS-only version of the icon-only primary progressive button in size L
- A new "Cancel" button is added, using the Codex CSS-only version of the icon-only primary destructive button in size L
- Query writers can stop the currently running query in the Query UI
- Query writers receive an indication of the fact that their query was cancelled
- The query text is not changed or removed automatically. Whatever is in the query editor at the moment the query is stopped stays