Repository navigation
Host supplies the gutter values via --nb-gutter-wide / --nb-gutter-narrow; export gutter defaults (0.38.0) - #133
Merged
Merged
Conversation
Contributor
Author
QA Review: PR #133Scope: 11 files, +65/−25 · worktree: supplied review worktree (creation and dependency installation skipped as requested) · reviewed: 4f7365d · CI: green Critical (must fix)None. Fix in-PR (apply mechanically — no adjudication essay expected)None. Suggestions (optional)None. What Looks Good
Body claims
machine record{
"kind": "review",
"pr": 133,
"round": 1,
"reviewed": "4f7365dba0ad174d1a0d39658d23e321e90e3b82",
"delta_base": null,
"ci": "green",
"risk": "LOW",
"stop_gate": "n/a",
"verdict": "No findings; eligible for qa-reviewed.",
"label": "eligible-on-green",
"findings": []
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The host owns the gutter's value, the same way it owns the colour, font and radius tokens it injects. The kit owns the mechanism, the app decides where content insets and where it bleeds, and the host never pads the app's slot.
Before this change a host could set only
--nb-gutter. That pins one value at every width, so it turns off the narrowing thatAppFramedoes by container query.Change
tokens.gutteris nowvar(--nb-gutter, var(--nb-gutter-auto, var(--nb-gutter-wide, 1.5rem))), andAppFrame's narrow rule sets--nb-gutter-auto: var(--nb-gutter-narrow, 1rem)instead of a literal1rem. A host can set both values and still get the kit's breakpoint.--nb-gutterstill pins one value at every width. When no host var is set, the gutter is unchanged:1.5rem, and1remin a frame 640px wide or narrower.@nimblebrain/synapse/uinow exports the defaults as named constants, so a host can test its values against the kit's:GUTTER_DEFAULT("1.5rem")GUTTER_NARROW_DEFAULT("1rem")GUTTER_NARROW_BREAKPOINT(640, in px)tokens.gutterand the container rule are built from these constants.The comment on the
guttertoken now states who owns what. The AppFrame and tokens docs pages are updated to match.Releases as 0.38.0, a minor bump because this is additive. This PR bumps
package.json,package-lock.jsonand the Python__client_version__, and adds the CHANGELOG entry.Verification
npm run cipasses: lint, typecheck, build, size budget, and 657 tests.synapse-ui.iifeis byte-identical to the vendored Python asset, so it does not need re-vendoring.--nb-gutter-widefallback and the rulevar(--nb-gutter-narrow, 1rem), plus a new test that the three constants are exported from the ui entry with those values.