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: ability to add phone number in profile 📲 #482

Conversation

Hamza-Mos
Copy link
Contributor

@Hamza-Mos Hamza-Mos commented Aug 24, 2024

Description ✏️

Closes #471

  • Implement functionality to add/edit phone numbers in general information section of member profile.

Screenshots:

Empty:

image

Invalid:

image image

Valid:

image

Database:

image

Type of Change 🐞

  • Feature - A non-breaking change which adds functionality.
  • Fix - A non-breaking change which fixes an issue.
  • Refactor - A change that neither fixes a bug nor adds a feature.
  • Documentation - A change only to in-code or markdown documentation.
  • Tests - A change that adds missing unit/integration tests.
  • Chore - A change that is likely none of the above.

Checklist ✅

  • I have done a self-review of my code.
  • I have manually tested my code (if applicable).
  • I have added/updated any relevant documentation (if applicable).

@Hamza-Mos Hamza-Mos marked this pull request as ready for review August 24, 2024 18:42
@Hamza-Mos Hamza-Mos force-pushed the hamzamostafa/add-phone-numbers-to-member-profile branch 2 times, most recently from 9bbdc0a to 14c400a Compare August 31, 2024 15:42
Copy link
Collaborator

@tomas-salgado tomas-salgado left a comment

Choose a reason for hiding this comment

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

This is great stuff @Hamza-Mos! Just left a few minor comments but almost good to go!

packages/ui/src/components/form.tsx Outdated Show resolved Hide resolved
@Hamza-Mos Hamza-Mos force-pushed the hamzamostafa/add-phone-numbers-to-member-profile branch from e6ee230 to 60f6a5c Compare September 6, 2024 19:44
Copy link
Collaborator

@tomas-salgado tomas-salgado left a comment

Choose a reason for hiding this comment

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

Nice work @Hamza-Mos, LGTM!

@tomas-salgado tomas-salgado added the Ready for Rami ✅ This PR is ready for a final review label Sep 21, 2024
Copy link
Member

@ramiAbdou ramiAbdou left a comment

Choose a reason for hiding this comment

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

Awesome work, @Hamza-Mos! 💯

Phone number formatting can get very difficult and I thought you killed that formatPhoneNumber function! That was a neat trick you used to keep the end parenthesis open when the digit length was 3, which made it easy to delete the 4th number (and similarly for the -).

I made an update so that we're only storing digits in our database as opposed to the parentheses/dashes! Thought about storing the country code as well, but don't think we need to since we're only serving US/Canada-based folks. Luckily we avoided a whole slew of complexity by not serving international numbers cause then we would've had to use something like react-phone-number-input which is really heavy and nasty haha.

Can't wait to see this in prod!

@ramiAbdou ramiAbdou changed the title feat: add phone numbers to member profile feat: ability to add phone number in profile 📲 Sep 24, 2024
@ramiAbdou ramiAbdou merged commit 335c3f8 into colorstackorg:main Sep 24, 2024
1 check passed
@Hamza-Mos Hamza-Mos deleted the hamzamostafa/add-phone-numbers-to-member-profile branch September 24, 2024 23:06
iperalta7 pushed a commit to iperalta7/oyster that referenced this pull request Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready for Rami ✅ This PR is ready for a final review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add/Edit Phone Numbers in Member Profile 🔢
3 participants