Page MenuHomeFreeBSD

[PATCH 2/2] bsdinstall: revisit the finalconfig step
ClosedPublic

Authored by khorben_defora.org on Oct 2 2023, 7:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 5, 9:22 AM
Unknown Object (File)
Tue, Nov 5, 9:22 AM
Unknown Object (File)
Oct 26 2024, 8:09 AM
Unknown Object (File)
Oct 16 2024, 9:04 PM
Unknown Object (File)
Sep 18 2024, 11:13 AM
Unknown Object (File)
Sep 17 2024, 12:49 AM
Unknown Object (File)
Sep 15 2024, 4:28 PM
Unknown Object (File)
Sep 15 2024, 3:31 AM
Subscribers

Details

Summary

This adds a "Finish" button to the finalconfig step, replacing the previous first choice, which was to "apply configuration and exit".
The new button is the default action, while the "OK" button is renamed to "Select".

Sponsored by: The FreeBSD Foundation

This is a follow-up to [PATCH 1/2] in D42046, and only applies cleanly after that patch.

Test Plan

I have created a stand-alone copy of usr.sbin/bsdinstall, slightly modified in order to allow local testing without requiring a new installation image for every change.

$ git clone --branch khorben/finalconfig \
      https://github.com/khorben/bsdinstall.git
$ cd bsdinstall
$ less README.md
[...]
$ cat > test.sh << EOF

BSDINSTALLDIR="\$PWD"
DESTDIR="\$BSDINSTALLDIR/destdir"
BSDINSTALL_DISTDIR="\$DESTDIR/usr/freebsd-dist"; export BSDINSTALL_DISTDIR
SRCDIR="/usr/src"

TMPDIR="\$(mktemp -d)"; export TMPDIR
for target in "\$@"; do
    BSDCFG_SHARE="\$SRCDIR/usr.sbin/bsdconfig/share" \
        BSDINSTALL_CHROOT="\$DESTDIR" \
        BSDINSTALL_CONFIGCURRENT="yes" \
        BSDINSTALL_SCRIPTS="\$BSDINSTALLDIR/scripts" \
        ./bsdinstall "\$target"
done
EOF
$ sh test.sh auto
[perform a simulated install into the "destdir" subfolder]

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Is the new Finish button selected by default?

Is the new Finish button selected by default?

With this patch, the focus is on the first option and on the "OK" button by default. (So here "Add User")

It is possible to focus on the "Finish" button by default by simply adding --default-no. (Or alternatively --default-button Finish)

What do you think is best?

IMO both ways can equally make sense, although it might be safer to enter "Add User" by accident and then cancel that step, than to miss the opportunity and go to the next step while intending to perform an action. Therefore I tend to prefer defaulting to "OK". (Speaking of which, I think it would be nice to implement "Add User" with bsddialog if possible)

Every additional keypress required, especially ones for navigating to the right option, makes an already user-hostile installer have even more friction. I am very strongly opposed to not being able to quickly skip through screens that 99.999999% of users do not need.

Having said that, why do we have OK and Finish? Those sound like they should do the same thing. Should you be selecting either an item in the list, which performs that action, or a finish/done/etc button at the bottom, which says you’re done performing actions? Having OK not be “I’m done now, please get rid of this dialog” is quite unintuitive.

Speaking of which, I think it would be nice to implement "Add User" with bsddialog if possible

It would, the current approach is quite sad to see, and not particularly friendly. I’ve wanted that for a while now :)

Every additional keypress required, especially ones for navigating to the right option, makes an already user-hostile installer have even more friction. I am very strongly opposed to not being able to quickly skip through screens that 99.999999% of users do not need.

That makes sense, especially if the buttons are made clearer.
Should I update the revision with --default-no?

Having said that, why do we have OK and Finish? Those sound like they should do the same thing. Should you be selecting either an item in the list, which performs that action, or a finish/done/etc button at the bottom, which says you’re done performing actions? Having OK not be “I’m done now, please get rid of this dialog” is quite unintuitive.

True, should we rename "OK" to something like "Enter", or maybe "Configure"?
The cancel button could otherwise be "Skip", "Complete", "Apply", "Close", or even "Next".

We might want to review the whole installation process for consistency then; but that's a different issue too.

Every additional keypress required, especially ones for navigating to the right option, makes an already user-hostile installer have even more friction. I am very strongly opposed to not being able to quickly skip through screens that 99.999999% of users do not need.

That makes sense, especially if the buttons are made clearer.
Should I update the revision with --default-no?

Yes please.

Having said that, why do we have OK and Finish? Those sound like they should do the same thing. Should you be selecting either an item in the list, which performs that action, or a finish/done/etc button at the bottom, which says you’re done performing actions? Having OK not be “I’m done now, please get rid of this dialog” is quite unintuitive.

True, should we rename "OK" to something like "Enter", or maybe "Configure"?

Select?

The cancel button could otherwise be "Skip", "Complete", "Apply", "Close", or even "Next".

Finish seems best to me, OK is the confusing one.

We might want to review the whole installation process for consistency then; but that's a different issue too.

khorben_defora.org edited the summary of this revision. (Show Details)
  • Made "Finish" the default action
  • Renamed the "OK" button to "Select"

Thanks for tweaking, happy with the UX now (in as much as one can be with bsdinstall). Just a couple of minor points.

usr.sbin/bsdinstall/scripts/finalconfig
53

break would be a little more future-proof to the script growing but entirely equivalent today

77

Commit message should probably mention this removal

usr.sbin/bsdinstall/scripts/finalconfig
53

True; preparing a new version with this change.

77

The original code for finalconfig in scripts/auto did not have this in the first place, so the function simply exited when an unknown option was chosen. Here the behaviour is different indeed, whereas if an option is selected through bsddialog and is not listed here, the user will be prompted again.

Either case should never happen anyway, except for future developers making a mistake while changing the functionality, or affecting the behaviour of bsddialog. (Or cosmic rays)

I will mention it in the commit message anyway.

  • This now uses break to be more future-proof
  • The commit message now mentions the change in behaviour when selecting unknown actions
This revision is now accepted and ready to land.Oct 13 2023, 2:08 PM
This revision was automatically updated to reflect the committed changes.