From nobody Sun Jul 17 04:36:03 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Llsjm5qy9z4T6VH; Sun, 17 Jul 2022 04:36:12 +0000 (UTC) (envelope-from dtf@shxd.cx) Received: from shxd.cx (shxd.cx [64.201.244.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Llsjl4g30z3swD; Sun, 17 Jul 2022 04:36:11 +0000 (UTC) (envelope-from dtf@shxd.cx) Received: from lummox.shxd.cx ([10.0.0.254]:55405 helo=smtpclient.apple) by shxd.cx with esmtpsa (TLS1.3) tls TLS_AES_128_GCM_SHA256 (Exim 4.95 (FreeBSD)) (envelope-from ) id 1oCw0h-000J4C-6a; Sat, 16 Jul 2022 21:36:03 -0700 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Devin Teske List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (1.0) Subject: Re: git: 6368dcb29228 - main - bsdinstall hostname: Replace dialog with bsddialog Date: Sat, 16 Jul 2022 21:36:03 -0700 Message-Id: <258A0FF7-F770-4574-AA6F-933EC7688C82@freebsd.org> References: <6FF4C58E-A52C-446F-8DB0-C5EE708DBCEB@freebsd.org> Cc: "Alfonso S. Siciliano" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, dteske@freebsd.org In-Reply-To: <6FF4C58E-A52C-446F-8DB0-C5EE708DBCEB@freebsd.org> To: Jessica Clarke X-Mailer: iPhone Mail (19F77) X-Rspamd-Queue-Id: 4Llsjl4g30z3swD X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of dtf@shxd.cx has no SPF policy when checking 64.201.244.140) smtp.mailfrom=dtf@shxd.cx X-Spamd-Result: default: False [-1.30 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; AUTH_NA(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[dteske@freebsd.org,dtf@shxd.cx]; MIME_GOOD(-0.10)[text/plain]; FROM_NEQ_ENVFROM(0.00)[dteske@freebsd.org,dtf@shxd.cx]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:36734, ipnet:64.201.240.0/20, country:US]; R_SPF_NA(0.00)[no SPF record]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_FIVE(0.00)[6]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_SOME(0.00)[]; DMARC_NA(0.00)[freebsd.org]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N Sent from my iPhone > On 15 Jul 2022, at 12:50 AM, Jessica Clarke wrote: >=20 > =EF=BB=BFOn 24 May 2022, at 13:20, Alfonso S. Siciliano wrote: >>=20 >> The branch main has been updated by asiciliano: >>=20 >> URL: https://cgit.FreeBSD.org/src/commit/?id=3D6368dcb29228dd8e18d50c54c3= ca1596262d4676 >>=20 >> commit 6368dcb29228dd8e18d50c54c3ca1596262d4676 >> Author: Alfonso S. Siciliano >> AuthorDate: 2022-05-24 12:04:24 +0000 >> Commit: Alfonso S. Siciliano >> CommitDate: 2022-05-24 12:20:22 +0000 >>=20 >> bsdinstall hostname: Replace dialog with bsddialog >>=20 >> Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility. >> Add --hline info because bsddialog requires TAB to switch the focus on >> buttons for an inputbox, dialog differs. >=20 > This is quite infuriating and bad UI/UX, everyone knows you can just > type and press enter at these kinds of dialogues, yet bsddialog doesn=E2=80= =99t > support this. Are there any plans to address this shortcoming so > bsddialog can work like every other dialogue box out there and how most > users would expect? This is an unfortunate regression over (LGPL) > dialog and I personally believe bsddialog should have been fixed rather > than introducing this clunky experience to document the flaw. >=20 Not to mention that removing dynamic auto-sizing smacks international users i= n the face because =E2=80=9C0 56=E2=80=9D might look good to your English te= xt but not i18n text. What=E2=80=99s that? This code is not i18n=E2=80=99d? Not yet =E2=80=94 but fixing the size of the box is a step backwards regress= ing away from embracing i18n already patterned by bsdconfig. I observe. =E2=80=94=20 Devin > Jess >=20 >> Delete f_dialog_inputbox_size() using libbsddialog autosizing. >>=20 >> Reviewed by: bapt >> Differential Revision: https://reviews.freebsd.org/D35285 >> --- >> usr.sbin/bsdinstall/scripts/hostname | 14 ++++++-------- >> 1 file changed, 6 insertions(+), 8 deletions(-) >>=20 >> diff --git a/usr.sbin/bsdinstall/scripts/hostname b/usr.sbin/bsdinstall/s= cripts/hostname >> index b151ef15c690..23adbe68ead0 100755 >> --- a/usr.sbin/bsdinstall/scripts/hostname >> +++ b/usr.sbin/bsdinstall/scripts/hostname >> @@ -48,6 +48,8 @@ f_include $BSDCFG_SHARE/dialog.subr >>=20 >> ############################################################ GLOBALS >>=20 >> +: ${BSDDIALOG_CANCEL=3D1} >> + >> # >> # Strings that should be moved to an i18n file and loaded with f_include_= lang() >> # >> @@ -71,21 +73,17 @@ SET_HOSTNAME=3D'hostname -s "%s"' >> dialog_hostname() >> { >> local prompt=3D"$msg_please_choose_a_hostname" >> - local hline=3D >> + local hline=3D"Use TAB and Enter to select $msg_ok" >> local value=3D"$*" >>=20 >> - local height width >> - f_dialog_inputbox_size height width \ >> - "$DIALOG_TITLE" "$DIALOG_BACKTITLE" "$prompt" "$value" "$hline" >> - >> - $DIALOG \ >> + bsddialog \ >> --title "$DIALOG_TITLE" \ >> --backtitle "$DIALOG_BACKTITLE" \ >> --hline "$hline" \ >> --ok-label "$msg_ok" \ >> --no-cancel \ >> --inputbox "$prompt" \ >> - $height $width "$value" \ >> + 0 56 "$value" \ >> 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD >> } >>=20 >> @@ -101,7 +99,7 @@ f_dialog_backtitle "$msg_freebsd_installer" >> # Get user input >> # >> HOSTNAME=3D$( dialog_hostname "$HOSTNAME" ) >> -[ $? -eq $DIALOG_CANCEL ] && exit 1 >> +[ $? -eq $BSDDIALOG_CANCEL ] && exit 1 >>=20 >> # >> # Store the user's choice >=20