Merge lp:~uriboni/webbrowser-app/search-history into lp:webbrowser-app
| Status: | Merged |
|---|---|
| Approved by: | Olivier Tilloy on 2015-09-18 |
| Approved revision: | 1040 |
| Merged at revision: | 1190 |
| Proposed branch: | lp:~uriboni/webbrowser-app/search-history |
| Merge into: | lp:webbrowser-app |
| Prerequisite: | lp:~osomon/webbrowser-app/drawer-menu-actions-visible |
| Diff against target: |
1883 lines (+776/-186) 25 files modified
src/app/webbrowser/Browser.qml (+8/-4) src/app/webbrowser/CMakeLists.txt (+1/-1) src/app/webbrowser/Highlight.js (+46/-0) src/app/webbrowser/HistoryViewWide.qml (+155/-44) src/app/webbrowser/Suggestions.qml (+4/-26) src/app/webbrowser/ToolbarAction.qml (+1/-1) src/app/webbrowser/history-lastvisitdate-model.cpp (+59/-11) src/app/webbrowser/history-lastvisitdate-model.h (+8/-5) src/app/webbrowser/history-lastvisitdatelist-model.cpp (+40/-11) src/app/webbrowser/history-lastvisitdatelist-model.h (+7/-7) src/app/webbrowser/history-model.h (+8/-7) src/app/webbrowser/history-timeframe-model.cpp (+7/-0) src/app/webbrowser/history-timeframe-model.h (+1/-0) src/app/webbrowser/text-search-filter-model.cpp (+19/-16) src/app/webbrowser/text-search-filter-model.h (+5/-5) src/app/webbrowser/webbrowser-app.cpp (+2/-2) tests/autopilot/webbrowser_app/tests/test_findinpage.py (+14/-0) tests/unittests/CMakeLists.txt (+1/-1) tests/unittests/history-lastvisitdate-model/tst_HistoryLastVisitDateModelTests.cpp (+28/-6) tests/unittests/history-lastvisitdatelist-model/tst_HistoryLastVisitDateListModelTests.cpp (+27/-10) tests/unittests/qml/CMakeLists.txt (+1/-0) tests/unittests/qml/tst_HistoryViewWide.qml (+277/-15) tests/unittests/qml/tst_QmlTests.cpp (+40/-1) tests/unittests/text-search-filter-model/CMakeLists.txt (+2/-2) tests/unittests/text-search-filter-model/tst_TextSearchFilterModelTests.cpp (+15/-11) |
| To merge this branch: | bzr merge lp:~uriboni/webbrowser-app/search-history |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| PS Jenkins bot | continuous-integration | 2015-09-14 | Needs Fixing on 2015-09-18 |
| Olivier Tilloy | 2015-09-14 | Approve on 2015-09-17 | |
| Riccardo Padovani | 2015-09-14 | Pending | |
|
Review via email:
|
|||
This proposal supersedes a proposal from 2015-08-20.
Commit Message
Implement search within the history view (only from the widescreen version)
Description of the Change
Implement search within the history view (only from the widescreen version)
NOTE to reviewer: the original author of the HistoryViewWide.qml file seems to have used a mix of different indentation styles and also in some cases left blank lines with spaces. I had my editor setup to automatically remove these and enforce the standard QML style, and noticed this too late. I could go back and revert these changes but I would rather not to.
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1005
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://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1007
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:1009
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://
| Riccardo Padovani (rpadovani) wrote : | # |
Thanks for working on this.
Unfortunately, when I press CTRL+F in the history view it doesn't activate the search in the history view, but in the page behind. I think it's a problem of focus...
| Ugo Riboni (uriboni) wrote : | # |
> Thanks for working on this.
> Unfortunately, when I press CTRL+F in the history view it doesn't activate the
> search in the history view, but in the page behind. I think it's a problem of
> focus...
I can not reproduce this problem. When I press CTRL+F in the history view (widescreen) the search is activated correctly.
I updated the branch to match current trunk, but it was already working before I did that.
| Riccardo Padovani (rpadovani) wrote : | # |
Now it works - probably I did something wrong last time, sorry.
Anyway, another thing:
- Open history
- Select a day (like today)
- Search for a string that matches in others days but not today
- You have this result[0] instead of this[1] (it highlights the day but there are no results)
[0]: http://
[1]: http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1011
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1012
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://
| Olivier Tilloy (osomon) wrote : | # |
Please revert the changes to po/webbrowser-
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1014
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Olivier Tilloy (osomon) wrote : | # |
- Ctrl+H to open the history view
- Ctrl+F to activate search
- type in a few characters that will match at least one URL
- down arrow key to select the first match
- return/enter to open the URL in a new tab
-> doesn’t work
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1015
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 : | # |
Thanks for the fix. I’m seeing another weird behaviour here:
- open the history view
- in the left panel, select a date
- Ctrl+F to search, enter characters that don’t match any URL for that date, the date disappears from the left panel and the last entry in the panel is selected.
In that case, if no entry matched in the selected date, I would expect the search to fall back on "All History", not just a random date.
| Olivier Tilloy (osomon) wrote : | # |
Another minor issue:
- Ctrl+H to open history view
- Ctrl+F to start searching, this focuses the search field as expected
- Down arrow key, then Left arrow key, then Down arrow key a few times to select a given date
- From there it seems there is no way to focus again the search field (to search for entries in that specific date) without having to press the up arrow key a few times, thus de-selecting this date. I think pressing Ctrl+F again while there should focus the search field.
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1018
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://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1019
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://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1019
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://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1020
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://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1020
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://
| Olivier Tilloy (osomon) wrote : | # |
> When a cetain date is selected and the current search returns no
> results for that date, move back to the "all dates" block
This doesn’t seem to always work. In some cases, a more recent date than the one I initially selected, which has matching results, gets selected (just tested with 1st of sept, no matches for a given search string, but 2nd of sept gets selected instead of all history).
I think monitoring onCountChanged on the list in the right panel is not reliable, you should probably record which date was selected, and if it disappears from the left panel, then reset the current index.
In the visual spec (https:/
In the history view, if I long-press on an item to enter multi-selection mode, then press Ctrl+F, nothing seemingly happens, but after closing the history view find-in-page is activated on the current tab. Ctrl+F events should be swallowed when in multi-selection mode. Or maybe they should exit multi-selection mode and activate search in history. In any case they shouldn’t have an effect on a view that’s not currently visible.
Related to the above comment (and not specific to this MR, but could be fixed together with it): if find in page was activated on the current page, I think it should be turned off when opening the history view.
In Highlight.js, only the highlightTerms function should be public, the rest (global vars and helper functions) shouldn’t be exposed, can’t they be defined in the body of highlightTerms?
In HistoryViewWide
A note on the modifications you made to HistoryLastVisi
In history-
Is the first change in history-
In tst_HistoryLast
Can HistoryModelTest be renamed 'HistoryModelMock' ?
In HistoryModelTes
"efficiency is not important": I would re-word that to "efficiency is not critical". Efficiency is always important :)
In tests/unittests
- 1021. By Ugo Riboni on 2015-09-16
-
Merge changes from trunk
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1021
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://
| Ugo Riboni (uriboni) wrote : | # |
Fixed unless otherwise commented below
> In the history view, if I long-press on an item to enter multi-selection mode, then press Ctrl+F, nothing seemingly > happens, but after closing the history view find-in-page is activated on the current tab. Ctrl+F events should be
> swallowed when in multi-selection mode. Or maybe they should exit multi-selection mode and activate search in
> history. In any case they shouldn’t have an effect on a view that’s not currently visible.
Exiting select mode and entering search mode would be confusing and not symmetric, since when search mode you can't long press on items to switch to select mode.
So I am swallowing the key combo event instead.
> Related to the above comment (and not specific to this MR, but could be fixed together with it): if find in page
> was activated on the current page, I think it should be turned off when opening the history view.
Done and also exited the find in page mode when settings is shown (since when transitioning back from settings I found it really jarring to see the find in page box there)
> A note on the modifications you made to HistoryLastVisi
> entirely be replaced by a simple SortFilterModel, which is what I did here: http://
> /webbrowser-
> look good.
Since the change in UITK made it to the overlay PPA already, I switched to using SortFilterModel.
I have not removed the HistoryLastVisi
> Is the first change in history-
> QSortFilterProx
I thought so too, but apparently not. And the documentation does not say so either.
> In tst_HistoryView
> - in init(), I don’t think a call to historyViewWide
> "focus: true" on the Loader (which will forward focus as a Loader is a FocusScope)
Setting focus:true only on the Loader is not enough. On the loader and on the item inside works.
- 1022. By Ugo Riboni on 2015-09-16
-
Use a simple SortFilterModel to filter by date intead of a custom model.
Not removing the model for now as it is better done in another MR. - 1023. By Ugo Riboni on 2015-09-16
-
Properly detect when the current index in the dates list has changed automatically as result of a search, and reset index to "all dates" if it has moved to a date that is not in the list anymore.
- 1024. By Ugo Riboni on 2015-09-16
-
Intercept the Ctrl+F keypress when in select mode, so that it does not activate find in page in the tab below
- 1025. By Ugo Riboni on 2015-09-16
-
Deactivate find in page mode when entering history and settings
- 1026. By Ugo Riboni on 2015-09-16
-
Move internal highlight functions and variables within the scope of the public one
- 1027. By Ugo Riboni on 2015-09-16
-
Visually adapt the search box to match the visual spec
- 1028. By Ugo Riboni on 2015-09-16
-
Fix order of includes
- 1029. By Ugo Riboni on 2015-09-16
-
Clean up more properly in unit test
- 1030. By Ugo Riboni on 2015-09-16
-
Rename mock class
- 1031. By Ugo Riboni on 2015-09-16
-
More correctly implement HistoryModelMoc
k::addByDate - 1032. By Ugo Riboni on 2015-09-16
-
Register mock model in the correct namespace
- 1033. By Ugo Riboni on 2015-09-16
-
Remove useless code and focus via built-in properties instead of forcing on test init
- 1034. By Ugo Riboni on 2015-09-16
-
Verify text field is not initially visible before entering search mode
- 1035. By Ugo Riboni on 2015-09-16
-
Revert previous change, as the bug allowing us to use SortFilterModel
.get() properly hasn't landed yet in the UITK (a similar fix had, and I got confused) - 1036. By Ugo Riboni on 2015-09-16
-
Jump back to the search box when pressing UP from the dates list
- 1037. By Ugo Riboni on 2015-09-16
-
Correctly take into account which item is initially selected when focus is given via focus property before items are inserted, instead of being forced after items have been inserted
| Ugo Riboni (uriboni) wrote : | # |
Note: bug #1495641 has been merged but not released yet. So I reverted that specific change.
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1037
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Olivier Tilloy (osomon) wrote : | # |
In test_search_button, 'var searchQuery = findChild(
In HistoryViewWide
| Olivier Tilloy (osomon) wrote : | # |
The following block was kept:
onCountChanged: {
// when the list becomes empty as a result of searching for
// something that doesn't exist in the current date, we
// switch to the "All dates" block
if (count === 0) lastVisitDateLi
}
Is it still used now that you added explicit tracking of the selected date when searching? Shouldn’t it be removed?
- 1038. By Ugo Riboni on 2015-09-17
-
Fix typo. Remove duplicate variable declaration in unit test.
| Olivier Tilloy (osomon) wrote : | # |
Property 'terms' of 'searchQuery' should be marked readonly.
In tests/unittests
- 1039. By Ugo Riboni on 2015-09-17
-
Remove code that is not needed anymore
- 1040. By Ugo Riboni on 2015-09-17
-
Mark readonly property as readonly
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1038
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1040
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1040
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1040
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://

FAILED: Continuous integration, rev:1002 jenkins. qa.ubuntu. com/job/ webbrowser- app-ci/ 2127/ jenkins. qa.ubuntu. com/job/ generic- deb-autopilot- vivid-touch/ 3813/console jenkins. qa.ubuntu. com/job/ webbrowser- app-vivid- amd64-ci/ 881/console jenkins. qa.ubuntu. com/job/ webbrowser- app-vivid- armhf-ci/ 881/console jenkins. qa.ubuntu. com/job/ webbrowser- app-vivid- i386-ci/ 881/console jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- vivid-armhf/ 3810/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/webbrowser- app-ci/ 2127/rebuild
http://