Skip to content

Add onboarding login and plan selection steps to setup wizard#100

Open
phoneuooyd wants to merge 2 commits into
mainfrom
codex/add-views-and-view-models-for-setup
Open

Add onboarding login and plan selection steps to setup wizard#100
phoneuooyd wants to merge 2 commits into
mainfrom
codex/add-views-and-view-models-for-setup

Conversation

@phoneuooyd
Copy link
Copy Markdown
Owner

Motivation

  • Introduce an onboarding flow that supports sign-in/sign-up and an anonymous "continue without account" path so users can start quickly while enabling future cloud sync for logged-in users.
  • Let users pick Free vs Premium during onboarding and persist that choice in app preferences for downstream feature gating.
  • Integrate the new steps into the existing setup wizard so onboarding order becomes: Welcome → Login/Register → PlanSelection → Preferences (language / ingredients).

Description

  • Added a login view model and views: FoodbookApp.App/ViewModels/SetupLoginViewModel.cs, FoodbookApp.App/Views/SetupLoginPage.xaml and SetupLoginPage.xaml.cs, implementing login/register toggle, validation, error messages and a ContinueWithoutAccount flow using existing auth services (IAccountService / ISupabaseAuthService).
  • Added a plan selection view: FoodbookApp.App/Views/SetupPlanSelectionPage.xaml and .xaml.cs with Free/Premium cards and commands to select the plan and persist the choice.
  • Extended SetupWizardViewModel (FoodbookApp.App/ViewModels/SetupWizardViewModel.cs) to a multi-step state machine with commands (NextStepCommand, PreviousStepCommand, SelectFreePlanCommand, SelectPremiumPlanCommand) and wired the new SetupLoginViewModel into the flow.
  • Extended preferences contract and implementation: added SavePlanChoice(string) and GetPlanChoice() to FoodbookApp.App/Interfaces/IPreferencesService.cs and implemented them in FoodbookApp.App/Services/PreferencesService.cs using the new PlanChoice preference key.
  • Registered new VM/pages in FoodbookApp.App/MauiProgram.cs and updated SetupWizardPage.xaml to render the step-based UI and include the new login and plan selection views.
  • Added localization strings (English + Polish minimum) to FoodbookApp.App/Localization/SetupWizardPageResources.resx and SetupWizardPageResources.pl-PL.resx for new labels, buttons and validation messages.

Testing

  • Ran an XML parse check for the modified XAML and RESX files using xml.etree.ElementTree to ensure well-formed XML, which passed for all updated files.
  • Attempted a full project build with dotnet build FoodbookApp.App/FoodbookApp.App.csproj, but the dotnet tool is not available in this environment so the build could not be executed (bash: command not found: dotnet).

Codex Task

…ack navigation (#101)

* Rework setup wizard flow and guest plan behavior

* Add plan selection state and UI updates

Introduce SelectedPlanChoice and related logic to manage plan selection and completion validation (CanCompleteSetup, IsFreePlanSelected, IsPremiumPlanSelected). Prevent guests from choosing Premium and defer persisting the plan choice until setup completion. Update SelectPlan to update selection (and block invalid Premium selection) and wire command CanExecute changes for CompleteSetupCommand. UI changes: add visual selection indicators and DataTriggers to plan tiles/buttons, dim Premium when not selectable, refactor step layouts (frames/stacklayouts), expose the page BindingContext via x:Name (SetupWizardRoot) and x:Reference for child views, relocate navigation buttons to a bottom grid, and adjust bindings for visibility/enabled states. Also add an AppTheme alias import.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant