Giter Site home page Giter Site logo

ic-survey-ios's Introduction

  • šŸ‘‹ Hi, Iā€™m @nkhanh44
  • šŸ‘€ Iā€™m interested in developing things
  • šŸŒ± Iā€™m currently working as an iOS engineer

ic-survey-ios's People

Contributors

nkhanh44 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

ic-survey-ios's Issues

[Chore] setup CD pineline

Why

  • No manual execution of releases

Who Benefits?

  • CD pipeline is run on Github Action
  • CD pipeline run to build a staging version and upload to Firebase Distribution

[Integrate] As a user, I can sign in with email and password

Why

  • App should allow users to authenticate with their email and password

Acceptance Criteria

  • User can log in with email and password.
  • Store access and refresh token to local storage and move to Home screen if successful.
  • Show error alert if logging in fail

[Backend] As a logged in user, I can submit the answers for survey questions

Why

  • The user must be able to submit the answer for survey questions

Acceptance Criteria

Make a request with post method to API endpoint /api/v1/responses with body:

{
    "survey_id": "survey_id",
    "questions": [
        {
            "id": "question_id",
            "answers": [
                {
                    "id": "answer_id"
                }
            ]
        },
        {
            "id": "question_id",
            "answers": [
                {
                    "id": "answer_id",
                    "answer": "My answer"
                }
            ]
        }
    ]
}

[UI] As a user, I can sign in with email and password

Why

  • Users must be authenticated before taking or viewing any surveys.

  • The mobile apps should allow users to authenticate with their email and password.

Acceptance Criteria?

  • Display the Nimble logo

  • Display the blurred background

  • Display the Email text input

    • Set the placeholder text to Email
  • Display the Password text input

    • Set the placeholder text to Password
  • Display the Login button
    DO NOT display the Forgot Password button yet. We will work on this on another separate epic.

Design

Screen Shot 2022-07-21 at 11 16 20

[Integrate] As a user, I can see the details of a survey

Why

  • Before taking a survey, users should be able to see the full preview of the details so that they can decide whether or not the survey matching their expectation.

Acceptance Criteria

  • Upon tapping the Survey Disclosure button in Home, navigate the user to Survey Details with the selected survey.
    Pass and use the selected survey data fetched in Home.

  • Use the survey title as the Title label

  • Use the survey description as the Description label

  • Use the survey cover image url as the background image

    • The image is zoomed to 120% anchoring to the top right of the screen
  • All unit test passed

Design

[Integrate] As a logged in user, I can see a different answer view type

Why

  • We need an answer view to allow the user to complete the survey.

Acceptance Criteria

  1. When a Question model has display_type as dropdown,
  • Display a dropdown's picker wheel in the Answer section
  • Apply the answers as picker wheel items
    • Use the answer's text to show as the picker wheel item's title
  • By default, the first answer is initially selected
  1. When a Question model has display_type as smiley,
  • Display a Smiley Rating question
  • Use the answers as the rating options in an orderly manner
  • A valid Smiley question must have 5 answers. If the number of answers is fewer than 5, treat it as an invalid question
    • If the number of answers is more than five, use only the first five answers
  • By default, none are initially selected
  1. When a Question model has display_type as heart,
  • Display an Emoji Rating question with ā¤ļø as the options
  • The number of hearts (ā¤ļø) must match with the number of answers
  • By default, none are initially selected
  1. When a Question model has display_type as star,
  • Display an Emoji Rating question with ā­ļø as the options
  • The number of stars (ā­ļø) must match with the number of answers
  • By default, none are initially selected
  1. When a Question model has display_type as nps,
  • Display an NPS scale in the Answer section
  • The number of options (the scale range) must match with the number of the answers.
  • By default, none are initially selected.
  1. When a Question model has display_type as choice AND pick as one,
  • Display a Single-choice question
  • Use the answers to show as choices
  • Allow only one selection
    • So, if a user selects A and then B, only B should be selected.
  • By default, none are initially selected
  1. When a Question model has display_type as intro,
  • Display a No-action Question
  • Selecting the Next button skips to the next question (or submit the form if it's the last question of the survey)
  1. When a Question model has display_type as outro,
  • Display a No-action Question
  • Selecting the Next button skips to the next question (or submit the form if it's the last question of the survey)
  1. When a Question model has display_type as textarea,
  • Display a text-area question
  • Use the question's short text as the textbox's placeholder
  1. When a Question model has display_type as textfield,
  • Display a textfield question
  • Use the answers to show as textfields
    • Apply the answer's text as its textfield placeholder

[Integrate] As a user, I can sign out

Why

  • As users can sign in, the app must have an option for users to sign out. Signing out should completely remove any account-related footprints of the user.

Acceptance Criteria

  • When a user confirms to log out, perform the Logout request.
    • If the request is successful,
      • Navigate the user to Sign In
      • Remove any account-related stored data, such as credentials or user profile info.
    • Otherwise, display the error message on a native modal dialog with an OK button.
  • When a user selects Cancel, do nothing.
  • Unit tests for this feature all passed.

Design

[Chore] Update CD flow and setup Appstore lane

Why

  • On the previous setup, I have 2 lanes staging and production both delivered to Firebase. Now, It's needed to setup production lane to be delivered to Appstore.

Acceptance Criteria

  • Delivered app to AppStore and Firebase.

[Integrate] As a logged-in user, I can move to home screen after starting app.

Why

  • When starting app, users must be authenticated to go to Home screen, If they were authenticated, move to home screen, if not they have to authenticate on login screen.

Acceptance Criteria

  • If user's session is unexpired, splash navigate to Home screen.
  • If user didn't log in, splash navigate to Log in screen.
  • Tests passed

[UI] As a user, I can sign out

Why

  • As users can sign in, the app must have an option for users to sign out. Signing out should completely remove any account-related footprints of the user.

Acceptance Criteria

  • In the Account side menu, display the Logout button
  • Upon tapping the Logout button, display a native modal alert dialog with the following content:
    • Title - Are you sure you want to log out?
    • Destructive action - Log out
    • Cancel action - Cancel
  • Use the native bottom action sheet style as the modal dialog

Design

[Chore] Configure git workflow

Why

  • As we don't have deploying AppStore flow for this project, we want deploying Firebase flow trigger when there's an open pull request to it.

[UI] As a user, I cannot sign in if my password format is invalid

Why

When a user tries to sign in with an invalid input of email or password, the mobile app should locally validate the input first before calling a login request to reduce the number of unnecessary requests made to the API.

We should also inform the user what fails the validation so that he/she can edit the input properly.

Acceptance Criteria

  • Upon password input is typed, validate the password input.

    • If the validation fails, display a small text (red color) below the password input with this following message

    The password must be at least 8 letters.

  • Password must contain at least 8 characters

[Integrate] As a user, I can see my surveys

Why

  • Once logged in, users can navigate through a list of surveys that they can take. The mobile app will show the basic info of survey as they scroll through each survey.

Acceptance Criteria

  • Use the survey cover image as the background image
    • Append l to the image url to get the high-resolution image
  • For the date label, show the survey's created_at.
    • Use the date format as shown in the design on the first line
    • Use the OS relative date format on the second line
  • Use the survey title as the title label
  • Use the survey description as the description label
  • The number of page indicators must match with the number of surveys
  • Have a pagination when there are more than 10 surveys
  • Unit Tests for Home Module all passed.

Design

[Backend] As a user, I can see my surveys

Why

  • Once logged in, users can navigate through a list of surveys that they can take. The mobile app will show the basic info of survey as they scroll through each survey.

Acceptance Criteria

Call GET /api/v1/surveys endpoint with the following query parameters:
page[number]: 1
page[size]: 10

Resources

Postman - Nimble Survey API

[Backend] As a user, I can sign out

Why

  • As users can sign in, the app must have an option for users to sign out. Signing out should completely remove any account-related footprints of the user.

Acceptance Criteria

  • Call POST /api/v1/oauth/revoke to sign out with the following body:
{
  "token": "{{user_access_token}}",
  "client_id": "{{client_id}}",
  "client_secret": "{{client_secret}}"
}

Resources

Postman - Nimble Survey API

[Backend] As a user, I can see my survey questions

Why

  • When a user starts taking a survey, he/she will go through a set of questions of the selected survey. The mobile app should show how many questions there are for the survey so that the user can expect how long it is going to take and he/she can always stop at any point by dismissing the screen.

Acceptance Criteria

  • Call GET /api/v1/surveys/{{survey-id}} endpoint to retrieve the survey details
  • Map the response with the only necessary values for now

Resources

Postman - Nimble Survey API

[Backend] As a user, I can sign in with email and password

Why

  • Users must be authenticated before taking or viewing any surveys. Our surveys have the access restriction. some surveys are targeted to a specific group of users only for a more accurate survey result.

  • The mobile apps should allow users to authenticate with their email and password.

Acceptance Criteria

Call POST /api/v1/oauth/token endpoint with the following body:

{
     "grant_type": "password",
     "email": {{email}},
     "password": {{password}},
     "client_id": {{client_id}},
     "client_secret": {{client_secret}}
 }

Resources

Check out Authentication on Github Wiki for client_id and client_secret.
Postman - Nimble Survey API

[UI] As a user, I cannot sign in if my email format is invalid

Why

  • When a user tries to sign in with an invalid input of email or password, the mobile app should locally validate the input first before calling a login request to reduce the number of unnecessary requests made to the API.

  • We should also inform the user what fails the validation so that he/she can edit the input properly.

Acceptance Criteria

  • Upon Login input is typed, validate the Login input.

  • If the validation fails, display a small text (red color) below the Login input with this following message

    Whoops, it seems the email is incorrect. Please check and try again.

  • The OS built-in capability of email validation is preferred.

[Bug] Missing Compliance status on TestFlight

Issue

  • Missing Compliance status on TestFlight after uploading to the AppStoreConnect.

Screen Shot 2022-11-20 at 22 02 15

Expected

  • Missing Compliance removed.

Steps to reproduce

  1. Open AppStoreConnect
  2. Go to Khanh IC app
  3. Go to TestFlight section

[Bug] Can not access the app after refresh token revoked

Issue

From Bliss's comment, when opening the app with refresh token, it freezed at SplashView because of the revoked refresh token.

API response:
Simulator Screen Shot - iPhone 8 - 2022-11-18 at 15 40 23

Expected

If refresh token is revoked, navigate to the login screen.

Steps to reproduce

  1. Open the app with revoked refresh token and observe.

[Integrate] As a user, I can see my survey questions

Why

When a user starts taking a survey, he/she will go through a set of questions of the selected survey. The mobile app should show how many questions there are for the survey so that the user can expect how long it is going to take and he/she can always stop at any point by dismissing the screen.

Acceptance Criteria

  • Use the survey's cover image url as the background image
  • Each question type has a different layout and UI which must be respected.
  • Show the actual current question number and the number of questions on the Question Number label
    • {{current-question-number}}/{{number-of-questions}}
    • By default, the starting number is 1.
  • Show the current question's text on the Question label
  • Tapping the Next button should change the current question number.
    • The Question and Question Number labels should be updated in that respect
  • Unit tests for Survey Question feature all passed
  • At the end of the survey, submit all answers.

Design

[UI] As a user, I can see my survey questions

Why

  • We need a screen to show questions for the user to complete them.

Acceptance Criteria

  • Show question
  • Show answer (with different type)
  • Show quit survey button
  • Show go to next question button
  • Show Submit button on the last question

Design

[Backend] As a logged in user, I can renew an access token

Why

  • When the access token is expired and in order to renew an access token, the app must renew it with a refresh token.

Acceptance Criteria

Use a refresh token to call API endpoint /api/v1/oauth/token to retrieve a new access token with the body:

{
    "grant_type": "refresh_token",
    "refresh_token": {{refresh_token}},
    "client_id": "{{client_id}}",
    "client_secret": "{{client_secret}}"
}

After successful request, update an access and a refresh token in local storage.

[UI] As a user, I can see the details of a survey

Why

  • Before taking a survey, users should be able to see the full preview of the details so that they can decide whether or not the survey matching their expectation.

Acceptance Criteria

  • Display the back button
  • Display the Title label
    • No maximum number of lines
  • Display the Description label
  • No maximum number of lines
  • The screen is scrollable only when the content does not fit the screen
    DO NOT implement the Start Survey button

Design


[UI] As a user, I can see my surveys

Why

  • Once logged in, users can navigate through a list of surveys that they can take. The mobile app will show the basic info of survey as they scroll through each survey.

Note - Although pagination is supported by the API, we will only show a limited number of surveys (10) for the scope of this epic.

Acceptance Criteria

  • Implement a horizontal scroll view with a snapping behavior
  • Display the background image view
  • Display the Date label at the top left
  • Display the Page indicators
  • Display the Title label
    • The maximum number of line is 4
  • Display the Description label
    • The maximum number of line is 2
  • Display the Survey Disclosure button
  • DO NOT display the profile picture at the top right
    • We will work on it in a separate story

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.