Skip to content

Inconsistent button order in modals #52615

Closed

Description

@huyenltnguyen

Describe the bug

In the exit exam modal, the primary button comes first then the close button, while the reset progress and delete account modals have it the other way around.

We have been displaying buttons from the most used/important to the least (check code -> save code -> get help), so I think the reset progress and delete account modals should be changed to follow the pattern. It's to maintain the consistency and to prevent the user from clicking the wrong button with their muscle memory (the color in this case helps, but non-sighted users won't have the cue).

Modal Page Screenshot
Exit exam https://www.freecodecamp.org/learn/foundational-c-sharp-with-microsoft/foundational-c-sharp-with-microsoft-certification-exam/foundational-c-sharp-with-microsoft-certification-exam Screenshot 2023-12-20 at 00 50 06
Reset progress https://www.freecodecamp.org/settings Screenshot 2023-12-20 at 00 51 50
Delete account https://www.freecodecamp.org/settings Screenshot 2023-12-20 at 01 05 24

Expected behavior

The button order of the reset progress and delete account modals should be flipped.

Activity

  1. added
    scope: UI
    platform: learn
    status: waiting triage
    on Dec 19, 2023
  2. naomi-lgbt commented on Dec 19, 2023

    @naomi-lgbt
    Member

    Other way around, I think. The exit exam should be flipped.

    If the top button is the most commonly used one, then we should set that to the non-destructive action here. That way, if someone clicks it out of muscle memory and not intention, they haven't done something irreversible.

  3. moT01 commented on Dec 20, 2023

    @moT01
    Member

    Yup, I think the exam one should be flipped - that's how it is in the danger zone on the settings too

  4. huyenltnguyen commented on Dec 20, 2023

    @huyenltnguyen
    MemberAuthor

    Okay, thanks everyone for the input.

    We are going to proceed with an update in the exit exam modal.


    This issue is open to first-time code contributors to this repository. The file that you should be updating is https://github.com/freeCodeCamp/freeCodeCamp/blob/main/client/src/templates/Challenges/exam/components/exit-exam-modal.tsx.

    Please make sure you read our guidelines for contributing, we prioritize contributors following the instructions in our guides. Join us in our chat room or our forum if you need help contributing; our moderators will guide you through this.

    Sometimes we may get more than one pull request. We typically accept the most quality contribution followed by the one that is made first.

    Happy contributing.

  5. added
    first timers only
    and removed
    status: waiting triage
    on Dec 20, 2023
  6. Hari-Shankar-Karthik commented on Dec 20, 2023

    @Hari-Shankar-Karthik

    Yes, I agree. The 'Reset progress' and 'Delete account' buttons should be reversed. The affirmative option always comes first, followed by the negative option.

  7. added a commit that references this issue on Dec 21, 2023
  8. adamresemius commented on Dec 21, 2023

    @adamresemius

    Hello,

    I have flipped the order of the buttons. This should reflect the structure that it appears as.

  9. moT01 commented on Dec 21, 2023

    @moT01
    Member
  10. mishalp commented on Dec 22, 2023

    @mishalp
    Contributor

    @huyenltnguyen I have flipped the order of exit-exam model buttons, Please review it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    first timers onlyplatform: learnscope: UI

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions