donation request review page - #123
Open
brian-fu wants to merge 3 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
brian-fu
force-pushed
the
feat/donation-request-page
branch
from
July 25, 2026 21:49
8531063 to
fbf1ca7
Compare
brian-fu
force-pushed
the
feat/donation-request-page
branch
from
July 25, 2026 21:53
fbf1ca7 to
723f438
Compare
brian-fu
force-pushed
the
feat/donation-request-page
branch
from
July 25, 2026 21:57
723f438 to
6d9a4b3
Compare
brian-fu
force-pushed
the
feat/donation-request-page
branch
from
July 26, 2026 00:13
6d9a4b3 to
e4014f0
Compare
brian-fu
force-pushed
the
feat/donation-request-page
branch
from
July 26, 2026 00:25
e4014f0 to
bced470
Compare
brian-fu
changed the base branch from
feat/donation-request-schema
to
feat/donation-request-components
July 26, 2026 00:25
brian-fu
force-pushed
the
feat/donation-request-page
branch
from
July 26, 2026 01:49
bced470 to
50885e0
Compare
brian-fu
force-pushed
the
feat/donation-request-page
branch
from
July 26, 2026 02:39
8d701fb to
beb95ce
Compare
brian-fu
marked this pull request as ready for review
July 26, 2026 03:08
brian-fu
force-pushed
the
feat/donation-request-page
branch
from
July 26, 2026 05:34
beb95ce to
6423352
Compare
brian-fu
force-pushed
the
feat/donation-request-page
branch
from
July 26, 2026 05:57
6423352 to
093274a
Compare
brian-fu
force-pushed
the
feat/donation-request-page
branch
from
July 26, 2026 06:16
093274a to
a6256e2
Compare
brian-fu
force-pushed
the
feat/donation-request-page
branch
from
July 26, 2026 06:23
a6256e2 to
7dd6708
Compare
brian-fu
force-pushed
the
feat/donation-request-components
branch
from
July 26, 2026 06:29
ca425af to
de1b795
Compare
Implement the admin donation-request review screen and the shared components it needs. The database is not provisioned, so the page reads from a local Zustand store seeded from a fixture; field names and actions mirror the review-schema PR so wiring to the API later is a fetch swap. New shared components (common/): - ui/alert — cva callout (info/warning/destructive); ServiceAreaNotice now builds on it - ui/collapsible, ui/copy-button, ui/toggle-group — thin base-ui wrappers - data-display/PhotoStrip + PhotoLightboxDialog — thumbnail row and full-size viewer with prev/next + thumbnail rail - layout/AdminHeader — logo + search + avatar top bar - InformationBlock gains valueAction (copy button beside a value) - status-labels gains ScheduledBadge Flow (app/donation-request/[id]): - Donor Information card with read + inline edit (Yes/No toggles), collapsible - Item cards reusing the existing approve/reject dialogs, with the rejection reason shown once rejected and a photo strip that opens the lightbox - Schedule / Edit pickup dialog (native date input per design; the calendar popover is not designed), scheduled-pickup card, and confirm-date dialog. Editing a confirmed pickup's date clears the confirmation, matching the dialog warning and the backend rule. - Header badge derived from item + pickup state (pending / partially reviewed / reviewed + Schedule button / scheduled) Tests: reviewStatus derivation, DonationItemCard, PhotoLightboxDialog (18 new; suite 125 passing). Gallery entries added for the new shared pieces. type-check, lint, prettier clean. Two design gaps handled: frame 1 has no visible entry into donor-edit mode, so an edit affordance sits beside the collapse chevron; frame 8's "2/4 Approved" label is driven by the real approved/total counts.
Schema alignment with the review-schema PR
- Renames `items` to `furniture_items`, matching DonationDetail, so wiring the
live API stays a fetch swap.
- Widens ItemReviewStatus to all seven FurnitureStatus values. Only the first
three are reachable from this screen, but an item can arrive from the API in a
downstream state and was previously mistyped.
- Documents the deliberate divergences at the top of types.ts — DonorInformation
is a display shape, `condition` holds UI copy rather than
FurnitureConditionEnum, `request_id`/`submitted_at` are presentation fields,
and `pickup` is pre-resolved to the active one — so the next reader can tell
intent from oversight.
Review-status precedence
- deriveReviewStatus checked for a scheduled pickup first, so a pickup booked
while items were still outstanding reported "scheduled" and hid them. The
backend explicitly orders this the other way: scheduling only outranks a
finished review. Reordered to match, and the test that asserted the old
behaviour ("regardless of item states") is replaced with cases covering both
directions.
Dates
- The header used a local formatShortDate carrying the same UTC off-by-one that
was just fixed in common; it now uses the shared helper.
Other
- Drops the decorative calendar icon from the pickup date field: type="date"
draws its own picker indicator, so the two rendered side by side.
- Donor card actions use Figma's borderless Cancel + outlined Save, distinct
from the dialogs where Save is the filled primary action.
- Removes the unused DONATION_REQUESTS / donationRequestPath constants. Nothing
referenced them, and dropping them leaves this branch touching only
app/donation-request/.
- Adds donationRequestStore tests — the confirmation-invalidation rule the Edit
dialog warns about had no coverage at all.
Replaces the per-item random picsum seeds with five copies of the leather sofa shot from the review frames (added to public/ in the shared-components PR). The strip is one item's photo set, so five unrelated stock images misrepresented what the screen shows. samplePhotos() no longer needs a seed argument.
brian-fu
force-pushed
the
feat/donation-request-page
branch
from
July 26, 2026 06:29
7dd6708 to
4a49376
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the admin donation-request review screen from Figma. The shared components this screen needed were split out into #124 — this PR is now just the screen.
No database
Per the task, nothing is fetched. The page reads from a local Zustand store seeded from a fixture (
app/donation-request/), and every action (approve, reject, edit donor, schedule/confirm pickup) mutates local state. Field names and actions mirror the review-schema PR, so wiring to the live API later is a fetch swap, not a reshape.Flow (
app/donation-request/[id])ToggleGroup), collapsible.States covered
All 13 Figma frames: donor read/edit/collapsed, photo lightbox, approve/reject dialogs (reused), partially/fully reviewed, schedule pickup, unconfirmed/confirmed pickup, confirm-date, edit-with-warning.
Testing
reviewStatusderivation,DonationItemCard); full suite 125 passing.type-check,lint,prettierclean on all touched files./donation-request/donation-req-001(HTTP 200).Decisions worth a look
Date field: native
<input type="date">with the calendar icon — no calendar popover is designed in any frame, and this needs no new dependency. Easy to swap for aui/calendarlater.Donor edit entry point: no frame shows how donor-edit mode is opened, so an edit affordance sits beside the collapse chevron.
"2/4 Approved": frame 8's label is driven by the real approved/total counts (the frame's own "2 Items Donated" contradicts the hardcoded 2/4).
types.tshas drifted from align donation request review schema with user flows #122 — notablyitemsvs the schema'sfurniture_items, andDonorInformationbundlingsmoking_household/has_pets/pickup_address, which live onDonation(and as split address fields) rather thanDonor.Routes.DONATION_REQUESTS/donationRequestPathare defined but unused; the[id]route param is never read.