freelawproject / recap

This repository is for filing issues on any RECAP-related effort.
https://free.law/recap/
12 stars 4 forks source link

Add search features to RECAP extension #260

Closed mlissner closed 4 years ago

mlissner commented 5 years ago

I've been chatting with a few RECAP users, and I think we've done a rotten job of exposing the new RECAP features to them. One example that's easy to fix is searching in the RECAP Archive. One person I talked to only ever uses RECAP to download PDFs, and so had no idea the searchable Archive existed.

This is...disappointing, though not surprising — people are busy and we haven't made a big deal of this outside of our own PR channels.

I think we should do two things to fix this:

  1. Add a "search provider" to the extension. This will make it so that you can search RECAP from within your browser URL bar.

    The only downside I see to this is that some people won't want the search provider in their URL bar at all and will be annoyed it's there. I get that because I like to keep a very clean profile, but I think the annoyance of that is small and the benefit to others is potentially big.

  2. In our settings window for RECAP, we could add a search affordance. I think the loudest way to do this would be to add a search input box to the top, all the way across from left to right, but it could be done with an icon or a link too.

mlissner commented 5 years ago

Note that adding a search provider takes a query URL an icon URL and some JSON data. Super easy feature.

johnhawkinson commented 5 years ago

I think that (1) is approximately useless. It is so invisible that no one will really notice it, and those who do won't understand it. Feel free to do it, but anything else is much higher priority.

I don't quite understand what you mean in (2), could you please markup a screenshot?

mlissner commented 5 years ago

Here's a five minute mock up of one way to do it:

screenshot from 2018-09-17 17-36-56

Basically, just a big query box at the top.

johnhawkinson commented 5 years ago

Wow, and greyed out, too.

So I was expecting that you were going to place a search box on or near docket reports. While aggressive, it seems more useful.

mlissner commented 5 years ago

Don't read into the gray, I don't know where that CSS is coming from. Real version would look better.

I'd like to put something on the docket report pages too. I've considered just a button or two. Maybe one for "Search the Archive" and another for "Search this Docket".

I also want to put a button or something into RECAP such that you can create alerts for dockets from within PACER.

jraller commented 5 years ago

Is there a preference for which endpoints the two proposed searches should use?

Should they go to https://www.courtlistener.com/?type=r&q=searchterm&type=r&order_by=score+desc

Should a right click action that acts on selected text on a page be considered part of this issue as well? This could be paired with a setting that disables this feature.

mlissner commented 5 years ago

I don't think we need to get into right click actions for the moment. Keep things focused.

For the query, I think the query should be essentially what you had, but tweaked to fix a bug in our website JS:

https://www.courtlistener.com/?type=r&q=searchterm&order_by=score+desc

That'd be so cool.

If we think we'll get to issue #199, this could be a good time to add a "Search this Docket" button like we have on CourtListener docket pages:

screenshot from 2019-02-15 10-05-59

mlissner commented 5 years ago

(Of course, adding the button later when we do #199 might be easier and keep things separate. It's an easy button to add once we have a mechanism for doing that.)

mlissner commented 5 years ago

@jraller am I mistaken or did we close this before we added search to the settings drop down?

mlissner commented 5 years ago

OK, I remembered right, search hasn't been added yet to the drop down, so this should be open until that's done too.

mlissner commented 4 years ago

Well, this seems to be as done as it can be. Both Chrome and Firefox have search as a first class feature in the settings window, and Firefox users can search by doing recap my-query in their URL bar.

That doesn't work in Chrome. I'm not sure why. The docs say it should work and the code is correct. The only missing piece is that you apparently need to have the extension admin user as a verified user in the webmaster tools for the website you're searching. I just set that up, but it doesn't seem to help. Maybe there's a delay, but I haven't been impressed with how Chrome handles user-related things (for example, I tried to change the account associated with the extension twice now, but Google never actually makes the change).

Anyway, it's close enough. I don't want to spend any more cycles dealing with whatever random thing Chrome is being dumb about today.