rubyforgood / rubyforgood/alongwithyou

Generic repeatable-entry CRUD pattern

Open
#49 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

phase:1 type:feature
Dominant language
TypeScript
Stars
9
Forks
4
Avg merge
9h 34m
Merged PRs (30d)
16

Description

Description

The add / view / edit / delete component that every Phase 1 list screen is built
on. Nine of the seventeen Phase 1 feature tickets are variants of it, so this is
the highest-leverage ticket in the phase and everything else waits on it.

This ticket and #35 are the same piece of work and are tracked together as
#118, which has the fuller specification.
Work #118.

The storage half already exists: createRepository({ table, fields }) in
mobile/src/lib/db/repository.ts gives list / find / create / update / remove
against the encrypted database, with getDatabase injectable so the component
can be tested without a device. What is missing is the UI half.

Acceptance Criteria
  • A reusable component, not a screen with the field list hardcoded
  • Driven by a declared field list, matching how createRepository is configured
  • Add, edit and delete all work end to end against the encrypted local database
  • Delete asks for confirmation — the data is local-only and there is no undo (0001)
  • Empty state, loading state and error state all handled
  • WCAG-aligned: screen reader support, no reliance on colour alone, adequate touch targets
  • One task per screen; the next step is obvious
  • Covered by unit tests, driven through an injected repository rather than a real database
Additional Info and Resources
  • Duplicate of / superseded by #118
  • Later screens copy this directly, so the seams matter more than the polish. A field list, labels, and validation hooks are the extension points the next nine tickets need
  • Tests need no native build, so this component can be developed and tested without Xcode or Android Studio
QA
  • See #118.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Do not start this ticket independently: it is superseded by #118, which contains the fuller specification. Read mobile/src/lib/db/repository.ts and the local-only architecture decision in docs/decisions/0001-local-only-architecture.md, then use #118's requirements to define the reusable component, injected-repository tests, and end-to-end CRUD behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
accessibility, database, mobile, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.