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

Alphabetize state selection in RegisterForm.tsx #41

Merged
merged 2 commits into from
Mar 13, 2024

Conversation

ameliav
Copy link
Contributor

@ameliav ameliav commented Mar 12, 2024

🗣 Description

Front-end:
The registration form contains a field for selecting US States and Territories. This dropdown is not alphabetized and should do so. This code will be consolidated in a "constants" file for both the organization form and registration form to use. Issue #19

💭 Motivation and context

To improve user experience, we need to sort the states alphabetically.

🧪 Testing

  • The US States and Territories dropdown should display options in alphabetical order.
  • The sorting should be case-insensitive (e.g., “New York” should come after “North Carolina”).
  • The change should be reflected in both the organization form and the registration form.
  • Create a centralized function or module that handles state-related logic.
  • This function/module should populate the state, stateName, and regionId fields consistently for both User and Organization entities.
  • Ensure that the consolidated logic is efficient and maintainable.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All future TODOs are captured in issues, which are referenced
    in code comments.
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated
    to reflect the changes in this PR.
  • Tests have been added and/or modified to cover the changes in this PR.
  • All new and existing tests pass.

✅ Pre-merge checklist

  • Revert dependencies to default branches.
  • Finalize version.

✅ Post-merge checklist

  • Create a release.

@ameliav ameliav self-assigned this Mar 12, 2024
@ameliav ameliav linked an issue Mar 12, 2024 that may be closed by this pull request
@ameliav ameliav marked this pull request as ready for review March 13, 2024 14:03
Copy link
Contributor

@Matthew-Grayson Matthew-Grayson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect!

@schmelz21 schmelz21 merged commit 4f0c470 into develop Mar 13, 2024
10 of 14 checks passed
@ameliav ameliav deleted the 19-consolidate-state-and-region-mapping branch March 13, 2024 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants