Merge ubiquity:gtk-show-passwords into ubiquity:master

Proposed by Łukasz Zemczak
Status: Merged
Merged at revision: 6b6cb1924317548ec4adfbcba881cbcd2a4b5763
Proposed branch: ubiquity:gtk-show-passwords
Merge into: ubiquity:master
Diff against target: 85 lines (+26/-1)
5 files modified
debian/changelog (+6/-1)
gui/gtk/stepPartCrypto.ui (+2/-0)
gui/gtk/stepUserInfo.ui (+2/-0)
ubiquity/plugins/ubi-partman.py (+8/-0)
ubiquity/plugins/ubi-usersetup.py (+8/-0)
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
Review via email: mp+414410@code.launchpad.net

Commit message

Add the ability to show passwords that are being typed-in on various stages (GTK only for now).

Description of the change

Add the ability to show passwords that are being typed-in on various stages (GTK only for now).

The rationale for this change is the following: currently users are suffering from bugs like LP: #1875062 which are really hard to pin-point and reproduce. A semi-workaround for that is this change, meaning that users can double-check if the password they think they write was actually written correctly (in case the keyboard layout is wrong).
This is by no means a real fix for that issue, but I think such an ability is good anyway.

I'll look into doing the same for KDE, although I see KDE has a very much less intuitive UI for disk encryption. This will be a separate MP.

To post a comment you must log in.
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

We could backport that to focal as well and have it part of 20.04.4.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for working on those change, it's an useful addition. I've one question, see inline review

review: Needs Fixing
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks for a creative step. A thought: Even if you add a toggle to make the password visible, how does the user know that they should use it? Maybe make it visible by default? Or that would possibly be too aggressive..

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Thank you for the review seb, let me address that point (as mentioned inline)!

Gunnar: I think that would be too invasive. This is why I only said that this is a semi-workaround, as some users will still be broken. I think it's anyway important to have this feature regardless of the bug with keyboard layout - but that one I think we simply need to find the root cause and eliminate it properly.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for pointing that you copied it, I asked jibel and it was done on purpose, probably just glade doing something weird. If it works without it we should also fix the stepPartCrypto.ui one

review: Approve
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

I'll merge this and then look into fixing the previous one! Thanks for the review!

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 4d6d9e1..bb4e2b9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,14 @@
1ubiquity (22.04.4) UNRELEASED; urgency=medium1ubiquity (22.04.4) UNRELEASED; urgency=medium
22
3 [ Brian Murray ]
3 * debian/ubiquity.templates: capitalize Wi-Fi in multiple places so that is4 * debian/ubiquity.templates: capitalize Wi-Fi in multiple places so that is
4 consistent throughout the installer.5 consistent throughout the installer.
56
6 -- Brian Murray <brian@ubuntu.com> Fri, 07 Jan 2022 11:28:10 -08007 [ Łukasz 'sil2100' Zemczak ]
8 * Add the ability to unhide passwords that are being typed-in during various
9 stages (GTK for now).
10
11 -- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Thu, 20 Jan 2022 16:07:46 +0100
712
8ubiquity (22.04.3) jammy; urgency=medium13ubiquity (22.04.3) jammy; urgency=medium
914
diff --git a/gui/gtk/stepPartCrypto.ui b/gui/gtk/stepPartCrypto.ui
index 6095b82..eacd931 100644
--- a/gui/gtk/stepPartCrypto.ui
+++ b/gui/gtk/stepPartCrypto.ui
@@ -120,7 +120,9 @@
120 <property name="invisible-char">●</property>120 <property name="invisible-char">●</property>
121 <property name="activates-default">True</property>121 <property name="activates-default">True</property>
122 <property name="width-chars">36</property>122 <property name="width-chars">36</property>
123 <property name="secondary-icon-name">view-reveal-symbolic</property>
123 <signal name="changed" handler="info_loop" swapped="no"/>124 <signal name="changed" handler="info_loop" swapped="no"/>
125 <signal name="icon-press" handler="on_password_toggle_visibility" swapped="no"/>
124 </object>126 </object>
125 <packing>127 <packing>
126 <property name="left-attach">0</property>128 <property name="left-attach">0</property>
diff --git a/gui/gtk/stepUserInfo.ui b/gui/gtk/stepUserInfo.ui
index f39d818..33bf94c 100644
--- a/gui/gtk/stepUserInfo.ui
+++ b/gui/gtk/stepUserInfo.ui
@@ -138,7 +138,9 @@
138 <property name="invisible_char">●</property>138 <property name="invisible_char">●</property>
139 <property name="activates_default">True</property>139 <property name="activates_default">True</property>
140 <property name="width_chars">20</property>140 <property name="width_chars">20</property>
141 <property name="secondary-icon-name">view-reveal-symbolic</property>
141 <signal name="changed" handler="info_loop" swapped="no"/>142 <signal name="changed" handler="info_loop" swapped="no"/>
143 <signal name="icon-press" handler="on_password_toggle_visibility" swapped="no"/>
142 <accessibility>144 <accessibility>
143 <relation type="labelled-by" target="password_label"/>145 <relation type="labelled-by" target="password_label"/>
144 </accessibility>146 </accessibility>
diff --git a/ubiquity/plugins/ubi-partman.py b/ubiquity/plugins/ubi-partman.py
index 9bb1ae6..b9f3d9e 100644
--- a/ubiquity/plugins/ubi-partman.py
+++ b/ubiquity/plugins/ubi-partman.py
@@ -308,6 +308,14 @@ class PageGtk(PageBase):
308 width, height)308 width, height)
309 widget.show()309 widget.show()
310310
311 def on_password_toggle_visibility(self, widget, icon_pos, event):
312 from gi.repository import Gtk
313 visibility = self.password.get_visibility()
314 self.password.set_visibility(not visibility)
315 self.verified_password.set_visibility(not visibility)
316 self.password.set_icon_from_icon_name(
317 Gtk.EntryIconPosition.SECONDARY, ('view-conceal-symbolic', 'view-reveal-symbolic')[visibility])
318
311 def generate_recovery_key(self):319 def generate_recovery_key(self):
312 if not self.recovery_key_enable.get_active():320 if not self.recovery_key_enable.get_active():
313 return321 return
diff --git a/ubiquity/plugins/ubi-usersetup.py b/ubiquity/plugins/ubi-usersetup.py
index ee3cc98..ceb067f 100644
--- a/ubiquity/plugins/ubi-usersetup.py
+++ b/ubiquity/plugins/ubi-usersetup.py
@@ -411,6 +411,14 @@ class PageGtk(PageBase):
411411
412 self.controller.allow_go_forward(complete)412 self.controller.allow_go_forward(complete)
413413
414 def on_password_toggle_visibility(self, widget, icon_pos, event):
415 from gi.repository import Gtk
416 visibility = self.password.get_visibility()
417 self.password.set_visibility(not visibility)
418 self.verified_password.set_visibility(not visibility)
419 self.password.set_icon_from_icon_name(
420 Gtk.EntryIconPosition.SECONDARY, ('view-conceal-symbolic', 'view-reveal-symbolic')[visibility])
421
414 def on_username_changed(self, widget):422 def on_username_changed(self, widget):
415 self.username_edited = (widget.get_text() != '')423 self.username_edited = (widget.get_text() != '')
416424

Subscribers

People subscribed via source and target branches