User Interface low complexity mobile
1
Dependencies
1
Dependents
0
Entities
0
Integrations

Description

Wizard step 3 offering preset duration chips (15 min, 30 min, 1 h, 2 h) for one-tap selection, backed by a free-entry fallback for non-standard durations. The 30-minute chip is pre-selected by default, matching the most common uncompensated session length and eliminating this step entirely for typical peer mentors.

Feature: Quick Activity Registration

duration-step

Summaries

The Duration Selection Step directly reduces registration friction for peer mentors by pre-selecting the most common session length (30 minutes), meaning the majority of users can complete this step with zero interaction. This smart default eliminates a decision point for typical users while preserving full flexibility for edge cases, increasing form completion rates and reducing drop-off. Faster, more intuitive registration drives higher activity logging adoption, which translates into richer programme data, better compliance reporting, and stronger evidence of organisational impact — all without adding operational cost or user support burden.

This is a low-complexity wizard step with a single dependency on the activity-registration-cubit state manager, making it straightforward to schedule and isolate for parallel development. The primary delivery consideration is WCAG 2.2 AA touch-target compliance testing, which requires coordination with QA and possibly accessibility auditors. The custom free-entry fallback for non-standard durations adds minor input-validation logic but no significant timeline risk. Regression scope is limited to the cubit integration and the preset selection/deselection toggle behaviour.

No backend work is required, keeping delivery fully within the mobile team.

Implemented as a stateless Flutter widget receiving defaultMinutes and presets via the build() constructor. State is owned entirely by activity-registration-cubit; the widget emits onPresetSelected(int) or onCustomDurationEntered(int) events and holds no local state beyond transient text-field buffer. The four preset chips use ChoiceChip or equivalent with a pre-selected index derived from defaultMinutes matching a preset value. The free-entry fallback is a numeric TextField with input formatters restricting non-digit characters.

validateDuration() enforces a sensible range (e.g., 1–480 minutes). Touch targets must meet 44×44 dp minimum per WCAG 2.2 AA. No data persistence; the cubit propagates the value downstream.

Responsibilities

  • Render four preset duration chips with the 30-minute chip pre-selected
  • Support a numeric free-entry field for custom durations
  • Emit duration change events to Cubit on chip tap or field commit
  • Ensure chip touch targets meet WCAG 2.2 AA minimum size requirements

Interfaces

build(int defaultMinutes, List<int> presets)
onPresetSelected(int minutes)
onCustomDurationEntered(int minutes)
validateDuration(int minutes) -> bool

Relationships

Dependencies (1)

Components this component depends on

Dependents (1)

Components that depend on this component