Skip to content

HAFB-16: Injecting components > Agent Intake #98

Open
sophialu23 wants to merge 13 commits into
mainfrom
HAFB-16
Open

HAFB-16: Injecting components > Agent Intake #98
sophialu23 wants to merge 13 commits into
mainfrom
HAFB-16

Conversation

@sophialu23

Copy link
Copy Markdown
Contributor

Jira ticket link

https://linear.app/uw-blueprint/issue/HAFB-16/inject-components-agent-intake

Implementation description

This PR refactors the agent-intake flow to use shared components from frontend/common/components/ instead of duplicated inline markup, after merging the latest shared form/layout components from main.

New shared components

  • FormField — wraps Label, any input (via children), and FieldError into a consistent field layout (gap-1.5, optional required asterisk).
  • FieldError — thin wrapper around InputError for validation messages.

Agent-intake updates

  • IntakeLayout — uses shared Header and Footer instead of custom header/footer nav; keeps StepIndicator for step progress (routed Next.js pages, not MultiStepLayout).
  • agency/page.tsx, main-agent/page.tsx, AgentCard — form fields refactored to FormField + shared Input / Select.
  • review/page.tsx — review cards use shared Card, Badge, Button; success state uses shared Dialog instead of a custom fixed overlay.
  • other-agents/page.tsx — empty state uses shared Card.

Footer extensions

  • Added isBackDisabled, backVariant, and submittingLabel props so the shared Footer supports intake-specific back/submit behavior.

Intentionally not replaced

  • MultiStepLayout — different architecture (internal step state vs routed intake pages).
  • FormBreadcrumb — intake uses vertical StepIndicator, not horizontal breadcrumbs.
  • Donate-flow-only components (SelectAndCombo, FurnitureItemCard, FileUpload) — not used in agent-intake.

Steps to test

  1. Run the frontend
  2. Open the agent-intake flow
  3. Layout: Confirm logo header, step indicator, and back/next footer behave as before (back disabled on first step; “Maybe later” / “Next” on other agents when no agents saved).
  4. Validation: Submit each step with empty fields — error messages should appear under the relevant inputs.
  5. Agency step: Exercise text inputs and the province Select; confirm labels focus inputs when clicked.
  6. Main agent step: Confirm locked identity fields (if logged in) still behave correctly.
  7. Other agents: Add/edit/remove an agent card; confirm inline validation on save.
  8. Review: Submit successfully — success Dialog should appear, then redirect as before.
  9. (Optional) Run npm run lint and npm run type-check in frontend/.

What should reviewers focus on?

  • FormField abstraction — is the label/input/error wrapper the right level of reuse, or too thin?
  • IntakeLayout + Footer — back/next disabled states, submit error alert, and “Maybe later” label logic unchanged after switching to shared Footer.
  • AgentCard — admin checkbox + tooltip row left custom (not wrapped in FormField); confirm that still looks/behaves correctly.
  • Success dialog on review — shared Dialog styling vs the previous custom overlay (size, overlay, no close button).
  • Scope — this branch also includes merged shared components from main (e.g. Header, Footer, MultiStepLayout, component gallery updates); focus review on agent-intake wiring if diff is large.

Checklist

Format for branch, commit, and PR title: docs/GIT.md.

  • My branch name includes the Jira ticket key
  • My PR name is descriptive and in imperative tense
  • My PR name includes the Jira ticket key
  • My commit messages are descriptive and in imperative tense. My commits are atomic and trivial commits are squashed or fixup'd into non-trivial commits
  • My commit messages include the Jira ticket key
  • I have run the appropriate linter(s)
  • I have requested a review from the PL, as well as other devs who have background knowledge on this PR or who will be building on top of this PR

@sophialu23 sophialu23 self-assigned this Jun 14, 2026
sophialu23 and others added 6 commits June 14, 2026 20:44
Move step pages into components and drive navigation with in-memory step state at /agent-intake, matching the donate flow pattern. Legacy step URLs redirect to the main entry.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
home-again Ready Ready Preview, Comment Jun 15, 2026 5:16am

…r, created service area notice as the centralized use for banner > donate uses it too
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.

1 participant