Page MenuHomePhabricator

https://query.wikidata.org/ loads old queries instead of starting a new query
Closed, ResolvedPublic

Description

When I go to https://query.wikidata.org/, instead of getting an empty textarea to start a new query like I used to, it now loads some old query that I happened to run at some point in the past. There's no obvious way to start a new query either. That's really annoying behaviour for me because I only go to https://query.wikidata.org/ to start a new query (or occasionally to paste an existing query, which I would also want an empty textarea for).

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Smalyshev moved this task from Incoming to GUI on the Wikidata-Query-Service board.
Smalyshev subscribed.

Looks like not everybody likes the query auto-save.

@Nikki you can clear the area by clicking the "Clear" button.

I am very sorry that you don't like this feature! Is the "Clear" button helping you or would you need some setting to opt out for that feature?

I think it would be nice instead to store a history of recent queries that I did, in my local storage, and optionally be able to retrieve them.

For the record, I like query being preserved. History, of course, is even better, especially if we find a way to add it without overloading the GUI.

The problem is nobody is going to use non-standard URL. If you're already doing extra work, clicking "Clean" is easier :)

Sorry, this got a bit long...

I don't find the clear button very intuitive as a way to start a new query. I'm having trouble explaining why, but I can try: It's quite far down the page below the textarea (often off the bottom of the screen on my laptop since the query pushes it even further down), so it's not very easy to spot (assuming it's on the screen at all). It also doesn't work with how I actually react to things: When I go to the page, my intention is to start a new query and if there's an existing query there, my instinct isn't to go down the page (past the stuff I don't even want) to find a clear button at the bottom of the form, it's to abandon the current page in favour of a new one (e.g. by clicking a link back to the main page... which in this case would only lead me into an infinite loop :)). When I have no choice but to clear the form, I end up doing it manually, because it never occurs to me to start by going to the end of the form - by the time I notice/remember there's a clear button, it's too late.

I think adding a hash to the end of the URL might be a bit too subtle. I can see why you suggest that, but a stray hash at the end of the URL normally has no effect on the page and it's also not obviously saying "this creates a new query", so I think it could be a bit confusing (e.g. in particular, if some people link to it with the hash and some without, someone loading the page would sometimes see an old query and sometimes a blank query, unless you spot the pattern, it will just appear inconsistent). I think if we want a URL explicitly for new queries, something like /new would be better.

Referring to what aude said, I think the lack of a history is another problem with loading old queries. The current behaviour gets in my way because I don't have any use for loading the last query I ran: I can't be sure I won't accidentally run another query after closing a query (e.g. one of the other queries I have open or a query someone else is asking for help with), so if I want to save a query, I'll either leave it open in a tab or create a bookmark, then when I want that query again, I'll just open the tab/bookmark, not go to the main page. That means that when I do go to the main page, it's only to start a new query, and having to clear the form ends up being an extra step every single time.

I also find it weird because I don't use any other site which does anything like that, which makes it unexpected behaviour for me. The closest thing I know of is the way Phabicator saves unfinished comments, but those are specific to individual tickets and go away once saved.

I would prefer a way to make it never load the last query (since as I explained above, I have no use for it), but if people don't want that, I would at least appreciate some way of getting a page which defaults to a blank query.

Change 276736 had a related patch set uploaded (by Jonas Kress (WMDE)):
When location search equals '?new' editor content is not being restored.

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

@Nikki
When the patch is merged then you can use this URL to disable editor content restoring.

Change 276736 merged by jenkins-bot:
When location search equals '?new' editor content is not being restored.

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

Can we take a step back here and think about how often our users actually repeat the same query? I would think that the cases where people do want to run the same query often they have a link to the specific query somewhere. Which leaves the other people to having to delete the query that is stored very often because they do not need it. An obscure URL parameter doesn't solve this because anyone outside this bug report doesn't even know it exists.
If people think storing past queries is important then let's create a small history widget instead.

That depends a lot on your work pattern. I.e. I work on the same queries or similar queries a lot. Some people would never go back to the same query again. I readily admit my usage may be atypical. But then how we get typical case?

In any case, I do support history widget. I'd love to get some old queries. You kind of can do it via "back" button but it is impossible to really navigate. Something more friendly using either history or local storage would be great I think. I am even willing to give up storing last query if we get history.

Change 278930 had a related patch set uploaded (by Jonas Kress (WMDE)):
Removes restoring of last query

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

Change 278930 merged by jenkins-bot:
Removes restoring of last query

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