@the-portland-company/shell 0.81.1 → 0.82.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## 0.82.0
2
+
3
+ The universal-search placeholder names what the current Mode searches. Spec cited: Reference/UI-Platform v56 "Top bar — required elements" (decided by Ben, 2026-10-12).
4
+
5
+ - Relationship: "Search contacts, Tribes, forms" · Campaign: "Search voters, walk lists, polls" · Petition: "Search petitions, sheets, circulators". The Glossary term is Tribe, so the design frame's "segments" is not used.
6
+ - A mode-scoped app takes its registry mode; an unscoped app (Contacts, Forms, Surveys, CTAs, Settings) follows the mode the pill shows. `data.searchPlaceholder` still overrides. The old per-app table (Contacts only) is gone.
7
+ - `NavMode` gains `id`; new export `MODE_SEARCH_PLACEHOLDER`.
8
+ - Tests: `__tests__/searchPlaceholder.test.tsx`.
9
+
10
+ ## 0.81.2
11
+
12
+ The rail header matches the Left Navigation design's vertical rhythm. Spec cited: Specs/Left-Navigation §3-§7 (values the page states are unchanged; the design decides the gaps it does not state).
13
+
14
+ - **Cause.** The org card's white band was fixed at 70px, the Brand `orgLogoMaxHeight` cap, where the design draws a 52px band; the ORGANIZATION eyebrow sat 21px under the lockup where the design has 16px; the mode caption sat 6px under the track where the design has 8px. Every section row landed about 26px low (Design Compare, 2026-10-12: label_moved on Relationship mode / Dashboard / Contacts).
15
+ - **Fix.** `--sidebar-org-band-height: 52px` (logos still scale to fit; the 70px Brand token stays the logo cap), eyebrow margins 2px/9px, caption 8px.
16
+
1
17
  ## 0.81.1
2
18
 
3
19
  The active row's left marker is visible. Spec cited: Specs/Left-Navigation §8.1 ("9% white tint, semibold white text, and a 2px inset marker on the left edge in white").
@@ -2742,7 +2742,7 @@ function NavSidebar({
2742
2742
  }
2743
2743
  ),
2744
2744
  org ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: rc("max-md:flex max-md:justify-center"), children: [
2745
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: `mb-[7px] mt-[7px] flex items-center justify-between ${rc("max-md:hidden")}`, children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: NAV_EYEBROW_CLASS, children: "Organization" }) }),
2745
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `mb-[9px] mt-[2px] flex items-center justify-between ${rc("max-md:hidden")}`, children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: NAV_EYEBROW_CLASS, children: "Organization" }) }),
2746
2746
  org.loading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex w-full items-center gap-2.5 rounded-md border border-[color:var(--line)] bg-[color:var(--panel-elevated)] px-2.5 py-2 shadow-sm ${rc("max-md:w-auto max-md:border-0 max-md:bg-transparent max-md:p-0 max-md:shadow-none")}`, children: [
2747
2747
  /* @__PURE__ */ jsxRuntime.jsx(
2748
2748
  "span",
@@ -2938,7 +2938,7 @@ function NavSidebar({
2938
2938
  )
2939
2939
  }
2940
2940
  ),
2941
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: `mt-1.5 text-left text-[11px] leading-[1.2] text-[color:var(--sidebar-caption,var(--sidebar-text-muted,var(--muted)))] ${rc("max-md:hidden")}`, children: modeCaption(mode.label) })
2941
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: `mt-2 text-left text-[11px] leading-[1.2] text-[color:var(--sidebar-caption,var(--sidebar-text-muted,var(--muted)))] ${rc("max-md:hidden")}`, children: modeCaption(mode.label) })
2942
2942
  ] }) : null
2943
2943
  ] }),
2944
2944
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-1 flex-col overflow-y-auto px-[10px] py-3", children: /* @__PURE__ */ jsxRuntime.jsxs("nav", { className: "flex flex-col gap-0.5", children: [
@@ -4614,8 +4614,10 @@ var POLITOGY_APPS = {
4614
4614
  canvass: { title: "Field Canvassing", origin: "https://canvass.politogyvrm.com", storagePrefix: "canvass", mode: "campaign", grants: ["title"] },
4615
4615
  signs: { title: "Sign Mapping", origin: "https://signs.politogyvrm.com", storagePrefix: "signs", mode: "campaign", grants: ["title"] }
4616
4616
  };
4617
- var DEFAULT_SEARCH_PLACEHOLDER = {
4618
- contacts: "Search contacts, segments, forms"
4617
+ var MODE_SEARCH_PLACEHOLDER = {
4618
+ relationship: "Search contacts, Tribes, forms",
4619
+ campaign: "Search voters, walk lists, polls",
4620
+ petition: "Search petitions, sheets, circulators"
4619
4621
  };
4620
4622
  function PolitogyAppFrame({
4621
4623
  app,
@@ -4893,7 +4895,9 @@ function FrameBody({
4893
4895
  // search is the only thing on the left end of the bar. No app wires
4894
4896
  // search yet, so this stays decorative (`NavTopBarProps.search` — "an
4895
4897
  // app that has not wired search yet still gets the correct chrome").
4896
- search: { placeholder: data?.searchPlaceholder ?? DEFAULT_SEARCH_PLACEHOLDER[app] ?? "Search" },
4898
+ search: {
4899
+ placeholder: data?.searchPlaceholder ?? MODE_SEARCH_PLACEHOLDER[appMode ?? mode.id ?? "relationship"] ?? "Search"
4900
+ },
4897
4901
  // No Build notes control (Reference/UI-Platform, decided 2026-10-03).
4898
4902
  // The action cluster is IDENTICAL everywhere — core included. Page
4899
4903
  // actions sit BEFORE it, never inside it, so the Alerts bell keeps its
@@ -5539,6 +5543,7 @@ function useChromeMode(arg = {}) {
5539
5543
  const selected = selectedModeId ? options.find((m) => m.id === selectedModeId) ?? null : null;
5540
5544
  const current = pinned ?? selected ?? options[0] ?? MODE_DEFS.find((m) => m.id === fallbackModeId) ?? MODE_DEFS[0];
5541
5545
  return {
5546
+ id: current.id,
5542
5547
  label: current.label,
5543
5548
  icon: current.icon,
5544
5549
  // Left-Navigation §7 / Reference/UI-Platform: always the row of three icon
@@ -5571,6 +5576,7 @@ function useChromeMode(arg = {}) {
5571
5576
 
5572
5577
  exports.ChromeTopBarActions = ChromeTopBarActions;
5573
5578
  exports.LoadingScreen = LoadingScreen;
5579
+ exports.MODE_SEARCH_PLACEHOLDER = MODE_SEARCH_PLACEHOLDER;
5574
5580
  exports.POLITOGY_APPS = POLITOGY_APPS;
5575
5581
  exports.PolitogyAppChrome = PolitogyAppChrome;
5576
5582
  exports.PolitogyAppFrame = PolitogyAppFrame;