Loomio

Search

James McCann PublicSeen by 24

Attached mockup of how the search bar might fit into the context of the dashboard.

https://docs.google.com/open?id=0B4_HCol896iTOFVycmp1QXBoNFE

Think it would be appropriate for this to be able to filter automatically by what group you are currently viewing but the results page should allow you to remove this filter and show all group results.

(Results page mockup coming soon)

Jon Lemmon

Awesome. That looks good to me. Interested to see the results page.

Jon Lemmon

One thing to think about... are we just going to be searching through both proposals and discussions for now, or just discussions?

If both, we'll need a way of distinguishing between proposals and discussions on the results page.

Paul Smith

So keen for this feature, I lose discussions all the time and quite often can't even remember which subgroup I'm looking through to find them haha.

For the results page I'd really like to see it just ajax filter on the dashboard so as you're typing in your search string the list of discussions is clearing out the ones that don't match. Would give users heaps more control at the dashboard level.

Benjamin Knight

Would be great to have it search through proposal titles as well - but discussion titles only would still be a great place to start if it's simpler

Alanna Irving

I like it! in the future can we have advanced search where you can search only in the title, only in certain groups/subgroups, or search by author, etc?

Jon Lemmon

@alanna - in the future we can have everything!

Alanna Irving

Flying cars! Electric cucumbers! Gyroscopic feather dusters!

James McCann

Bump - is anyone currently working on this? I've been pretty busy lately but I'd like to get back onto this one!

@jonlemmon I was hoping to break this task up, firstly doing something like the above mockup which just does a simple filtering on the discussions list using a query str to match on the title (very similar to @mentions). Following that, implementing a full text search with a results page etc. would be the next step. Thoughts?

Jon Lemmon

@jamesmccann that sounds like a great place to start to me!

If you're feeling keen, maybe try to build it outside-in with cucumber tests. Also might be a good idea to submit a pull-request early on (before you've completed it) and mention me along the way while you're building it and I can help guide you through the process wherever you run into any snags.

Jon Lemmon

Also, I reckon let's try to really sort out the spec before you start building it. So what I'm imagining is...

  • You start typing in the search box and it autocompletes
  • It should display a max of maybe 10 discussions
  • It should show a date the discussion was last posted to as well
  • Just start with search on the group page for now (and leave the dashboard till later)

Does this sound right to you? Whatever you're imagining for the behaviour, can you post a mockup of it (perhaps using balsamiq)?

James McCann

@jonlemmon Sweet as, I'll chuck down my thoughts so far.

Here's a quick "mockup" of what I've got so far, sorry was easier to do it this way than in balsamiq.
https://docs.google.com/file/d/0B4_HCol896iTdXVmTGpIaHNHWjA/edit

Basically the discussions list will be filtered against the search term on the discussion titles. So a commonly used word might still bring up multiple pages encouraging the user to be more specific. This is just an assumption that discussion titles would be the most common things searched for.

Looking ahead I was thinking a similar UI to above but with an extra search button (like the mockup here https://docs.google.com/open?id=0B4_HCol896iTOFVycmp1QXBoNFE) which will link to a "full text" discussion, context, motion, comments search with a new results page.

Let me know what you think.

Richard D. Bartlett

Nice! @jonlemmon do you think it will be significantly easier to limit the feature to just the group page? It would be really nice to have it on the dashboard...

James McCann

@richarddbartlett From the way I have seen it so far either group page or dashboard page will be fine as it just applies a filter after the list of discussions has been created.

Jon Lemmon

@jamesmccann @richarddbartlett sweet, I think you guys are right that it should work fine for either page (dashboard or group).

@jamesmccann thanks for the mockup. So I assume those results only display upon clicking the search button (and not filtering as you type)?

And just as a point-of-process - we've found that it's really useful to describe all of the actions that the user has to take within the mockup itself (e.g. "user types in 'other' into this search box, clicks the search button, and sees the results on slide #2") It might sound pedantic, but it makes understanding & agreeing upon a feature way easier.

James McCann

@jonlemmon Yeah good idea re: descriptions on the mockup. To answer the question in this instance I had actually thought it would be nice to have live filtering as you type.

The search button would take you to a results page which has more detailed results (i.e. searches comments etc not only titles).

I guess this effectively means the initial filtering of the discussions list is the same as displaying a dropdown auto-complete box underneath the search field.

Sorry if its not clear - maybe I'll come down after work and show you what I've got?

James McCann

p.s. not sure if anyone has reported this but I get two notifications for being mentioned twice in your below comment? If this is a known bug I can look at fixing it as well.

Richard D. Bartlett

Good spotting on the bug @jamesmccann, I've added it to a related card on trello.

Personally I tend to agree with your suggestion for live-filtering in a dropdown, with the search button taking you to a detailed results page. Come visit us anyway :)

mix irving

zone searches :
site wide vs. only in group/subgroup

Aaron Thornton

I have already fixed that bug.

Jon Lemmon

@aaronthornton are you sure? this is a slightly different one. it's if a user get's mentioned twice in one comment.

i'm pretty sure that the bug you fixed was a user getting notified twice when they get mentioned once in a comment.

Aaron Thornton

My bad. At least we have it covered now.

Richard D. Bartlett

Can anyone tell me the progress on this feature? @jamesmccann @jonlemmon

James McCann

See here https://github.com/jamesmccann/loomio/tree/feature/filter-search

Sorry I mentioned Jon in this branch to comment on it but he might not get notifications from my repo? I should have pull requested it.

Anyway, I've refactored as per me and Jon's sit down the other day. If Jon has a look and gets back to me with his thoughts/check over what I've done with the DiscussionsQuery so far then I can finish this off.

James McCann

@jonlemmon true! Weird I didn't see any Github or Loomio notifications in my email. My bad. I'll suss this one out asap

Jon Lemmon

@jamesmccann no worries. I find GH notifications a bit hard to keep track of myself.

James McCann

@jonlemmon yeah not the best eh. Finally got some internet at my new flat so I'll sort this over this coming weekend!

Jon Lemmon

@jamesmccann rad. I'll be away for the weekend but will have a look when I'm back on Monday or Tuesday.

James McCann

@jonlemmon @richarddbartlett I've made a pull request for this feature now. Hopefully it is all looking OK. The JS code is not the best... I would definitely want to refactor it at some stage whether in this request or another one.

At the current stage I've only tested it with my local database - might need testing on a larger one.

Aaron Thornton

Nice! Awesome to have this feature James. Works like a charm. Are the current motions still suppose to be there? I reakon is would look slicker if they waren't, but no biggy (I could get rid of them later on if your too busy) this feature rocks, it adds so much to the app.

Jon Lemmon

@jamesmccann Awesome!! Looking forward to checking it out.

I agree with Aaron that current motions should be cleared when the search is active.

James McCann

@aaronthornton @jonlemmon - sweet, latest commit should fix that. Wasn't sure about those failing specs are they unrelated?

Aaron Thornton

@jamesmccann yeah those spec have been floating around for awhile now. I just submitted a pull request that should sort them out, @jonlemmon can you merge this.