@rolemodel/optics 2.5.0 → 2.5.1

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.
@@ -0,0 +1,143 @@
1
+ ---
2
+ name: github-release
3
+ description: Draft, write, and publish an Optics release on GitHub — checks the version bump, resolves the previous tag, generates notes from the release.yml categories, adds a plain-language line under each PR, and publishes, which ships the package to npm and GitHub Packages and redeploys the docs site. Use this whenever the user mentions cutting a release, bumping the version, drafting or writing release notes, publishing to npm, "what's going out", or updating the CHANGELOG for a release — even if they don't say the words "release notes".
4
+ ---
5
+
6
+ # Optics Release
7
+
8
+ Adapted from the `github-release` skill in RoleModel/bgea_volunteer_care.
9
+
10
+ A release is two steps, with a person in between:
11
+
12
+ 1. **Draft** — check the version, write the notes, save an unpublished draft.
13
+ 2. **Publish** — only once the user says go. Publishing ships the package.
14
+
15
+ Keep them apart. Publishing a release fires `deploy-to-npm.yml` and `deploy-to-ghp.yml`, which
16
+ publish `@rolemodel/optics` to npm and GitHub Packages. An npm version number can never be
17
+ reused, so a mistake means another release.
18
+
19
+ | | |
20
+ | -------- | --------------------------------------------------------------- |
21
+ | Tag | `v2.5.0` (semver, lowercase `v`) |
22
+ | Title | Same as the tag |
23
+ | Baseline | The latest published release |
24
+ | Ships | The tip of `main` |
25
+ | Notes | The categories in `.github/release.yml`, one line under each PR |
26
+
27
+ ---
28
+
29
+ ## Phase 1 — Draft
30
+
31
+ ### 1. Check the version bump is on main
32
+
33
+ The version is bumped in a pull request, not at release time. Before drafting, `main` must have:
34
+
35
+ - `package.json` `"version"` set to the new number
36
+ - The three `.storybook/assets/*.html` example pages pointing at the new CDN version
37
+ - A `## [X.Y.Z] - YYYY-MM-DD` section at the top of `CHANGELOG.md`
38
+
39
+ ```bash
40
+ git fetch origin --tags
41
+ git show origin/main:package.json | grep '"version"'
42
+ grep -o 'optics@[0-9.]*' .storybook/assets/*.html
43
+ gh release list --limit 3
44
+ ```
45
+
46
+ If the version on `main` is not higher than the latest release, stop. Offer to open the bump PR
47
+ instead. Pick the number from what changed: breaking changes are a major bump, anything new is a
48
+ minor bump, and fixes only are a patch.
49
+
50
+ ### 2. Get the change list
51
+
52
+ ```bash
53
+ gh api repos/RoleModel/optics/releases/generate-notes \
54
+ -f tag_name=v<new> -f target_commitish=main -f previous_tag_name=<latest release tag> \
55
+ --jq .body
56
+ ```
57
+
58
+ GitHub sorts PRs into the `.github/release.yml` categories by label. Act on:
59
+
60
+ - **Unlabeled Changes (please categorize these)** — label each PR on GitHub, then generate again.
61
+ Don't ship this heading.
62
+ - **A PR listed twice** — GitHub puts a PR in the first category that matches. Move it only if
63
+ that category is wrong for what it did.
64
+ - **Commits with no PR** — `git log <latest tag>..origin/main --oneline` shows them. Mention one
65
+ only if it changed the shipped CSS.
66
+
67
+ Report what you found, for example "6 PRs: 1 component, 1 dependency, 4 docs; 1 unlabeled".
68
+
69
+ ### 3. Write a line under each PR
70
+
71
+ The readers are developers who use Optics in their apps. Under each PR, add one indented line
72
+ that says what changed for them: the class, token, or variable name, and what it now does. The
73
+ PR body's **Why?** and **What Changed** sections are the best source.
74
+
75
+ | Weak | Strong |
76
+ | ---------------------- | -------------------------------------------------------------------------------------------- |
77
+ | Update icon libraries | The icon library addons point at the latest versions, so every icon in each set is available |
78
+ | Fix documentation site | Fixed the sidebar examples and the switch syntax example on the documentation site |
79
+
80
+ - Dependency PRs: say whether they change the shipped CSS. They usually don't.
81
+ - A PR with nothing to explain (an admin or repo setting) can stand without a line.
82
+ - Keep GitHub's **New Contributors** and **Full Changelog** lines.
83
+
84
+ ### 4. Match the CHANGELOG
85
+
86
+ The `CHANGELOG.md` section for this version should list the same PRs in the same categories.
87
+ If it is missing one, say so. The fix is a follow-up PR, not an edit during the release.
88
+
89
+ ### 5. Create the draft
90
+
91
+ ```bash
92
+ gh release create v<new> --draft --title "v<new>" --notes-file <path> --target main
93
+ ```
94
+
95
+ A draft creates no tag and fires no workflow, so it is safe to redo (`gh release edit`,
96
+ `gh release delete`). Show the user the URL and print the full notes in the chat. Then stop.
97
+
98
+ ---
99
+
100
+ ## Phase 2 — Publish
101
+
102
+ Only after the user says to publish.
103
+
104
+ ```bash
105
+ gh release edit v<new> --draft=false --latest
106
+ ```
107
+
108
+ Then check the three release workflows:
109
+
110
+ ```bash
111
+ gh run list --workflow deploy-to-npm.yml --limit 1
112
+ gh run list --workflow deploy-to-ghp.yml --limit 1
113
+ gh run list --workflow publish-storybook.yml --limit 1
114
+ ```
115
+
116
+ - `publish-storybook.yml` runs on `release: created`. GitHub does not send `created` when a
117
+ draft is published, so the docs site likely did not redeploy. Run it:
118
+ `gh workflow run publish-storybook.yml --ref main`
119
+ - `deploy-to-npm.yml` publishes with npm Trusted Publishing (OIDC), so there is no token. If it
120
+ fails with `E404` or `ENEEDAUTH`, the trusted publisher on npmjs.com (package Settings → Trusted
121
+ Publisher) doesn't match this repo and workflow file. Someone with npm admin access fixes it
122
+ there. Never switch back to an `NPM_TOKEN` that bypasses 2FA.
123
+ - To retry, `gh run rerun <run id> --failed` builds from the tag with the workflow file as it was
124
+ at the tag. If the workflow was fixed after the tag, use
125
+ `gh workflow run deploy-to-npm.yml --ref main` instead, and only if `main` has no CSS changes
126
+ since the tag.
127
+
128
+ Confirm the package is out:
129
+
130
+ ```bash
131
+ npm view @rolemodel/optics version
132
+ ```
133
+
134
+ Finally, give the user the notes as a copyable block for Slack, without the Full Changelog link.
135
+
136
+ ---
137
+
138
+ ## Guardrails
139
+
140
+ - **Never publish without the user's go-ahead.** It ships a package version that can't be taken
141
+ back.
142
+ - **Never release from a branch.** The target is always `main`, after the bump PR has merged.
143
+ - **Never invent a PR or what it did.** If a PR body is thin, say the line is a guess and ask.
Binary file
package/CHANGELOG.md CHANGED
@@ -4,6 +4,29 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [2.5.1] - 2026-10-01
8
+
9
+ ### Component Changes
10
+
11
+ - Update table classes for consistency by @Jeremy-Walton in https://github.com/RoleModel/optics/pull/364
12
+ - The table modifiers now put the modifier name before its value: `.table--layout-auto`, `.table--layout-fixed`, `.table--density-default`, `.table--density-comfortable`, `.table--density-compact`, `.table--striped-even` and `.table--striped-odd`. The old names (such as `.table--comfortable-density`) still work, so no change is needed.
13
+
14
+ ### Dependencies
15
+
16
+ - Bump brace-expansion from 1.1.16 to 1.1.21 by @dependabot[bot] in https://github.com/RoleModel/optics/pull/361
17
+ - A development dependency was updated in the lockfile. It does not affect the shipped CSS.
18
+ - Bump undici from 7.29.0 to 7.30.0 by @dependabot[bot] in https://github.com/RoleModel/optics/pull/362
19
+ - A development dependency was updated in the lockfile. It does not affect the shipped CSS.
20
+
21
+ ### Repository Changes
22
+
23
+ - Add a github-release skill by @dallasbpeters in https://github.com/RoleModel/optics/pull/360
24
+ - Added a Claude Code skill that runs the same release steps every time.
25
+ - Publish to npm with Trusted Publishing by @dallasbpeters in https://github.com/RoleModel/optics/pull/363
26
+ - The package is now published to npm with Trusted Publishing, so no npm token is stored. Each published version now has provenance, which shows the GitHub workflow that built it.
27
+
28
+ **Full Changelog**: https://github.com/RoleModel/optics/compare/v2.5.0...v2.5.1
29
+
7
30
  ## [2.5.0] - 2026-09-30
8
31
 
9
32
  ### Component Changes
@@ -81,28 +81,37 @@
81
81
  }
82
82
 
83
83
  /* Layout Modifiers */
84
+ /* The *-layout names are kept for backwards compatibility */
85
+ &.table--layout-auto,
84
86
  &.table--auto-layout {
85
87
  table-layout: auto;
86
88
  }
87
89
 
90
+ &.table--layout-fixed,
88
91
  &.table--fixed-layout {
89
92
  table-layout: fixed;
90
93
  }
91
94
 
92
95
  /* Table Density Modifiers */
96
+ /* The *-density names are kept for backwards compatibility */
97
+ &.table--density-default,
93
98
  &.table--default-density {
94
99
  --__op-table-cell-height: var(--_op-table-cell-height-default);
95
100
  }
96
101
 
102
+ &.table--density-comfortable,
97
103
  &.table--comfortable-density {
98
104
  --__op-table-cell-height: var(--_op-table-cell-height-comfortable);
99
105
  }
100
106
 
107
+ &.table--density-compact,
101
108
  &.table--compact-density {
102
109
  --__op-table-cell-height: var(--_op-table-cell-height-compact);
103
110
  }
104
111
 
105
112
  /* Striped Modifiers */
113
+ /* The *-striped names are kept for backwards compatibility */
114
+ &.table--striped-even,
106
115
  &.table--even-striped {
107
116
  tbody tr:nth-child(even) {
108
117
  background-color: var(--op-color-neutral-plus-seven);
@@ -110,6 +119,7 @@
110
119
  }
111
120
  }
112
121
 
122
+ &.table--striped-odd,
113
123
  &.table--odd-striped {
114
124
  tbody tr:nth-child(odd) {
115
125
  background-color: var(--op-color-neutral-plus-seven);
@@ -6142,28 +6142,37 @@ dialog.modal {
6142
6142
  }
6143
6143
 
6144
6144
  /* Layout Modifiers */
6145
+ /* The *-layout names are kept for backwards compatibility */
6146
+ &.table--layout-auto,
6145
6147
  &.table--auto-layout {
6146
6148
  table-layout: auto;
6147
6149
  }
6148
6150
 
6151
+ &.table--layout-fixed,
6149
6152
  &.table--fixed-layout {
6150
6153
  table-layout: fixed;
6151
6154
  }
6152
6155
 
6153
6156
  /* Table Density Modifiers */
6157
+ /* The *-density names are kept for backwards compatibility */
6158
+ &.table--density-default,
6154
6159
  &.table--default-density {
6155
6160
  --__op-table-cell-height: var(--_op-table-cell-height-default);
6156
6161
  }
6157
6162
 
6163
+ &.table--density-comfortable,
6158
6164
  &.table--comfortable-density {
6159
6165
  --__op-table-cell-height: var(--_op-table-cell-height-comfortable);
6160
6166
  }
6161
6167
 
6168
+ &.table--density-compact,
6162
6169
  &.table--compact-density {
6163
6170
  --__op-table-cell-height: var(--_op-table-cell-height-compact);
6164
6171
  }
6165
6172
 
6166
6173
  /* Striped Modifiers */
6174
+ /* The *-striped names are kept for backwards compatibility */
6175
+ &.table--striped-even,
6167
6176
  &.table--even-striped {
6168
6177
  tbody tr:nth-child(even) {
6169
6178
  background-color: var(--op-color-neutral-plus-seven);
@@ -6171,6 +6180,7 @@ dialog.modal {
6171
6180
  }
6172
6181
  }
6173
6182
 
6183
+ &.table--striped-odd,
6174
6184
  &.table--odd-striped {
6175
6185
  tbody tr:nth-child(odd) {
6176
6186
  background-color: var(--op-color-neutral-plus-seven);