|
| 1 | +--- |
| 2 | +'@objectstack/spec': minor |
| 3 | +'@objectstack/platform-objects': patch |
| 4 | +--- |
| 5 | + |
| 6 | +feat(spec)!: `element:text` `variant` refuses `heading` / `subheading` by name — the vocabulary is the nine `ui:text` publishes, and `os migrate meta` rewrites them to `h2` / `h3` (#21015) |
| 7 | + |
| 8 | +**BREAKING** — `heading` and `subheading` leave `ElementTextPropsSchema.variant` (an |
| 9 | +`element:text` page component's `properties.variant`). This is the second release of |
| 10 | +the ruled two-release convergence on the nine values `ui:text` publishes — `h1`-`h6`, |
| 11 | +`body`, `caption`, `overline`. 17.5.0 added the nine and refused nothing; 17.6.0 was |
| 12 | +the full release in which both vocabularies parsed; this release refuses the two old |
| 13 | +spellings. A heading is a document level, not a text style: `heading` and |
| 14 | +`subheading` named a style and left the renderer to pick the level. |
| 15 | + |
| 16 | +### FROM → TO |
| 17 | + |
| 18 | +| removed | what to write instead | |
| 19 | +| --- | --- | |
| 20 | +| `variant: 'heading'` | `variant: 'h2'` — the heading element `heading` always rendered — or the level the page outline means. | |
| 21 | +| `variant: 'subheading'` | `variant: 'h3'` — the heading element `subheading` always rendered — or the level the page outline means. | |
| 22 | + |
| 23 | +**The one-line fix: `heading` → `h2`, `subheading` → `h3`.** |
| 24 | +`os migrate meta --from 17` lists the mechanical edits for existing sources. |
| 25 | + |
| 26 | +The rewrite keeps the heading ELEMENT (so the document outline is unchanged) but not |
| 27 | +the size: `heading` drew in the `h3` style and `subheading` in a medium-weight small |
| 28 | +heading style, and `h2` / `h3` draw their own, larger styles. Where the old look |
| 29 | +mattered more than the level, pick the level whose style you want. |
| 30 | + |
| 31 | +Each retired spelling is refused at parse with a prescription naming the level to |
| 32 | +write, and in `tsc` (the two members are gone from the input type). Any other unknown |
| 33 | +value keeps zod's own message. An `element:text` with no `variant` still parses to |
| 34 | +`body`. |
| 35 | + |
| 36 | +### The retirement kit |
| 37 | + |
| 38 | +- **Value-level retirement.** The enum is declared through `enumWithRetiredValues` |
| 39 | + (`shared/retired-key.ts`), with the two prescriptions module-private. No authorable |
| 40 | + KEY and no def changed, so nothing lands in `RETIRED_KEYS_BY_MAJOR` and the four |
| 41 | + surface ratchets (`api-surface`, `authorable-surface`, `json-schema.manifest`, |
| 42 | + `api-surface-signatures`) are byte-identical; the generated component reference |
| 43 | + page drops the two values. |
| 44 | +- **D2 conversion `element-text-variant-heading-levels`** (step 18, retired from the |
| 45 | + load path): `heading` → `h2` and `subheading` → `h3` on every `element:text` page |
| 46 | + component — regions, named slots and container nesting. Stored `sys_metadata` page |
| 47 | + rows replay it at rehydration; one notice per rewritten block. |
| 48 | +- **D3 entry `element-text-variant-heading-subheading-retired`** carries the judgement |
| 49 | + the conversion cannot make: whether the rewritten level is the one the page means. |
| 50 | +- **No further deprecation window**: 17.6.0 was the window the ruling asked for. |
| 51 | + |
| 52 | +### Producers moved in this repository |
| 53 | + |
| 54 | +- `@objectstack/platform-objects`: the four section headings on the `sys_user` record |
| 55 | + page's Security tab (`Password & Sign-in`, `Two-Factor Authentication`, `Email |
| 56 | + Verification`, `Danger Zone`) move from `subheading` to `h3`. They render the same |
| 57 | + h3 element, in the `h3` style. |
| 58 | +- `examples/app-showcase`: the `page-variables` detail heading moves to `h3`. |
| 59 | + |
| 60 | +⚠️ **The out-of-repo author population is NOT MEASURED.** `@objectstack/spec` is |
| 61 | +published, and tenant-authored pages were not measured. In this repository the five |
| 62 | +writers above were the only ones outside `packages/spec`. objectui at `main` authors |
| 63 | +neither value; its `element:text` renderer, registry `inputs` enum, html tier and the |
| 64 | +published `sdui.manifest.json` still list the two, and drop them once this release is |
| 65 | +installable there (the objectui follow-up). |
| 66 | + |
| 67 | +Clause-②: no (narrowing) |
| 68 | + |
| 69 | +<!-- adr-0087: registered element-text-variant-heading-levels, element-text-variant-heading-subheading-retired --> |
0 commit comments