Page MenuHomePhabricator

GUI allows to run empty query
Closed, ResolvedPublic

Description

If I go to query.wikidata.org and just click "run" button without entering anything, the GUI would happily run empty query. I think it'd be better if it didn't try to run it until something has been entered

Event Timeline

It could show the cat query by default, just kidding :)

Seriously, maybe in addition to not penetrate the service with empty queries,
we could give some nice text and maybe also a button to open examples dialog.

What we need to watch out for is how the browser behaves when reopening a closed tab or something like that – I’ve run into a few websites where in such a situation the text area is still filled in (because the browser restored it), but the UI isn’t updated, so it still behaves as if required input was missing (in our case, this might mean the “run query” button would still be disabled).

Change 418723 had a related patch set uploaded (by Jonas Kress (WMDE); owner: Prssanna):
[wikidata/query/gui@master] Disallow empty query from running by showing an error message

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

Change 418888 had a related patch set uploaded (by Prssanna; owner: Prssanna):
[wikidata/query/gui@master] Disallow empty query from running by showing an error message

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

Change 418888 abandoned by Prssanna:
Disallow empty query from running by showing an error message

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

Change 418723 merged by jenkins-bot:
[wikidata/query/gui@master] Disallow empty query from running by showing an error message

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

What we need to watch out for is how the browser behaves when reopening a closed tab or something like that – I’ve run into a few websites where in such a situation the text area is still filled in (because the browser restored it), but the UI isn’t updated, so it still behaves as if required input was missing (in our case, this might mean the “run query” button would still be disabled).

Seems to work fine :)

Change 419660 had a related patch set uploaded (by Smalyshev; owner: Smalyshev):
[wikidata/query/gui-deploy@production] Merging from eeeb286cdd9bd43123b492ac5430e16886f2b8fa:

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

Change 419660 merged by Smalyshev:
[wikidata/query/gui-deploy@production] Merging from eeeb286cdd9bd43123b492ac5430e16886f2b8fa:

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

Well, this is how timeouts look now:

Screenshot-2018-3-21 Wikidata Query Service.png (923×1 px, 151 KB)

I don’t usually expect exception stack traces to look like poetry ;)

Change 421007 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[wikidata/query/gui@master] Remove extra text-center class

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

Change 421007 merged by jenkins-bot:
[wikidata/query/gui@master] Remove extra text-center class

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