Comment 3 for bug 1475023

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

This problem goes back to February 2012, with a proposal that Ubuntu could "cover most of the use cases which require the usage of dialogs" using a new form of notification called a "snap decision" which would have very limited interactivity, just two buttons. This was implemented in the Ubuntu Touch toolkit, and real dialogs were correspondingly deprioritized.

This was a mistake that is taking years to unwind. <https://goo.gl/1qq24w> There was never a clear or useful dividing line between dialogs that need just two buttons, those that need two buttons and one text field, those that need two buttons one text field and one checkbox, those that need two buttons a text field and a radio menu, and so on.

For example, basic wi-fi authentication was implemented by adding the ability for snap decisions to contain a single password field and a single checkbox, in addition to the two buttons. But snap decisions are fundamentally incapable of doing wi-fi password validation (bug 1091391), showing connection progress in the dialog, or displaying connection errors (bug 1318732). And the kind of control combinations and interactions required for WPA2 Enterprise authentication are completely out of the question.

So, WPA2 Enterprise authentication is implemented in a completely different way, using a proper dialog. Unfortunately the Mir developers haven't yet implemented parentless dialogs, so the dialog needs a parent, and that parent is System Settings. Besides looking disjointed, this leads to the situation we have here, where System Settings hangs around (and brings the rest of the session with it) when you haven't even finished setting up the phone yet.

So, unfortunately, that something "works fine for plain PSKs" does not mean it is even possible for it to "work equally and transparently even for ... WPA2/Enterprise", because the UI is completely different code.

Fixing this requires implementing parentless dialogs, so that the authentication dialog does not need a parent, and it can float on top of the setup just as easily as it could float on top of System Settings, or on top of any other app if you chose the network from the indicator menu.

A workaround would be to duplicate -- and remember to sync any changes to -- the WPA2 Enterprise authentication UI inside the unity8 shell, so that the dialog could use the setup as its parent. That wouldn't solve the problem for choosing the network from the network indicator. And that a UI shell would need to know anything at all about wi-fi authentication would be an architectural hack. (The shell already has special knowledge of incoming phone calls, for the same reason.)

An alternative workaround would be to just prohibit you from connecting to WPA Enterprise networks in the setup process at all. This would require special-casing the network listing code (bug 1467438) so that it hid, or greyed out, enterprise networks whenever it was being embedded in the setup. It might also require adding a link to the setup screen, explaining and maybe apologizing for the problem.