Skip to content

Website log in with GitHub authentication method - Newsletter sign up checkbox #2754

Description

@kikilondon

Description of the issue 📄

During the GitHub authentication flow, if a user fails to fill out all required fields, the form reloads to prompt them for the missing information. When this reload happens, the "Sign up for our newsletter" checkbox loses its default "checked" state, causing new members to accidentally opt out of the newsletter.

Expected behaviour:
The "Sign up for our newsletter" checkbox should remember its state and remain checked when the form reloads.

Actual behaviour:
The checkbox becomes unchecked, meaning the user will not be added to the newsletter list unless they specifically notice and re-check it.

Screenshots 📷

Image Image

Steps to fix 🛠

Fix the state loss: Modify the checkbox code so that it checks the submitted parameters. If the form was submitted with the box checked, it should render as checked. Make sure the logic accurately reflects what the user did. ( x example: Default to true on first load, but if the user explicitly unchecks it before failing validation, it should stay unchecked).

To do 📋

  • Claim this issue (comment below, or assign yourself if you are part of the codebar org)
  • Fork and clone the repository
  • Update the relevant files. Follow the steps to fix section in this issue.
  • Commit your changes as one commit. Use the title of this issue as your commit message
  • Submit a pull request
  • Mention this issue in the PR description by including it's number
  • Have your pull request reviewed & merged by a codebar team member

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions