Merge lp://qastaging/~mikemc/ubuntuone-control-panel/file-search-ipc-only into lp://qastaging/ubuntuone-control-panel
Status: | Merged |
---|---|
Approved by: | dobey |
Approved revision: | 394 |
Merged at revision: | 396 |
Proposed branch: | lp://qastaging/~mikemc/ubuntuone-control-panel/file-search-ipc-only |
Merge into: | lp://qastaging/ubuntuone-control-panel |
Diff against target: |
527 lines (+266/-78) 2 files modified
ubuntuone/controlpanel/gui/qt/share_links_search.py (+49/-33) ubuntuone/controlpanel/gui/qt/tests/test_share_links_search.py (+217/-45) |
To merge this branch: | bzr merge lp://qastaging/~mikemc/ubuntuone-control-panel/file-search-ipc-only |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
dobey (community) | Approve | ||
Michał Karnicki (community) | Approve | ||
Review via email:
|
Commit message
- Do all filename searching via IPC - allows fuzzy searching and avoids display bug with fast typing.
Description of the change
- Do all filename searching via IPC - allows fuzzy searching and avoids display bug with fast typing.
Changes to do all filename searching/filtering over IPC instead of
using IPC for the first letter and in-process filtering for the
remainder. This lets us actually use the fuzzy, case-insensitive
searching from syncdaemon.
Uses reactor.callLater to delay and then coalesce IPC calls, reducing
IPC traffic.
Avoids updating results popup while searches are in progress, so that
result-paginating code does not get confused by fast typing.
Adds tests for the above changes - testing delayed call logic and a
specific test for the fast-typing bug fix. Removed testing of filename
filtering, because that is now done in syncdaemon.
Some variable/method names were no longer properly descriptive, and
were changed for clarity.
TESTS:
tests pass on darwin/linux using python-mock (which is in buildout for darwin/windows, and installable for linux, will soon be in package deps)
IRL TEST:
assuming a file named something like ~/Ubuntu One/razzle/
1. open CP, and in the share links search box, type 'RAZZ DAZZ'. this should show that file.
so should the query 'raz daz' , etc.
2. typing 'daz' really fast should show the file. Prior to this branch, it was possible to type letters fast enough to confuse the pagination and display no matching results despite there being a match. This happened for me with a query 'bro', which should have matched about 50 files, showed no results, while typing 'b'…'r'…'o', worked correctly.
Looks good.