Basic-Car-Maintenance icon indicating copy to clipboard operation
Basic-Car-Maintenance copied to clipboard

Connect WelcomeView and WelcomeViewAddVehicle to App Flow

Open maartinj opened this issue 6 months ago • 1 comments

What it Does

  • https://github.com/mikaelacaron/Basic-Car-Maintenance/issues/285
  • When app launch for the first time, will be presented OnboardingView
  • OnBoardingView contains 2 screens: WelcomeView and WelcomeViewAddVehicle
  • WelcomeView present the highlighted features of the app
  • WelcomeViewAddVehicle allows to add basic data about first car (Vehicle Name, Make & Model)
  • This pull request contains App Flow where User using the app for the first time, will see the WelcomeView, and then push WelcomeViewAddVehicle after tapping continue
  • Changed the "Welcome 🥳" button to be "Add Vehicle"
  • Once "Add Vehicle" is tapped, this Onboarding flow is dismissed, and the User, after confirming in presented alert that first vehicle data is added, should see the DashboardView. When clicked "OK" on presented alert, the app will start always from the DashboardView
  • Added temporary vehicle data to be presented in SettingsView as "Locally Saved Vehicle" to visualize correctly working Onboarding App Flow. This data can be deleted by swiping the added temporary vehicle data from right to the left. Temporary vehicle data is visible when app is restarted and app remember this data using UserDefaults functionality

How I Tested

  • Run the application in Simulator (iPhone 15 Pro, iOS 17.5), set language to 'English'
  • WelcomeView appear, and suddenly dismiss and shows alert "This is a Test Message From the Real Time Alert System" (I cannot turn this off. It looks like this alert is presented from server side)
  • Click "Dismiss" button in alert "This is a Test Message From the Real Time Alert System"
  • WelcomeView shows again
  • Click "Continue" button, WelcomeViewAddVehicle appear
  • Enter "Vehicle Name" in "Name" field, click "Add Vehicle" button
  • Alert "Vehicle Make cannot be empty! 🚗" is presented, click "OK"
  • Enter "Vehicle Make" in "Make" field, click "Add Vehicle" button
  • Alert "Vehicle Model cannot be empty! 🚗" is presented, click "OK"
  • Enter "Vehicle Model" in "Model" field, click "Add Vehicle" button
  • Alert "Congratulations! 🎉 🚙 From now on, next screen will be the main app screen" is presented, click "OK"
  • WelcomeViewAddVehicle dismiss, the DashboardView appear

Notes

  • May need further updates to include logic from SettingsView or other different task to add properly Vehicle data and delete temporary added vehicle data function

Screenshots

Screencast

https://github.com/user-attachments/assets/a37778fe-7d77-4710-b7e1-1d4bc534677b

maartinj avatar Aug 04 '24 01:08 maartinj