isamplesorg / isamples_inabox

Provides functionality intermediate to a collection and central
0 stars 1 forks source link

Suggested enhancement: not make the user have to quote identifiers in a search #358

Open rdhyee opened 3 months ago

rdhyee commented 3 months ago

It took me a while to figure out that to search for an identifier with a colon -- e.g., IGSN:CDR0001OO , you need to put it in quotes -- e.g., "IGSN:CDR0001OO". I finally figured it out when I finally read to the end of the help hover text

image

but it would really nice if a user didn't have to do so. Maybe a little JS to look for special characters in the string and quote such strings? Seems to be very common for someone to want to search for a specific identifier by just copying that identifier with out having to then think about quoting it. (Speaking from my own experience anyhow.)

rdhyee commented 3 months ago

@datadavev and I had a convo on Slack about this issue. Let me copy the back and forth to memorialize it:

davev 13 minutes ago Hi Raymond, sorry I did not realize you were having an issue with this. Either quoting the string or escaping reserved characters with a backslash is needed

Raymond Yee 11 minutes ago @davev today, I behaved like a naive user to whom it wasn’t obvious that you needed to quote an identifier…now I know…..and I also didn’t read all the way to the end of the help message until I tried a bunch of things! (Probably like other users)….so an enhancement for the user interface, I think

davev 9 minutes ago A challenge with always quoting strings in the ui is dealing with how the query parser handles things like multiple words. A quoted phrase is a search on that string. An unquoted phrase is a search on those tokens :+1: 1

davev 8 minutes ago But there is certainly room for improvement over just taking plain strings

Raymond Yee 7 minutes ago I was trying to do what I thought was the simplest and most obvious thing to do in that search field — copy a single identifier out of one of the records and expect to be able to come up with a search that returned that specific record. That’s why I was surprised by the need to quote that identifier.

Raymond Yee 6 minutes ago I wasn’t even thinking about more complicated cases in which there might be multiple words in an identifier field….

Raymond Yee 5 minutes ago At any rate, I hope that my details here is useful as a narration of one specific user was thinking when encounter the UI.

davev 3 minutes ago :+1:

dannymandel commented 3 months ago

I think this is a great suggestion! We could have a set of known identifier prefixes (I know of 3) and automatically quote a search string if it starts with the prefix.