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

Ush 1445 - Phone Input Field (Mobile) #1192

Open
wants to merge 10 commits into
base: mobile-development
Choose a base branch
from
Open

Conversation

ushahidlee
Copy link
Contributor

@ushahidlee ushahidlee commented Aug 15, 2024

Issue:

Our users would like a nice field specific to the entry of phone numbers.

Solution:

This PR wraps a widely used Javascript phone input library, with a Typescript Angular component so as to work inside of our ionic mobile app.

IMPORTANT: This PR has been implemented BEFORE the associated backend ticket and cannot be tested on the system at large until the backend ticket has been committed. The testing plan below can be employed until that time.

Testing:

  1. Open the mobile app
  2. Add the deployment berlincalling.ushahidi.io
  3. Create a post using the "Basic Post" survey.
    (The last field in the survey is the mobile input field.)
  4. Create a post with a phone number.
  • Only numbers are accepted.
  • Number length is limited to country standard
  • Country code can be manually (using the dropdown) and automatically selected (by typing + and then the country phone prefix)
  1. Edit the post.
  • Number and Country are maintained.
  • Changes are applied.

Copy link
Contributor

@Angamanga Angamanga left a comment

Choose a reason for hiding this comment

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

Works fine as far as I could test it 👍

@@ -69,7 +69,7 @@ <h2 class="task-label">{{ task.label }}</h2>
>
<!-- title, varchar -->
<ng-container
*ngIf="field.input === 'text' && (field.type === 'title' || field.type === 'varchar')"
*ngIf="field.input === 'text' && (field.type === 'title' || field.type === 'varchar') && field.label !== 'mobile_test'"
>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this for the temporary test-thing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah exactly. The new field will be a 'text' field in the backend, so its a very close simulation of end to end.

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.

2 participants