Local-government decision UI, starting with San José - #308
Open
ThatXliner wants to merge 7 commits into
Open
Conversation
…paginated The relevance term fell back to `order by 0`, which Postgres rejects as an ordinal reference, so every district-less query failed. The relevance sort now only applies when a district filter is present. Also add an optional `cursor` alias for `offset` so tRPC's tanstack infinite-query helpers can drive paging, matching the content.getByType convention. The old `offset` input stays valid for compatibility.
Run `tsx --test` over src/**/*.test.ts so utility modules without React Native dependencies can be unit tested like the scraper and api packages.
NavHeader and Pill hardcoded white-on-dark colors, so new light-theme surfaces rendered invisible titles and pills. ExternalLink now accepts runtime official-source URLs instead of literal routes only, and Icon gains users/mic/link glyphs for the decision UI.
Replace the buried Local Bills prototype with a decision-oriented flow: entry preview on the Elections tab, a jurisdiction-neutral list screen (upcoming/recent, topic filters, pagination, pull-to-refresh, skeletons, stale/error/empty states) and a detail screen with the multi-meeting timeline, named votes, official documents, link-only public comments and labeled participation guidance. Presentation logic lives in a pure, RN-free utils module inferred from the real tRPC outputs so lifecycle normalization, scope labels, timeline ordering and missing-vote language are unit tested (30 tests). Missing fields are always shown as unknown — never as a vote that didn't happen or a summary nobody wrote.
Entry point, list (dark/light, upcoming/recent, error state) and detail (documents, votes, participation) captured at 390x844 against the live tRPC endpoints.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…-local-decisions-ui
The tRPC 11.16 upgrade (via main's Expo 57 release) no longer exposes infiniteQueryOptions on procedures whose input schema is optional, which broke the decision list's pagination typing. Every caller sends input, so the schema no longer needs .optional().
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.
Closes #282 (UI). Stacked on #302 — the decision-oriented tRPC endpoints.
What
Replaces the buried "Local Bills" prototype with a decision-oriented local-government experience:
LocalDecisionsPreviewnear the top of the Elections tab (plus a replacement preview on "Where & How to Vote"), jurisdiction-aware wording from the saved address, live upcoming items/local-decisions) — Upcoming / Recently decided, topic filters (only when data exists), cursor pagination, pull-to-refresh, skeletons, stale-sync / source-error / empty states, one card per Matter/local-decision-detail?id=…) — plain-language lifecycle, key facts, official source link, multi-meeting occurrence timeline with per-occurrence action/tally/named votes, published history, typed official documents, link-only public comments, labeled general participation guidance, provenance footerShared, jurisdiction-neutral building blocks live in
components/local-government/; all presentation logic is pure and RN-free inutils/local-government.ts, typed from the real tRPC outputs (30 tests). Prototype components (LocalBillsSection,UpcomingMeetingsSection,VotingRecordsSection) are removed.Small backend corrections in
legistar.listDecisions(see first commit): the district-lessORDER BY 0crash and an optionalcursoralias foroffsetso tRPC infinite queries work.Truthfulness rules baked in
Screenshots (390×844, live tRPC endpoints)
Verification
pnpm --filter @acme/expo format|lint|typecheckclean;test30 passpnpm --filter @acme/api format|lint|typecheckclean;test22 passpnpm --filter @acme/scraper test135 pass (no regressions)Backend-dependent gaps
local_decision— omitted rather than faked