Skip to content

Full content width search results - #12653

Merged
MorrisJobke merged 44 commits into
masterfrom
full_content_search_results
Jan 6, 2015
Merged

MorrisJobke merged 44 commits into
masterfrom
full_content_search_results

Conversation

@butonic

@butonic butonic commented Dec 6, 2014

Copy link
Copy Markdown
Contributor

This introduces

  • Full content width search results
  • OC.Search
  • icons instead of type text
  • formatters and handlers for search results
  • cleans up css
  • uses mime instead of mime_type
  • deprecates OC.search.customResults and OC.search.resultTypes
  • by default only handles generic search results
  • comes with formatters and handlers for file and folder types
  • restores the old result template when no formatter is present for a specific type to ensure backwards compatibility

@PVince81 how do I get the mimetype icon for a file when I am in the contacts app? How do I better encapsulate OC.Search?

@jancborchardt @MTRichards UI / css input is very welcome. I wanted to get this out as the first draft to discuss it.

TODO

  • better formatters and handlers for calendar, contacts, bookmarks ...
  • remove resultTypes and customResults
  • don't lazy load the search result js & css stuff to make it more themable?
  • ajax scrolling for results

cc @andrewsbrown @MorrisJobke

Comment thread core/js/js.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a good opportunity to move search to a separate file ? (with matching JS unit tests)

@jancborchardt

Copy link
Copy Markdown
Contributor

Can we make it so that the search directly modifies the list of files? Currently it overlays the whole content area, but what it really should do is cut down on the files which are shown.

That means it should still be possible to see the breadcrumbs, upload/new file, and be able to perform actions on files you searched for like sharing, deleting etc.

@PVince81

Copy link
Copy Markdown
Contributor

Or add a new dynamic list in the side bar "Search results" and have that section implement its own version of the file list (extended from OCA.Files.FileList.

Comment thread core/ajax/preview.php

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An oversight unrelated to the actual search feature. But it fixes some 500 errors when loading mime icons in the search results

@jancborchardt

Copy link
Copy Markdown
Contributor

Or add a new dynamic list in the side bar "Search results" and have that section implement its own version of the file list (extended from OCA.Files.FileList.

@PVince81 well ideally we move the search bar from the header into the sidebar anyway – otherwise it gets very confusing what modifies the content and what not.

@PVince81

Copy link
Copy Markdown
Contributor

Modifying the content is probably not a good idea because the file list currently shown isn't always the main file list, could be the share list, etc. Unless the search is supposed to apply itself on the current list ? If yes, then fine.
If not, if it's more like a global search that shows file results in a file list, then it should have its own section + file list view.

@jancborchardt

Copy link
Copy Markdown
Contributor

The search is first and foremost supposed to be a filter, so primarily it should indeed be applied to the current list. Further results could also be shown below, but important is the current view.

@butonic
butonic force-pushed the full_content_search_results branch from df582be to 74c4719 Compare December 11, 2014 16:25
@butonic

butonic commented Dec 11, 2014

Copy link
Copy Markdown
Contributor Author

@jancborchardt hm I implemented this the way Matt and you specified it ... filtering the filelist clashes with search because you find results from all of the directory tree. So the file results have a path and look like this:
bildschirmfoto von 2014-12-11 17 31 02

Which is why I nagged you about "filter and find": filter when typing, find when pressing enter. filter could then do what you describe, find searches everywhere (or in subfolders if the yet to implement checkbox is ticked)

@butonic

butonic commented Dec 11, 2014

Copy link
Copy Markdown
Contributor Author

An I have to disagree. search is primarily used to find out where something I know exists is. filtering is used to reduce what the user sees. finding adds content in an appropriate way, in this case full width. That was the whole point of the feature!

@butonic

butonic commented Dec 11, 2014

Copy link
Copy Markdown
Contributor Author

Appending search results to the end of the list doas not make sense because with eg. search lucene you actually want relevant documents at the top, no matter in which folder they are.

Anyway, it seems what we need to separate is filter from find, The question is how we do it. My proposal is to filter while typing and find on enter (because enter in filtering is without meaning). Another solution would be a separate search app that shows relevant content from all apps.

That app could even register an on enter pressed handler and add show a message when the user types to filter ....

hmmm that actually makes sense. @jancborchardt @andrewsbrown can we agree on moving the search code to the search app in the apps repo and making files only filter by default?

@jancborchardt

Copy link
Copy Markdown
Contributor

@butonic let’s talk about this next week in Nürnberg. The big problem with this solution is: Why replace the content area if it has significantly less mode of interaction than the content normally in there. That’s confusing.

Btw: Search and filter should not be separated. That is going to be confusing to people.

@butonic

butonic commented Dec 12, 2014

Copy link
Copy Markdown
Contributor Author

@jancborchardt I'll be on vacation after the meeting in Nürnberg and then GCX will suck up my time. Also, the deadline for OC8 is 31.12. So it would be great if we could continue this discussion before that.

One solution that seems generic if we don't want to separate fiter and find (which make up search) would be to filter the content of the app and add a footer like area to it where find results can be placed. For files we would have a filtered filelist of the current folder above find results from all files with path as in the last screenshot.

IMHO that also works for contacts, calendar, bookmarks (find not necessary), music (find not necessary), notes, mail ...

The footer could have a toolbar to further tweak the search: only in this folder and its children, search inside (when full text search is available, only images / music / mimetype x, modified in the last 3 days ...)

Is that enough input for a mockup? What do you think?

@butonic

butonic commented Dec 15, 2014

Copy link
Copy Markdown
Contributor Author

@butonic butonic self-assigned this Dec 15, 2014
@butonic butonic added this to the 8.0-current milestone Dec 15, 2014
@jancborchardt

Copy link
Copy Markdown
Contributor

@butonic looks great! Can we put the »Search results« block directly under the filtered content, in the same container? Two scrollable containers would be a bit much.

@butonic

butonic commented Dec 15, 2014

Copy link
Copy Markdown
Contributor Author

@jancborchardt Yes, the white space there does not make sense. I'll try to make it work that way. What when the list of filtered files is longer than the visible part of the filelist? If you have a folder with dozens of doc or pdf files that can easily happen. IMHO at least three search (find) results should be visible. Although that would cause two scrollbars ... let's go with appending for now. Should we somehow indicate that search (find) results are availible? maybe in the breadcrumbs? I appended (filtered) and we could also add 12 search results in other places. clicking that link would then scroll down.

@MorrisJobke

Copy link
Copy Markdown
Contributor

Jenkins PR: #13111

@MorrisJobke

Copy link
Copy Markdown
Contributor
  • search result is show in files app -> switch to trashbin -> glitch

@MorrisJobke

Copy link
Copy Markdown
Contributor
  • vanish search term if you click in the filtered list on a folder (create folder "test" in root, search for "tes" in root -> click on filtered file list -> glitch

@butonic

butonic commented Jan 5, 2015

Copy link
Copy Markdown
Contributor Author

@MorrisJobke fixed!

@MorrisJobke

Copy link
Copy Markdown
Contributor
  • it doesn't show result - spinner spins endless and result list for seach (not filter) is empty

**Edit:**Was a problem of an outdated calendar checkout

@butonic

butonic commented Jan 5, 2015

Copy link
Copy Markdown
Contributor Author

@MorrisJobke when you do what? did you clear the browser cache?

@MorrisJobke

Copy link
Copy Markdown
Contributor

@butonic Yes. I cleared the cache. I just want to search for 'Plas' and it simply just shows the spinner and no result are shown - just a spinner.

@MorrisJobke

Copy link
Copy Markdown
Contributor
  • in trashbin: if no element in current view and no result in the subfolders is present it looks like this:
    bildschirmfoto von 2015-01-06 14-14-49

@butonic

butonic commented Jan 6, 2015

Copy link
Copy Markdown
Contributor Author

@MorrisJobke fixed. `$('#elementid') always returns one result. using class fixes this

@MorrisJobke

Copy link
Copy Markdown
Contributor

@butonic And I found another problem :)

You all know of my file Plastik.docx

  • search for Pla -> search result is correct
  • append a s to search for Plas -> search result seems to be fine
  • remove the s and append a d to search for Plad -> still the same result, but it actually should list nothing
  • looking at the network tab it shows that it alwas search for Pla and doesn't update the search term -> seems to be a variable caching issue (loading of value of a cached jQuery selcetion or something like that)
  • have fun fixing another of my issues

@scrutinizer-notifier

Copy link
Copy Markdown

A new inspection was created.

@MorrisJobke

Copy link
Copy Markdown
Contributor

Now I'm fine with this 👍 Thanks for all the hard work :)

@MorrisJobke

Copy link
Copy Markdown
Contributor

I also updated the Jenkins PR ;)

@scrutinizer-notifier

Copy link
Copy Markdown

The inspection completed: 38 new issues, 9 updated code elements

@MorrisJobke

Copy link
Copy Markdown
Contributor

@icewind1991 was fine with this and now also Jenkins #13111 (comment) is fine with this -> merge

MorrisJobke added a commit that referenced this pull request Jan 6, 2015
@MorrisJobke
MorrisJobke merged commit fe45929 into master Jan 6, 2015
@MorrisJobke
MorrisJobke deleted the full_content_search_results branch January 6, 2015 15:45
@butonic

butonic commented Jan 6, 2015

Copy link
Copy Markdown
Contributor Author

cc @karlitschek @jancborchardt full content search results is in :)

@karlitschek

Copy link
Copy Markdown
Contributor

@butonic Very cool. Thanks

@jancborchardt

Copy link
Copy Markdown
Contributor

@butonic nice, finally we got it done! :) 🚀

@jancborchardt

Copy link
Copy Markdown
Contributor

Submitted two follow-up issues for some problems I found. Only nitpicking though, the overall result is DAMN AWESOME! :)

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants