signon-ui in ubuntu-touch should use Ubuntu.Browser plugin

Bug #1177964 reported by Bill Filler
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Online Accounts: Sign-on UI
In Progress
Medium
Alberto Mardegan

Bug Description

It appears the browser component used by the webbrowser-app in ubuntu-touch is created as a qml plugin. Signon-ui should use this plugin for it's webview as there are many issues that would go away if we do and it would be consistent with the functionality of the built-in browser.

Specifically, the following things would work better:
- correct user-agent string set
- support for device rotation
- setting of proper dpr (currently the webview in signon-ui is not setting this correctly and the view is too small)
- proper sizing of window.

Related branches

Changed in signon-ui:
assignee: nobody → Ken VanDine (ken-vandine)
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Bill Filler (bfiller) wrote :

Confirmed the browser component is available as a plugin, you need to import:
import Ubuntu.Browser 0.1
And various other components are available as well, like Chrome and AddressBar

Revision history for this message
Ken VanDine (ken-vandine) wrote :

I played with this a little bit and found a couple issues:

1) Yes, it is a plugin but it is part of the webbrowser-app package, if it is going to be reused outside the app it should be split out into a separate package for the components
2) It doesn't expose the signals we need from the WebView, specifically onLoadingChanged is needed for signon-ui

Revision history for this message
Olivier Tilloy (osomon) wrote :

> 1) Yes, it is a plugin but it is part of the webbrowser-app package,
> if it is going to be reused outside the app it should be split out
> into a separate package for the components

It could be split into a separate package, yes.
However at the moment the package ships little more than the components (only the executable and a desktop file), so I don’t see this as a priority (depending on webbrowser-app is not that bad, especially considering that it’s a core app so it should be guaranteed to be present).

> 2) It doesn't expose the signals we need from the WebView,
> specifically onLoadingChanged is needed for signon-ui

Is this the only signal that you need? Or do you also need the loadProgress property, and/or others?

Revision history for this message
Ken VanDine (ken-vandine) wrote :

signon-ui ships on the desktop as well as touch, so splitting the component out would be necessary if signon-ui was to use it.

signon-ui also needs onUrlChanged

Revision history for this message
Bill Filler (bfiller) wrote :

webbrowser-app will be shipping on the desktop as well as it's required for Web Apps moving forward, so I think you're ok to depend on it.

Revision history for this message
Alberto Mardegan (mardy) wrote :

What will be the dependencies of webbrowser-app? I wouldn't like that one who wants to try out our stuff (in another distro or *ubuntu variant) has to install a lot of packages just because we were not careful with our packaging.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Today, webbrowser-app (version 0.20daily13.05.09ubuntu.unity.next-0ubuntu1) has the following dependencies:

libc6 (>= 2.4)
libgcc1 (>= 1:4.4.0)
libqt5core5 (>= 5.0.1+dfsg)
libqt5gui5 (>= 5.0.1+dfsg)
libqt5network5 (>= 5.0.1+dfsg)
libqt5qml5, libqt5quick5
libqt5sql5 (>= 5.0.1+dfsg)
libqt5widgets5 (>= 5.0.1+dfsg)
libstdc++6 (>= 4.4.0)
qtdeclarative5-hud1.0
libqt5sql5-sqlite, libqt5webkit5-qmlwebkitplugin
qtdeclarative5-qtquick2-plugin
qtdeclarative5-ubuntu-ui-toolkit-plugin
qtdeclarative5-window-plugin

I don’t think we can get rid of any of those by just splitting the current package in two.
However I agree it still makes sense to have the plugin in one package, and the binary, desktop file and other app-specific files in another one. I’ve filed bug #1178552 to track this task.

Revision history for this message
Olivier Tilloy (osomon) wrote :

I filed bug #1178601 to track the need for exposing additional properties on the Browser component.

Revision history for this message
Olivier Tilloy (osomon) wrote :

A quick update: webbrowser-app has now been split into two packages, one for the plugin and one for the actual application (just landed in trunk, might need a day or two to propagate to the archive).
The plugin has been renamed "Ubuntu.Components.Extras.Browser", and the Browser component is not available any longer. Instead, you want to use the UbuntuWebView component, which is basically an enhanced WebView.

A note on the original description of the bug: I don’t think automatic orientation support should be handled by the UbuntuWebView component, it should be up to the embedding application to deal with that.

Revision history for this message
Alberto Mardegan (mardy) wrote :

Thanks Oliver, I'll try to use it and let you know. However, I'd be much happier if you could split it out as a separate debian package as well.

Changed in signon-ui:
assignee: Ken VanDine (ken-vandine) → Alberto Mardegan (mardy)
status: Triaged → In Progress
Revision history for this message
Olivier Tilloy (osomon) wrote :

As explained in my previous comment, webbrowser-app has now been split into two packages (two *debian* packages that is).
Those are qtdeclarative5-ubuntu-ui-extras-browser-plugin and webbrowser-app (which depends on the former).

This is in lp:webbrowser-app, but I don’t think it has been released into saucy yet.

Revision history for this message
Alberto Mardegan (mardy) wrote :

Thanks Oliver! Indeed it hasn't been released yet, so I assumed it wasn't done. I'll start working on using the component anyway, it will hopefully be released before I'm done. :-)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.