Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rework newpasswd view for CLI #394

Merged
merged 3 commits into from
Jun 27, 2024
Merged

feat: rework newpasswd view for CLI #394

merged 3 commits into from
Jun 27, 2024

Commits on Jun 27, 2024

  1. Rework newpasswd view for CLI

    Instead of showing both prompts from the get-go, and having Enter submit
    the form straight away (and only being able to navigate through it with
    Tab), such as:
    
        Enter your new password
        > ****
        >
    
    We now render a single input if the user has just been shown the form,
    with an updated prompt:
    
        Enter your new password
    
        New password:
        > ****
    
    When pressing Enter -- provided that the password passes our quality
    checks -- the form changes to:
    
        Enter your new password (confirm)
    
        New password:
        > ****
        Confirm password:
        > ****
    
    This makes it clearer that we want the user to re-type their password.
    As a result, Tab navigation is no longer supported in non-skippable
    views, and the form can only be advanced by pressing Enter.
    
    For skippable views (i.e. with a button), Tab only works if the password
    is not filled in. This avoids opening a can of worms regarding to what
    fields we should be showing or not based on whether password fields are
    filled in. Thus, the skippable experience becomes:
    
        Enter your new password (3 days until mandatory)
    
        New password:
        >
    
        [ Skip ]  // Focusable
    
    and
    
        Enter your new password (3 days until mandatory)
    
        New password:
        > *****
    
        [ Skip ]  // No longer focusable, have to finish filling in the form
                  // (or clear it)
    
    Otherwise, I believe we should keep the form as simple as possible,
    without the possibility of jumping back to the previous password field
    once it was filled in, at the sake of improved maintainability.
    
    Fixes #365 / UDENG-3112
    GabrielNagy committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    49466ac View commit details
    Browse the repository at this point in the history
  2. Update relevant tapes and refresh golden files

    Mostly replacing Tab with Enter, and removing some redundant Tabs.
    GabrielNagy committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    c5921d0 View commit details
    Browse the repository at this point in the history
  3. Drop empty password check in favor of pwquality

    The error from pwquality is a bit different so we need to refresh the
    relevant golden files.
    GabrielNagy committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    9332177 View commit details
    Browse the repository at this point in the history