- Notifications
You must be signed in to change notification settings - Fork 0
feat(mockups): add the Development page the Settings entry opens#2135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
003e1ea
feat(mockups): add the Development page the Settings entry opens
BigSimmo 792e771
Merge branch 'main' into claude/development-index-page
BigSimmo 5222ca5
Merge branch 'main' into claude/development-index-page
BigSimmo bddec1b
Merge branch 'main' into claude/development-index-page
BigSimmo 8690c79
fix(mockups): state the mockups production gate accurately on the Dev…
claude f0f3547
Merge branch 'main' into claude/development-index-page
BigSimmo b6451a1
Merge branch 'main' into claude/development-index-page
BigSimmo 5b3b3a8
Merge branch 'main' into claude/development-index-page
BigSimmo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| import type { Metadata } from "next"; | ||
| import Link from "next/link"; | ||
| import { ArrowRight, FlaskConical, ShieldAlert } from "lucide-react"; | ||
| import { CARING_CONTACT_MOCKUP_ROUTES } from "@/components/caring-contacts/mockups/routes"; | ||
| export const metadata: Metadata = { | ||
| title: "Development · Clinical KB", | ||
| description: "In-progress surfaces, off by default in a production deploy.", | ||
| }; | ||
| // The index of what is being built. It lives under /mockups so it inherits the | ||
| // namespace's production gate (`mockupsEnabled()` in the mockups layout) rather | ||
| // than needing a second one: always on outside production, and 404 in a | ||
| // production deploy unless that deploy sets NEXT_PUBLIC_MOCKUPS_ENABLED=true — | ||
| // exactly like the surfaces it links to. | ||
| const DEVELOPMENT_SURFACES = [ | ||
| { | ||
| id: "caring-contacts", | ||
| name: "Caring Contact", | ||
| summary: | ||
| "Linked prototype of the one-way caring-contacts coordination workflow: 13 routes, the activation flow, and the offline, permission, session-expiry, conflict and recovery states.", | ||
| href: CARING_CONTACT_MOCKUP_ROUTES.today, | ||
| status: "Synthetic prototype", | ||
| entries: [ | ||
| { label: "Today", href: CARING_CONTACT_MOCKUP_ROUTES.today }, | ||
| { label: "Patients", href: CARING_CONTACT_MOCKUP_ROUTES.patients }, | ||
| { label: "Schedule", href: CARING_CONTACT_MOCKUP_ROUTES.schedule }, | ||
| { label: "Templates", href: CARING_CONTACT_MOCKUP_ROUTES.templates }, | ||
| { label: "System states", href: CARING_CONTACT_MOCKUP_ROUTES.systemStates }, | ||
| ], | ||
| }, | ||
| ] as const; | ||
| export default function DevelopmentIndexPage() { | ||
| return ( | ||
| <main className="mx-auto grid w-full max-w-[64rem] gap-6 px-4 py-8 sm:px-6" data-testid="development-index"> | ||
| <header className="grid gap-2"> | ||
| <p className="inline-flex items-center gap-2 text-xs font-extrabold uppercase tracking-wide text-[color:var(--clinical-accent)]"> | ||
| <FlaskConical aria-hidden="true" className="size-icon-sm" /> | ||
| Development | ||
| </p> | ||
| <h1 className="text-2xl font-extrabold text-[color:var(--text-heading)] sm:text-3xl">In-progress surfaces</h1> | ||
| <p className="max-w-3xl text-sm leading-6 text-[color:var(--text-muted)]"> | ||
| Work being built, reachable from Settings while it is in development. These routes are not part of the | ||
| clinical product, and a production deploy 404s them unless it explicitly opts in. | ||
| </p> | ||
| </header> | ||
| <p className="flex items-start gap-2 rounded-xl border border-[color:var(--warning)]/30 bg-[color:var(--warning-soft)] px-4 py-3 text-sm leading-6 text-[color:var(--text)]"> | ||
| <ShieldAlert aria-hidden="true" className="mt-0.5 size-icon-sm shrink-0 text-[color:var(--warning)]" /> | ||
| <span> | ||
| <strong className="font-extrabold text-[color:var(--text-heading)]">Synthetic data only.</strong> No patient, | ||
| message, schedule or team record on these surfaces is real, and nothing here is validated clinical decision | ||
| support. | ||
| </span> | ||
| </p> | ||
| <ul className="grid gap-4"> | ||
| {DEVELOPMENT_SURFACES.map((surface) => ( | ||
| <li | ||
| key={surface.id} | ||
| className="grid gap-3 rounded-xl border border-[color:var(--border)] bg-[color:var(--surface)] p-5 shadow-[var(--shadow-inset)]" | ||
| > | ||
| <div className="flex flex-wrap items-center gap-x-3 gap-y-1"> | ||
| <h2 className="text-lg font-extrabold text-[color:var(--text-heading)]">{surface.name}</h2> | ||
| <span className="rounded-full border border-[color:var(--border)] px-2 py-0.5 text-xs font-bold text-[color:var(--text-muted)]"> | ||
| {surface.status} | ||
| </span> | ||
| </div> | ||
| <p className="max-w-3xl text-sm leading-6 text-[color:var(--text-muted)]">{surface.summary}</p> | ||
| <Link | ||
| href={surface.href} | ||
| className="inline-flex min-h-tap w-full items-center justify-center gap-2 rounded-lg bg-[color:var(--command)] px-4 text-sm font-extrabold text-[color:var(--command-contrast)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[color:var(--focus)] sm:w-auto" | ||
| data-testid={`development-open-${surface.id}`} | ||
| > | ||
| Open {surface.name} prototype | ||
| <ArrowRight aria-hidden="true" className="size-icon-sm" /> | ||
| </Link> | ||
| <div className="flex flex-wrap gap-2 border-t border-[color:var(--border)] pt-3"> | ||
| {surface.entries.map((entry) => ( | ||
| <Link | ||
| key={entry.href} | ||
| href={entry.href} | ||
| className="inline-flex min-h-tap items-center rounded-lg border border-[color:var(--border)] px-3 text-xs font-bold text-[color:var(--text)] hover:bg-[color:var(--surface-subtle)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[color:var(--focus)]" | ||
| > | ||
| {entry.label} | ||
| </Link> | ||
| ))} | ||
| </div> | ||
| </li> | ||
| ))} | ||
| </ul> | ||
| </main> | ||
| ); | ||
| } | ||
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
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
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Uh oh!
There was an error while loading. Please reload this page.