diff --git a/.gitignore b/.gitignore index 04f701b5..237fa406 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,9 @@ docs/wip/** # Personal Claude Code settings (per-developer, not shared) .claude/settings.local.json + +# transient local scratch (dev session helpers) +.mint.cjs +.chip-preview.* +.shot.cjs +scratch-*.cjs diff --git a/.mint.cjs b/.mint.cjs deleted file mode 100644 index 138979f5..00000000 --- a/.mint.cjs +++ /dev/null @@ -1,3 +0,0 @@ -const fs=require("fs");const {encode}=require("next-auth/jwt"); -const env=Object.fromEntries(fs.readFileSync(".env.local","utf8").split("\n").filter(l=>l.includes("=")).map(l=>{const i=l.indexOf("=");return[l.slice(0,i).trim(),l.slice(i+1).trim().replace(/^["']|["']$/g,"")]})); -encode({token:{email:"khalim@domna.homes",name:"K",onboarded:true,sub:"verify"},secret:env.NEXTAUTH_SECRET}).then(t=>console.log(t)); diff --git a/src/app/portfolio/[slug]/(portfolio)/settings/tags/TagsCard.tsx b/src/app/portfolio/[slug]/(portfolio)/settings/tags/TagsCard.tsx index 47419323..b9c0d4a4 100644 --- a/src/app/portfolio/[slug]/(portfolio)/settings/tags/TagsCard.tsx +++ b/src/app/portfolio/[slug]/(portfolio)/settings/tags/TagsCard.tsx @@ -6,6 +6,7 @@ import { Button } from "@/app/shadcn_components/ui/button"; import { Input } from "@/app/shadcn_components/ui/input"; import { Pencil, Trash2, Check, X, Plus } from "lucide-react"; import { MAX_TAG_NAME_LENGTH } from "@/lib/tags/model"; +import { TagChip } from "@/app/portfolio/[slug]/components/TagChip"; interface Tag { id: string; @@ -135,18 +136,6 @@ export default function TagsCard({ portfolioId }: { portfolioId: string }) { ); } -function TagChip({ colour, name }: { colour: string; name: string }) { - return ( - - - {name} - - ); -} - function TagRow({ portfolioId, tag, diff --git a/src/app/portfolio/[slug]/components/PropertyFilters.tsx b/src/app/portfolio/[slug]/components/PropertyFilters.tsx index 979c5c77..b6551978 100644 --- a/src/app/portfolio/[slug]/components/PropertyFilters.tsx +++ b/src/app/portfolio/[slug]/components/PropertyFilters.tsx @@ -3,7 +3,7 @@ import React, { useState, useRef, useEffect } from "react"; import { X, Plus, ChevronDown, Check } from "lucide-react"; import { getEpcColorClass } from "@/app/utils"; -import { tagChipStyle } from "@/lib/tags/colour"; +import { tagDotColour } from "@/lib/tags/colour"; import { Tag, usePortfolioTags } from "./useTags"; import { FilterGroups, @@ -512,7 +512,7 @@ function TagMultiDropdown({ > {opt.label} {t.name} diff --git a/src/app/portfolio/[slug]/components/TagChip.tsx b/src/app/portfolio/[slug]/components/TagChip.tsx index 1ef68862..f2bb8f9c 100644 --- a/src/app/portfolio/[slug]/components/TagChip.tsx +++ b/src/app/portfolio/[slug]/components/TagChip.tsx @@ -1,12 +1,14 @@ "use client"; import { X } from "lucide-react"; -import { tagChipStyle } from "@/lib/tags/colour"; +import { tagChipTokens } from "@/lib/tags/colour"; /** - * A Tag chip: solid fill in the Tag's freeform hex, with auto-contrast text so - * any colour stays legible (ADR-0013). Shared across the property table, the - * tags filter, and the run UI so every surface reads as one system. + * A Tag chip in the app's one calm, AA-safe chip vocabulary (ADR-0013, + * PRODUCT.md): a soft tint of the Tag's freeform hex, a colour dot, and dark + * hue-preserving ink that stays legible for any colour. Shared across the + * property table, tags filter, bulk bar, upload, settings, and run UI so every + * surface reads as one system. */ export function TagChip({ name, @@ -21,16 +23,23 @@ export function TagChip({ onRemove?: () => void; title?: string; }) { + const tokens = tagChipTokens(colour); const sizing = size === "xs" - ? "px-1.5 py-0.5 text-[10px]" - : "px-2 py-0.5 text-[11px]"; + ? "gap-1 px-1.5 py-0.5 text-[10px]" + : "gap-1.5 px-2 py-0.5 text-[11px]"; + const dot = size === "xs" ? "h-1.5 w-1.5" : "h-2 w-2"; return ( + {name} {onRemove && (