Two installer UX tweaks

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Tobias Geerinckx-Rice
Owner
unassigned
Submitted by
Tobias Geerinckx-Rice
Severity
normal
Merged with
T
T
Tobias Geerinckx-Rice wrote on 8 Jun 2019 06:42
(name . Guix-patches)(address . guix-patches@gnu.org)
87y32c663d.fsf@nckx
Good morning,

Guix is already exceptional; let's adhere to common UI conventions
where it helps.

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXPs8pgAKCRANsP+IT1Vt
eZwiAQC/mWePSJZgYJTRmy59FlYXyuRPc/7U9A5C8lrSRy/y0wD/VHDs86In2y8S
DuLSJSy/wkXrVt3SCexy3vaDWSgndgI=
=0m1J
-----END PGP SIGNATURE-----

T
T
Tobias Geerinckx-Rice wrote on 8 Jun 2019 06:47
[PATCH 1/2] installer: Partition as the last step.
(address . 36132@debbugs.gnu.org)
20190608044729.14700-1-me@tobias.gr
Multiple users have been understandably displeased after finding out
that their network card was unsupported, and Internet access mandatory,
after having already formatted their partitions.

* gnu/installer.scm (installer-steps): Run the ‘partition’ step just
before the ‘final’ one.
---
gnu/installer.scm | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)

Toggle diff (48 lines)
diff --git a/gnu/installer.scm b/gnu/installer.scm
index 1452c4dc7e..860c5a9a83 100644
--- a/gnu/installer.scm
+++ b/gnu/installer.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -226,15 +227,6 @@ selected keymap."
(#$keymap-step current-installer)))
(configuration-formatter keyboard-layout->configuration))
- ;; Run a partitioning tool allowing the user to modify
- ;; partition tables, partitions and their mount points.
- (installer-step
- (id 'partition)
- (description (G_ "Partitioning"))
- (compute (lambda _
- ((installer-partition-page current-installer))))
- (configuration-formatter user-partitions->configuration))
-
;; Ask the user to input a hostname for the system.
(installer-step
(id 'hostname)
@@ -267,6 +259,17 @@ selected keymap."
((installer-services-page current-installer))))
(configuration-formatter system-services->configuration))
+ ;; Run a partitioning tool allowing the user to modify
+ ;; partition tables, partitions and their mount points.
+ ;; Do this last so the user has something to boot if any
+ ;; of the previous steps doesn't go as expected.
+ (installer-step
+ (id 'partition)
+ (description (G_ "Partitioning"))
+ (compute (lambda _
+ ((installer-partition-page current-installer))))
+ (configuration-formatter user-partitions->configuration))
+
(installer-step
(id 'final)
(description (G_ "Configuration file"))
--
2.21.0
T
T
Tobias Geerinckx-Rice wrote on 8 Jun 2019 06:47
[PATCH 2/2] installer: Show, don't Hide.
(address . 36132@debbugs.gnu.org)
20190608044729.14700-2-me@tobias.gr
* gnu/installer/newt/user.scm (run-user-add-page): Change the input
visibility checkbox's text to ‘Show’, and default to unchecked.
* gnu/installer/newt/page.scm (run-input-page): Likewise.
Rename INPUT-HIDE-CHECKBOX? argument to INPUT-SHOW-CHECKBOX?.
---
gnu/installer/newt/page.scm | 9 +++++----
gnu/installer/newt/user.scm | 7 ++++---
2 files changed, 9 insertions(+), 7 deletions(-)

Toggle diff (82 lines)
diff --git a/gnu/installer/newt/page.scm b/gnu/installer/newt/page.scm
index 728721c08f..b061988336 100644
--- a/gnu/installer/newt/page.scm
+++ b/gnu/installer/newt/page.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -75,7 +76,7 @@ this page to TITLE."
#:key
(allow-empty-input? #f)
(default-text #f)
- (input-hide-checkbox? #f)
+ (input-show-checkbox? #f)
(input-field-width 40)
(input-flags 0))
"Run a page to prompt user for an input. The given TEXT will be displayed
@@ -88,8 +89,8 @@ input box, such as FLAG-PASSWORD."
input-field-width
#:flags FLAG-BORDER))
(input-visible-cb
- (make-checkbox -1 -1 (G_ "Hide") #\x "x "))
- (input-flags* (if input-hide-checkbox?
+ (make-checkbox -1 -1 (G_ "Show") #\space "x "))
+ (input-flags* (if input-show-checkbox?
(logior FLAG-PASSWORD FLAG-SCROLL
input-flags)
input-flags))
@@ -102,7 +103,7 @@ input box, such as FLAG-PASSWORD."
(apply
horizontal-stacked-grid
GRID-ELEMENT-COMPONENT input-entry
- `(,@(if input-hide-checkbox?
+ `(,@(if input-show-checkbox?
(list GRID-ELEMENT-COMPONENT input-visible-cb)
'())))
GRID-ELEMENT-COMPONENT ok-button))
diff --git a/gnu/installer/newt/user.scm b/gnu/installer/newt/user.scm
index dab805198f..3ef105fe81 100644
--- a/gnu/installer/newt/user.scm
+++ b/gnu/installer/newt/user.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -55,7 +56,7 @@ REAL-NAME, and HOME-DIRECTORY as the initial values in the form."
(entry-home-directory (make-entry -1 -1 entry-width
#:initial-value home-directory))
(password-visible-cb
- (make-checkbox -1 -1 (G_ "Hide") #\x "x "))
+ (make-checkbox -1 -1 (G_ "Show") #\space "x "))
(entry-password (make-entry -1 -1 entry-width
#:flags (logior FLAG-PASSWORD
FLAG-SCROLL)))
@@ -156,7 +157,7 @@ a thunk, if the confirmation doesn't match PASSWORD, and return its result."
(run-input-page (G_ "Please confirm the password.")
(G_ "Password confirmation required")
#:allow-empty-input? #t
- #:input-hide-checkbox? #t))
+ #:input-show-checkbox? #t))
(if (string=? password confirmation)
password
@@ -173,7 +174,7 @@ a thunk, if the confirmation doesn't match PASSWORD, and return its result."
(run-input-page (G_ "Please choose a password for the system \
administrator (\"root\").")
(G_ "System administrator password")
- #:input-hide-checkbox? #t))
+ #:input-show-checkbox? #t))
(confirm-password password run-root-password-page))
--
2.21.0
T
T
Tobias Geerinckx-Rice wrote on 8 Jun 2019 17:43
[PATCH 3/2] installer: Hide the Wi-Fi passphrase by default.
(address . 36132@debbugs.gnu.org)(address . 36135@debbugs.gnu.org)
20190608154338.8064-1-me@tobias.gr
* gnu/installer/newt/wifi.scm (run-wifi-password-page):
Add an #:INPUT-SHOW-CHECKBOX? to the input page.
---

Guix,

This adds a ‘[ ] Show’ checkbox to the newt installer's Wi-Fi passphrase input field, which has also been requested at least twice now. Most recently here[0].

Kind regards,

T G-R


gnu/installer/newt/wifi.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (24 lines)
diff --git a/gnu/installer/newt/wifi.scm b/gnu/installer/newt/wifi.scm
index 1cb2ef2df3..040e013293 100644
--- a/gnu/installer/newt/wifi.scm
+++ b/gnu/installer/newt/wifi.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2019 Meiyo Peng <meiyo@riseup.net>
+;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -88,7 +89,8 @@ nmc_wifi_strength_bars."
(define (run-wifi-password-page)
"Run a page prompting user for a password and return it."
(run-input-page (G_ "Please enter the wifi password.")
- (G_ "Password required")))
+ (G_ "Password required")
+ #:input-show-checkbox? #t))
(define (run-wrong-password-page service-name)
"Run a page to inform user of a wrong password input."
--
2.21.0
T
T
Tobias Geerinckx-Rice wrote on 8 Jun 2019 17:49
(no subject)
(name . GNU bug tracker automated control server)(address . control@debbugs.gnu.org)
87v9xg5b6p.fsf@nckx
reassign 35901 guix-patches
merge 35901 36132
L
L
Ludovic Courtès wrote on 11 Jun 2019 10:02
Re: [bug#36132] [PATCH 1/2] installer: Partition as the last step.
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)
878su87dn2.fsf@gnu.org
Hi!,

Tobias Geerinckx-Rice <me@tobias.gr> skribis:

Toggle quote (7 lines)
> Multiple users have been understandably displeased after finding out
> that their network card was unsupported, and Internet access mandatory,
> after having already formatted their partitions.
>
> * gnu/installer.scm (installer-steps): Run the ‘partition’ step just
> before the ‘final’ one.

LGTM! Please add “Fixes http://bugs.gnu.org/35901.” in the log.

Should we also move “Network selection” above “Hostname”?

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 11 Jun 2019 10:05
Re: [bug#36132] [PATCH 2/2] installer: Show, don't Hide.
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)
8736kg7di3.fsf@gnu.org
Hi,

Tobias Geerinckx-Rice <me@tobias.gr> skribis:

Toggle quote (5 lines)
> * gnu/installer/newt/user.scm (run-user-add-page): Change the input
> visibility checkbox's text to ‘Show’, and default to unchecked.
> * gnu/installer/newt/page.scm (run-input-page): Likewise.
> Rename INPUT-HIDE-CHECKBOX? argument to INPUT-SHOW-CHECKBOX?.

I think the argument should perhaps be ‘input-visibility-checkbox?’,
otherwise I find it a bit unclear (both before and after the patch
actually.)

Other than that LGTM, thank you!

Ludo’.
T
T
Tobias Geerinckx-Rice wrote on 26 Aug 2019 16:00
Re: Two installer UX tweaks
(address . 36132-done@debbugs.gnu.org)
87mufwqb6d.fsf@nckx
Ludo' wrote:
Toggle quote (3 lines)
> I think the argument should perhaps be
> ‘input-visibility-checkbox?’

Done & pushed as 55c43108ac763c68f95cce3d32c60b8944b771f5 &c.

Thanks,

T G-R
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXWPl6gAKCRANsP+IT1Vt
eZieAQCrkKkKyThD8ucE6Tca8nF/+i6X+MpPQjQc2qCoKeXt4QD5AWyXfIm/jFrQ
dGVS5BNmJymWB2Ap7uVzaX7cF4zPYQA=
=hQQk
-----END PGP SIGNATURE-----

Closed
T
T
Tobias Geerinckx-Rice wrote on 26 Aug 2019 16:23
Re: [bug#36132] [PATCH 1/2] installer: Partition as the last step.
(name . Ludovic Courtès)(address . ludo@gnu.org)
87lfvgqa3y.fsf@nckx
Ludo',

Ludovic Courtès ???
Toggle quote (3 lines)
> LGTM! Please add “Fixes http://bugs.gnu.org/35901.” in the
> log.

Oh, bugger. This message got lost in my messy box (it floated
back to the top when I closed the bug). Sorry about that.

Toggle quote (2 lines)
> Should we also move “Network selection” above “Hostname”?

Perhaps! I'll fire up the installer again and see if anything new
seems odd/out of place after these few months.

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXWPrUQAKCRANsP+IT1Vt
eQ1yAP0c6rMMB414vgJ8QQM6owjiHAvklmy5/nwSsW5Q7BuucAEA0on33OtTqi3P
Q/n5kUcCUX+W8zec0Val9oBuaTVXEAM=
=iq60
-----END PGP SIGNATURE-----

?
Your comment

This issue is archived.

To comment on this conversation send an email to 36132@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 36132
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch