Page MenuHomePhabricator

Search query text should carry over from keyword mode to depicts mode
Open, NormalPublic

Description

Anything entered into keywords search should carry over to depicts. See gif: if I type ‘dog’ into keyword, but change my mind and decide to search ‘dog’ with depicts statements instead, I lose my text and have to type it in again.


open in full screen to view animated gif

Event Timeline

Restricted Application added a project: Multimedia. · View Herald TranscriptNov 5 2018, 9:52 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Ramsey-WMF triaged this task as Normal priority.Nov 8 2018, 10:06 PM

This is not critical now, but will need to be addressed soon. There is the question of how this should work because, unlike the keyword box, the depicts field is not plain text (it's for "tags" that point to Q items). Is it possible to trigger the Wikibase autosuggest when the user switches from Keyword to Depicts and there's text in the textbox?

Ramsey-WMF moved this task from Untriaged to Triaged on the Multimedia board.Nov 8 2018, 10:06 PM

It is possible to carry over existing input & immediately trigger the autocomplete to force a user to select something from it (or continue typing until something relevant shows up), and probably wouldn't be a lot of work.

But do we want to handle other input type changes as well? What happens when someone goes back from depicts to keyword input? Or to/from other statements?
I agree that it's annoying to lose your input when switching to another input mode, but it'd probably also be quite annoying to have inconsistent behavior between other input type switches.

So - how exactly do we want this to work? :)

PDrouin-WMF added a comment.EditedDec 13 2018, 3:46 PM

I think any existing input in either keywords or depicts should carry over when switching between the two. It's expected behavior (much like entering dog in this search box carries over when switching between search tabs in this example: https://www.worldcat.org/).

If a user selects depicts: dog with the qualifier color: brown, and decides to use keyword searching again, the input could just become dog brown as keywords.

I think it's safe to assume (for now, until further testing/feedback with the community) that searching with other statements is different enough from the other two input modes. Hopefully it will be apparent that multiple statements can't switch between either keywords and depicts because of this.

@Ramsey-WMF, what say you?

matthiasmullie added a comment.EditedDec 17 2018, 2:05 PM

We *could* carry over additional properties (e.g. depicts: dog color: brown -> dog brown) to the keywords input when switching from depicts, but that's just 1 specific example.
I'm not sure this behavior is desirable for other properties. E.g. I don't think the following examples make much sense:

  • depicts: dog position: foreground -> dog foreground
  • depicts: dog color: is not: brown -> dog brown
  • depicts: dog quantity: less than: 5 quantity: greater than: 2 -> dog 5 2

And also: if we're then going back from keywords dog brown to depicts, we'd end up with 2 terms (depicts: dog depicts: brown) unless we somehow keep track of the original state (but then what if people start modifying the terms in keywords? also, it'd be a huge amount of work)
CORRECTION: we'd end up with dog brown, which would probably not have a wikidata entity and would force people to select something else (depicts: dog, probably) and then completely re-do the brown part.

I'm happy to implement as described above if we feel it's worth carrying over *some* input for convenient switching, albeit losing consistency and possibly making things more confusing.
Thoughts? :)

Main reasons we'd want to carry over some input between search modes:

  1. people start typing in keywords and then realize they want depicts, which is only really useful to carry over the text if only 1 search term that would have 1 wikidata item in depict's autocomplete
  2. people start using depicts, don't find the results they're looking for, and try to fall back to a broader keyword search, where it would make sense to try to carry over as much of the details they've added already (e.g. depicts: dog color: brown -> dog brown)

Unfortunately, both of these use cases will likely come with data loss when switching:

  1. keywords -> depicts: as soon as they'd start typing multiple keywords (e.g. paris night), carrying over the input becomes pretty useless - in depicts, they'd be prompted to select paris from the autocomplete, then restart typing night to select that item.
  2. depicts -> keywords: (as mentioned in previous comment with some examples), this would be hard to do well with some other qualifiers (e.g. quantity) or operators (e.g. is not)

And because of this, switching back and forth without losing at least some of the input, is virtually impossible (except for the simplest of inputs)

Are there any other use cases that could benefit from carrying over the input?
And is it worth trying to carry over some of the input (even while losing some data), given that they won't be able to just switch back? (and is that better than not carrying over any input at all?)

And is it worth trying to carry over some of the input

Short answer is: we don't know :)

We don't have user data/feedback yet. This started as a nice attempt to think ahead and predict user needs, but that is inherently difficult in many areas of this project so I say, until we know more about what people really want, we put this idea on the shelf.