Merge lp:~uriboni/webbrowser-app/search-suggestions into lp:webbrowser-app
| Status: | Superseded |
|---|---|
| Proposed branch: | lp:~uriboni/webbrowser-app/search-suggestions |
| Merge into: | lp:webbrowser-app |
| Prerequisite: | lp:~uriboni/webbrowser-app/bookmarks-in-suggestions |
| Diff against target: |
633 lines (+272/-48) 10 files modified
src/app/config.h.in (+5/-0) src/app/webbrowser/Browser.qml (+26/-5) src/app/webbrowser/SearchSuggestions.qml (+78/-0) src/app/webbrowser/Suggestion.qml (+5/-2) src/app/webbrowser/Suggestions.qml (+22/-11) src/app/webbrowser/searchengine.cpp (+13/-1) src/app/webbrowser/searchengine.h (+4/-0) tests/autopilot/webbrowser_app/tests/__init__.py (+8/-0) tests/autopilot/webbrowser_app/tests/http_server.py (+14/-1) tests/autopilot/webbrowser_app/tests/test_suggestions.py (+97/-28) |
| To merge this branch: | bzr merge lp:~uriboni/webbrowser-app/search-suggestions |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| PS Jenkins bot | continuous-integration | Needs Fixing on 2015-05-07 | |
| Olivier Tilloy | 2015-04-22 | Approve on 2015-04-28 | |
|
Review via email:
|
|||
This proposal has been superseded by a proposal from 2015-05-12.
Description of the Change
Add suggestions from search engines in the suggestions list.
| Ugo Riboni (uriboni) wrote : | # |
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:972
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:975
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Olivier Tilloy (osomon) wrote : | # |
From a very quick functional test, this seems to work nicely (I’ll do more in-depth testing and a code review later).
One thing that I noticed is that the terms are not highlighted in search suggestions, as they are for history entries and bookmarks. According to the visual spec they should be.
- 976. By Ugo Riboni on 2015-04-22
-
Suggestion title should be highlighted, was removed by mistake
| Olivier Tilloy (osomon) wrote : | # |
« This API is not official, but it is what Google products and everyone else uses to implement search suggestions. The "client=firefox" is there to request JSON output. »
Can you add this as a comment in config.h.in ?
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:976
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 977. By Ugo Riboni on 2015-04-23
-
Add comment to clarify Google suggestion URL
- 978. By Ugo Riboni on 2015-04-23
-
Add search suggestion tests and fix the ones that were failing before
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:978
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 979. By Ugo Riboni on 2015-04-23
-
Fix flake8 issues, refactor and simplify some tests, fix some broken tests
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:979
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Olivier Tilloy (osomon) wrote : | # |
I’m seeing one funny behaviour: I’m adding a custom search engine definition (https:/
There are two things to fix here:
- that XML description file seems to have a valid suggestions URL, for some reason it’s not being parsed/used, it should be
- when loading a valid XML description file that doesn’t have a suggestions URL, we shouldn’t fall back to Google, instead there shouldn’t be any search suggestions
| Olivier Tilloy (osomon) wrote : | # |
When launching the app, the address bar is not focused, so the suggestions list is not shown, yet I’m seeing a query issued to the suggestions URL with the current URL. There shouldn’t be any queries issued until the address bar has focus and its contents change.
- 980. By Ugo Riboni on 2015-04-27
-
Ask for search suggestions only when the user is typing something
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:980
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:980
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 981. By Ugo Riboni on 2015-04-28
-
Remove unnecessary property alias
- 982. By Ugo Riboni on 2015-04-28
-
Merge changes from trunk
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:981
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:982
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 983. By Ugo Riboni on 2015-05-06
-
Merge changes from trunk
- 984. By Ugo Riboni on 2015-05-06
-
Adjust order of suggestions according to new input from design. Fix tests accordingly.
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:983
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:984
http://
Executed test runs:
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:983
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Olivier Tilloy (osomon) wrote : | # |
A few minor additional remarks:
In SearchSuggestio
- QQuickItem already has an 'enabled' property, I don’t think it’s necessary to override its definition
- in resetSearch(), the request (if any) should be aborted even if !enabled
A suggestion (pun not intended): in Browser.qml, in the two instances of LimitProxyModel that populate the list of suggestions for history entries and bookmarks, properties 'icon' and 'displayUrl' can be marked 'readonly'.
Similarly, in Suggestions.qml, the new properties added can be marked readonly.
In test_suggestion
- in setup_suggestio
- In highlight_term(), this function won’t work if there’s more than one occurrence of term in text. This is arguably unimportant for the scope of the tests, but the function could be simplified (and made to work in all cases) by simply returning "<html>
- in test_search_
| Olivier Tilloy (osomon) wrote : | # |
There is now a (trivial) conflict when merging this branch into the latest trunk.
test_suggestions.py will require a bit of refactoring to make use of the newly-introduced self.data_location (revision 994) to write test search engine descriptions.
- 985. By Ugo Riboni on 2015-05-12
-
Merge changes from trunk. Refactor some AP tests.
- 986. By Ugo Riboni on 2015-05-12
-
Merge new prerequisite branch to create separate temp dir for ~/.config
- 987. By Ugo Riboni on 2015-05-12
-
More fixes due to temp locations support
- 988. By Ugo Riboni on 2015-05-12
-
Create a new "active" property instead of overriding the Item.enabled property which might have side effects. Always abort the request when resetting.
- 989. By Ugo Riboni on 2015-05-12
-
Implement suggestions from code review
- 990. By Ugo Riboni on 2015-05-12
-
Remove unnecessary sleep
| Ugo Riboni (uriboni) wrote : | # |
All suggestions implemented except for the following:
> In SearchSuggestio
> - QQuickItem already has an 'enabled' property, I don’t think it’s necessary
> to override its definition
Item.enabled has a completely different meaning tied to keyboard focus, and re-using it to do something else is wrong (and actually does not ever work since the property is toggled on and off various times by QML itself).
It was my mistake to redefine it though, as the original can't be accessed any more, so I defined a new "active" property that does the same thing, while leaving Item.enabled alone and with its original meaning.
> In test_suggestion
> - in setup_suggestio
> "http://
> test:80 requests to localhost:port
Is this a DNS mapping or a redirect of some sort ? Because it does not seem to work when using XmlHttpRequest from QML to get the list of suggestions. The responseText comes out empty, which is the way XmlHttpRequest signals errors, but I can't tell more details on why.
I spent way too much time on this already, so I will leave it as it was for now.
> - In highlight_term(), this function won’t work if there’s more than one
> occurrence of term in text. This is arguably unimportant for the scope of the
> tests, but the function could be simplified (and made to work in all cases) by
> simply returning "<html>
> self.highlight(
This does not work. In some cases I get a complain from re.py of "unbalanced parenthesis". Unless you have a quick fix I would leave it as it is.
- 991. By Ugo Riboni on 2015-05-12
-
Add project name in main cmake file, for convenience in qtcreator
- 992. By Ugo Riboni on 2015-05-12
-
Keep the server in a temporary variable, instead of in the test instance
- 993. By Ugo Riboni on 2015-05-12
-
More safely store the server in an instance variable
- 994. By Ugo Riboni on 2015-05-12
-
Do the same in the package main
- 995. By Ugo Riboni on 2015-05-12
-
Better names

Added inline comments