Merge lp://qastaging/~uriboni/webbrowser-app/find-in-page into lp://qastaging/webbrowser-app
- find-in-page
- Merge into trunk
Status: | Rejected |
---|---|
Rejected by: | Olivier Tilloy |
Proposed branch: | lp://qastaging/~uriboni/webbrowser-app/find-in-page |
Merge into: | lp://qastaging/webbrowser-app |
Diff against target: |
647 lines (+351/-51) 9 files modified
debian/control (+2/-2) src/app/actions/FindInPage.qml (+27/-0) src/app/webbrowser/AddressBar.qml (+63/-22) src/app/webbrowser/Browser.qml (+23/-6) src/app/webbrowser/Chrome.qml (+71/-21) tests/autopilot/webbrowser_app/emulators/browser.py (+11/-0) tests/autopilot/webbrowser_app/tests/http_server.py (+5/-0) tests/autopilot/webbrowser_app/tests/test_findinpage.py (+134/-0) tests/unittests/qml/tst_AddressBar.qml (+15/-0) |
To merge this branch: | bzr merge lp://qastaging/~uriboni/webbrowser-app/find-in-page |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Olivier Tilloy | Disapprove | ||
Riccardo Padovani (community) | Needs Fixing | ||
PS Jenkins bot | continuous-integration | Needs Fixing | |
Ugo Riboni (community) | Approve | ||
Review via email:
|
Commit message
Implement the "Find in Page" feature.
This bumps the runtime dependency on liboxideqt-
Description of the change
Implement the Find in Page feature in the browser UI according to the UX spec.
The only difference from the spec is the fact that results counter comes before the clear button. This is because the UI Toolkit component TextField does not support adding components after the clear button.
Needs this oxide branch to work: https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:986
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:991
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Olivier Tilloy (osomon) wrote : | # |
Thanks for working on this. I did a first quick round of testing review, here are a few comments, in no particular order:
The flake8 unit test is failing.
The label of findInPageCounter should be i18n’d, with a proper TRANSLATORS comment.
As a consequence, autopilot tests shouldn’t rely on the value of that label. Can we somehow expose the values of current and count as properties of the label, for testing purposes?
It appears findInPageMode is never assigned a default value. Not sure whether javascript (and its QML implementation) specifies that booleans are false by default, but it would be cautious to have it default to false.
87 + value: textField.
Shouldn’t the above be [textField.
« This is because the UI Toolkit component TextField does not support adding components after the clear button »
Can you raise that with design (James Mulholland and the UITK team, to ensure they are aware of the issue?
The size of ChromeButton instances in Chrome.qml has been updated at revision 997, can you please update the new instances too?
In the autopilot emulator for the chrome, the new buttons could use a more explicit naming scheme, e.g. "find_next_
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:992
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ugo Riboni (uriboni) wrote : | # |
Fixed everything except the following:
> The label of findInPageCounter should be i18n’d, with a proper TRANSLATORS
> comment.
> As a consequence, autopilot tests shouldn’t rely on the value of that label.
> Can we somehow expose the values of current and count as properties of the
> label, for testing purposes?
I disagree with this. In my opinion numbers are not language specific and the "/" is just a random separator.
Who is going to translate a slash ?
> It appears findInPageMode is never assigned a default value. Not sure whether
> javascript (and its QML implementation) specifies that booleans are false by
> default, but it would be cautious to have it default to false.
Variables are not initialized in JS and an uninitialized variable when interpreted in boolean context has a false value, but I have fixed this for clarity.
> « This is because the UI Toolkit component TextField does not support adding
> components after the clear button »
> Can you raise that with design (James Mulholland and the UITK team, to
> ensure they are aware of the issue?
I spoke with Rae who spoke with James who said for now it is ok to do it the way we do it, and they will see with the UI Toolkit people if this can be changed in the future.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Olivier Tilloy (osomon) wrote : | # |
Thanks for the changes, they look good.
> I disagree with this. In my opinion numbers are not language specific
> and the "/" is just a random separator.
> Who is going to translate a slash ?
That’s an opinion, not an informed decision. The "n/m" formatting might look awkward is some languages, or maybe even completely meaningless. Can you check that this formatting is ok for all languages listed at https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:998
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ugo Riboni (uriboni) wrote : | # |
Looks good and fixes the issue
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:999
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ugo Riboni (uriboni) wrote : | # |
> Looks good and fixes the issue
Please ignore, commented on the wrong MR
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1000
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 1001. By Ugo Riboni
-
Update to match renaming of webview.findInPage to findController
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1001
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Olivier Tilloy (osomon) wrote : | # |
There are a couple of conflicts when merging this branch into the latest trunk, can you please resolve them?
In AddressBar.qml, can the following three new properties be marked readonly?
findInPagePattern
current
count
- 1002. By Ugo Riboni
-
Merge changes from trunk
- 1003. By Ugo Riboni
-
Reorder context menu items to match browser spec more closely
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1003
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Olivier Tilloy (osomon) wrote : | # |
> In AddressBar.qml, can the following three new properties be marked
> readonly?
> findInPagePattern
> current
> count
searchSuggestio
Is the removal of the 200 response code in HTTPRequestHand
In test_activation(), after leaving the find in page mode, can you also check that the contents of the address bar are restored? Also I think the focus should be unset on the address bar when leaving this mode (and this should be tested too). The internal.
- 1004. By Ugo Riboni
-
Merge changes from trunk
- 1005. By Ugo Riboni
-
Fix mistake in previous merge from trunk
- 1006. By Ugo Riboni
-
Ensure that focus is restored to the webview when we exit find in page mode, and that suggestions are hidden when we enter find in page mode
- 1007. By Ugo Riboni
-
Ensure that the address bar text gets back to its correct simplified status when exiting find in page mode
- 1008. By Ugo Riboni
-
Add tests for the previous changes
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1008
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 1009. By Ugo Riboni
-
Merge translations from trunk
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1009
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Olivier Tilloy (osomon) wrote : | # |
When running the unit tests in verbose mode, I’m seeing the following warning:
QWARN : QmlTests:
This could easily be addressed by setting findController to a mock in the unit test.
Since UbuntuWebView02.qml imports oxide 1.8, the runtime dependency of qtdeclarative5-
In AddressBar.qml:
- I don’t think the changes to the 'visible' property of the favicon and the 'name' property of the Icon with id 'action' are useful, given that the parent item is invisible when findInPageMode is true.
- In the findInPageCounter Label, instead of #5d5d5d, use UbuntuColors.
In Browser.qml:
- The 'findinpage' action should be enabled only if !chrome.
- 1010. By Ugo Riboni
-
Remove find in page conditional code for a few things that would be hidden anyway in that mode
- 1011. By Ugo Riboni
-
Use an ubuntu color for the counter
- 1012. By Ugo Riboni
-
Enable the find in page action only when not already in that mode
- 1013. By Ugo Riboni
-
Quiet warnings by using a mock for AddressBar.
findController in qml unit tests - 1014. By Ugo Riboni
-
Bump dependency on oxide to 1.8
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1014
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Olivier Tilloy (osomon) wrote : | # |
I am not convinced the change to src/Ubuntu/
When launching the app locally I’m seeing the following message printed twice before anything else in the console:
QString::arg: Argument missing: "" , 0
Could you look into what’s causing it to be printed?
- 1015. By Ugo Riboni
-
Bump the version of oxide only where needed
- 1016. By Ugo Riboni
-
Simplify code and remove a warning
- 1017. By Ugo Riboni
-
Revert change to debian to bump dependency on oxide 1.8 in the browser component
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Olivier Tilloy (osomon) wrote : | # |
That looks good now, thanks!
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Olivier Tilloy (osomon) wrote : | # |
Note: I approved but I’m holding off the top-approval until oxide 1.8 (which this MR has a hard dependency on) is released.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1017
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1017
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 1018. By Ugo Riboni
-
Merge changes from trunk
- 1019. By Ugo Riboni
-
Leave find in page mode when toggling private browsing on and off
- 1020. By Ugo Riboni
-
Enter and Shift+Enter navigate through search results
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:1020
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Riccardo Padovani (rpadovani) wrote : | # |
Great feature!
Some comments:
- it's impossible now to enter an address and press enter to navigate (search in page intercept the enter key?)
- I expect CTRL+F to use the search
- How could I esc the search mode? ESC button doesn't work, and clicking the back arrow is a bad UX IMO
- I see it's by design you don't trigger the search if only one character is in the textfield, but it's a bit confusing IMO, because all other browsers highlights only one char, so the first time I entered a char I expect it to be evidenced: if nothing is highlighted, I think there isn't any occurrence of that char in the page
Other than that, looks awesome to me, thanks :-)
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Olivier Tilloy (osomon) wrote : | # |
There are now conflicts when merging this branch into the latest trunk.
Additionally the QML unit tests are failing with errors like this:
AddressBar.
And as pointed out by Riccardo, validating a URL in the address bar with Enter doesn’t work any longer, and Ctrl+F should activate the find in page mode.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Olivier Tilloy (osomon) wrote : | # |
Haven’t done a proper review yet, but here’s one preliminary remark: you’ll need to bump the dependency on liboxideqt- qmlplugin to >= 1.8 in debian/control, for webbrowser-app and qtdeclarative5- ubuntu- web-plugin.