@the-portland-company/shell 0.78.0 → 0.80.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,20 @@
1
+ ## 0.80.0
2
+
3
+ The URL-state helper. Specs cited: Reference/UI-Platform "URL state" (decided 2026-10-06, Spencer) and Global Rules → URL State. Until now the page said the helper "ships in a shell minor release" and no app could carry `section=` without concatenating by hand.
4
+
5
+ - **`@the-portland-company/shell/url-state`** (pure, server- and client-safe): `readUrlState`, `writeUrlState`, `buildSearch`, `normalizeUrlState`, `historyMode`, `slugify`, `URL_STATE_KEYS`, `URL_STATE_MODES`.
6
+ - Reads and writes `?mode=&page=&tab=&section=&org_id=` in the fixed order, keeps every feature parameter after them in its own order, writes a full org uuid as its 7-character tail, and refuses a feature parameter that names a base key.
7
+ - `normalizeUrlState(search, { page, mode?, tabs?, sections?, org_id? })` fills a missing default and corrects an unknown `tab` or `section` to the first one, reporting whether the URL needs a replace. `historyMode(prev, next)`: `push` for a `mode`, `org_id`, `page` or `tab` change, `replace` for a `section`-only change or a normalization.
8
+ - Section tracking on scroll (debounced replace) and the scroll-into-view on load are the consuming app's to wire with this helper; the shell's own frame does not touch the URL.
9
+
10
+ ## 0.79.0
11
+
12
+ Battleground and District Data on their own hosts. Specs cited: Reference/UI-Platform "Dashboard, Battleground and District Data are three features in two Modes" (decided 2026-10-12), Specs/Left-Navigation §9.2, §13 ("Measured 2026-10-12") and §14.
13
+
14
+ - **Registry.** `battleground` origin → `https://battleground.politogyvrm.com`, `districts` origin → `https://districts.politogyvrm.com` (both `mode: 'campaign'`, unchanged otherwise).
15
+ - **Left bar.** The Campaign tree's Battleground and District data rows link to those hosts (`.../battleground`, `.../districts`, org carried as before).
16
+ - **Served by** the dashboard deployment (politogy-dashboard #47), which answers at the new hosts and, with `CAMPAIGN_HOSTS_LIVE`, redirects its old `dashboard.politogyvrm.com/battleground` and `/districts` paths there permanently. Release this and flip that flag together.
17
+
1
18
  ## 0.78.0
2
19
 
3
20
  Dashboard, Battleground and District Data are three features in two Modes; no Polls row in the Relationship left bar. Specs cited: Reference/UI-Platform "Dashboard, Battleground and District Data are three features in two Modes" (decided 2026-10-12, Ben), Specs/Left-Navigation §9.1 and §9.2.
@@ -2171,6 +2171,8 @@ var SIGNS_ORIGIN = "https://signs.politogyvrm.com/";
2171
2171
  var POLLS_ORIGIN = "https://polls.politogyvrm.com/";
2172
2172
  var SETTINGS_ORIGIN = "https://settings.politogyvrm.com/";
2173
2173
  var DASHBOARD_ORIGIN = "https://dashboard.politogyvrm.com/";
2174
+ var BATTLEGROUND_ORIGIN = "https://battleground.politogyvrm.com/";
2175
+ var DISTRICTS_ORIGIN = "https://districts.politogyvrm.com/";
2174
2176
  var AUTH_ORIGIN = "https://auth.politogyvrm.com/";
2175
2177
  var PETITION_MODE_ORIGIN = "https://petition-mode.politogyvrm.com/";
2176
2178
  function applyHiddenItems(items, hidden) {
@@ -2377,15 +2379,11 @@ function standardPolitogyNav(opts) {
2377
2379
  // Battleground is the Campaign landing page; there is no Campaign
2378
2380
  // Dashboard row, and Voter Contact and Tribes have no row.
2379
2381
  { kind: "section", label: "Race data" },
2380
- // Battleground is its own Campaign Mode app (registry key
2381
- // `battleground`), not part of the Dashboard. It is served from the
2382
- // dashboard deployment only until battleground.politogyvrm.com is live
2383
- // (Reference/UI-Platform, decided 2026-10-12).
2384
- { label: "Battleground", icon: icon("crosshair"), href: withOrg(`${DASHBOARD_ORIGIN}battleground`) },
2385
- // District Data is its own Campaign Mode app (registry key
2386
- // `districts`); served from the dashboard deployment until
2387
- // districts.politogyvrm.com is live.
2388
- { label: "District data", icon: icon("landmark"), href: withOrg(`${DASHBOARD_ORIGIN}districts`) },
2382
+ // Battleground is the Campaign Mode landing page, its own app on its own
2383
+ // host (registry key `battleground`; Specs/Left-Navigation §9.2, §13, §14).
2384
+ { label: "Battleground", icon: icon("crosshair"), href: withOrg(`${BATTLEGROUND_ORIGIN}battleground`) },
2385
+ // District Data is its own Campaign Mode app on its own host (registry key `districts`).
2386
+ { label: "District data", icon: icon("landmark"), href: withOrg(`${DISTRICTS_ORIGIN}districts`) },
2389
2387
  { kind: "section", label: "Research" },
2390
2388
  {
2391
2389
  label: "Polling",
@@ -4551,17 +4549,14 @@ var POLITOGY_APPS = {
4551
4549
  // hosts org settings & billing (Specs/Organization-Settings).
4552
4550
  dashboard: { title: "Dashboard", origin: "https://dashboard.politogyvrm.com", storagePrefix: "dashboard" },
4553
4551
  // Battleground (the Campaign Mode landing page) and District Data are
4554
- // Campaign Mode features, each its own app (Specs/Left-Navigation §9.2;
4555
- // Reference/UI-Platform, decided 2026-10-12). They are never rendered with
4556
- // `app="dashboard"`: that frame is the Relationship rail, which is how they
4557
- // came to show inside Relationship Mode. Their hosts are decided
4558
- // (UI-Platform, 2026-10-12): battleground.politogyvrm.com and
4559
- // districts.politogyvrm.com. Neither is live yet, so the pages are still
4560
- // served from the dashboard deployment and the origin below is that host.
4561
- // When a host goes live, change its origin here and its row's href in
4562
- // standardNav in the same release.
4563
- battleground: { title: "Battleground", origin: "https://dashboard.politogyvrm.com", storagePrefix: "battleground", mode: "campaign" },
4564
- districts: { title: "District Data", origin: "https://dashboard.politogyvrm.com", storagePrefix: "districts", mode: "campaign" },
4552
+ // Campaign Mode features, each its own app on its own host (Specs/Left-
4553
+ // Navigation §9.2, §13, §14; Reference/UI-Platform, decided 2026-10-12).
4554
+ // They are never rendered with `app="dashboard"`: that frame is the
4555
+ // Relationship rail. The dashboard deployment serves these hosts
4556
+ // (politogy-dashboard #47) and redirects its old /battleground and
4557
+ // /districts paths here; the rows' hrefs in standardNav move together.
4558
+ battleground: { title: "Battleground", origin: "https://battleground.politogyvrm.com", storagePrefix: "battleground", mode: "campaign" },
4559
+ districts: { title: "District Data", origin: "https://districts.politogyvrm.com", storagePrefix: "districts", mode: "campaign" },
4565
4560
  settings: { title: "Settings", origin: "https://settings.politogyvrm.com", storagePrefix: "settings" },
4566
4561
  petitions: {
4567
4562
  title: "Petitions",