openaustralia / morph

Take the hassle out of web scraping
https://morph.io
GNU Affero General Public License v3.0
462 stars 74 forks source link

Add search over people #507

Closed mlandauer closed 9 years ago

mlandauer commented 9 years ago

By handle / name. Related to #103

equivalentideas commented 9 years ago

@mlandauer are you free this arvo for a real quick chat in slack about this to see if I'm on the right track with this? I'm not sure if I'm thinking in too small iterations.

Story: As a user, when I want to find a person I know on morph, I want to see them in the results when I search their name.

Louise searches Longair using the header search form looking for Mark Longair.

How does Louise distinguish between scrapers and people in the results?

I think on the results page we have a big search form with the term entered, so the person can quickly iterate through searches. This is a familiar pattern from places like github, google, stackoverflow etc.

Here's a few rough ideas for consideration for how we incorporate 'people' into the results:

  1. People and Scrapers both appear in the same list of results sorted by relevance 2015-04-21 13 33 52
  2. People are Scrapers are in separate lists on the page 2015-04-21 13 33 43 Similar to They Vote For You.
  3. Results for Scrapers and people have their own separate pages/tab panes 2015-04-21 13 33 30

I think the 3rd approach, Results for Scrapers and people have their own pages/tab panes, will be clearest of these approaches for someone looking for people and will keep the results clear for people searching for scrapers and data. It's also similar to github's approach to search.

Approach 1 with the single list makes navigation simple and, if the results are good, could make scanning and finding what you're after very quick. If there's lots of similarly relevant results it could get really messy for people trying to scan through different types of information. Also if you're looking for just scrapers, or just people, there are lots of unhelpful results.

I think Approach 2 is confusing as you're not sure if there are more results below if the first list is very long.

Displaying people/organisation items

In the results for people I think we prioritise identifying information, rather than information about their morph activity. So for people: full name, image, user name, organisations, above number of scrapers, amount of data collected. For organisations: full name, image, user name, number of members (maybe member images?), above number of scrapers etc.

I think for the first iteration we use the current display of people in lists. Further iterations can add more distinction between people and organisations if necessary, but I think the first important question is just how we get these results lists on the page in a way that is useful for all users.

equivalentideas commented 9 years ago

Notes from chat with @mlandauer .

We're gonna prototype the idea the sketch 3.

We going to try the label "Users" for the people/orgs tab, to follow Github and for simplicity.

equivalentideas commented 9 years ago

I just pushed a prototype of the 'tabbed' search navigation to branch user_search_prototype

Pretty rough but here's the vibe. The 'scrapers' tab doesn't work, I just hid those results for now to focus on the user results.

screen shot 2015-04-21 at 5 21 00 pm

equivalentideas commented 9 years ago

Do you think this is headed in the right direction @mlandauer ?

I'm not sure about the heading, maybe just 'Search' and the tabs make it clear what your searching?

mlandauer commented 9 years ago

@equivalentideas looking good to me. I see what you're saying about the heading. I think just Search would be fine.

Keep going. Maybe flesh out what info needs to be shown for the users and scrapers here?

equivalentideas commented 9 years ago

looking good to me. I see what you're saying about the heading. I think just Search would be fine.

Cool it’ll strip that back.

Keep going. Maybe flesh out what info needs to be shown for the users and scrapers here?

Ok cool. I kinda think we should leave scrapers as they are in this iteration as it feels like a separate issue?

Here's what I was thinking about displaying user info above:

In the results for people I think we prioritise identifying information, rather than information about their morph activity. So for people: full name, image, user name, organisations, above number of scrapers, amount of data collected. For organisations: full name, image, user name, number of members (maybe member images?), above number of scrapers etc.

I think for the first iteration we use the current display of people in lists. Further iterations can add more distinction between people and organisations if necessary, but I think the first important question is just how we get these results lists on the page in a way that is useful for all users.

I'll move onto that now.

mlandauer commented 9 years ago

Sorry I'm not clear. Are you saying you do or don't want to change the way users are displayed in this iteration?

equivalentideas commented 9 years ago

Sorry we should have cleared that up :)

I was originally thinking that felt like an additional iteration—and thinking more about it, maybe I should have a go at implementing the user search as above first. The only bit that feels tricky is setting up the indexing of users and then adding the routes for type=Users and type=Scrapers .

Or I could leave that to you and move on to the display of users as part of this iteration.

What do you think @mlandauer ?

mlandauer commented 9 years ago

@equivalentideas if you think you can do it, go for it. For the urls with "type=users" you simply pass those as parameters to an existing route. So, the url would be something like search_path(type: "users"). In the controller for the search action, @type = params[:type] and then you can use @type in the view to decide which tab to show. Does that vaguely make sense?

equivalentideas commented 9 years ago

Does that vaguely make sense?

@mlandauer it does :rocket: here I go.