Skip to content

0.2.0: editor blur/autofocus/part-tokens, form testids, popover fixed positioning, dialog event rename (BREAKING) - #1

Merged
HelgeSverre merged 6 commits into
mainfrom
feat/v0.2.0
Jul 27, 2026
Merged

HelgeSverre merged 6 commits into
mainfrom
feat/v0.2.0

Conversation

@HelgeSverre

Copy link
Copy Markdown
Member

Summary

0.2.0 — the library-side half of completing sema-lisp/sema#69 (notebook UI migration). Everything the notebook and playground needed to finish adopting @sema-lang/ui:

  • sema-editor: blur() delegate, autofocus support, a documented composed-keydown contract (only Tab is intercepted), and gutter-line state (breakpoint/current) exposed as part tokens — the public hook that replaced internal-class coupling in the playground's debugger specs.
  • sema-input / sema-textarea: testid forwarding onto the inner control (same pattern as editor/markdown) so shadow-piercing test queries work.
  • sema-button: variant="run" + danger reads destructive at rest (Stop button styling).
  • sema-popover (fix): position: fixed strategy — panels escape overflow-clipping ancestors, flip at the viewport edge, clamp horizontally, and close on outside scroll/resize (internal scrolling exempt via composedPath, keeping sema-select usable).
  • sema-dialog (BREAKING): events renamed sema-dialog-open/sema-dialog-close → sema-open/sema-close, aligning with popover. Done now while the dialog has no external consumers. Also fixed: the open host now has a real box (position: fixed; inset: 0) instead of computing 0×0.
  • Roadmap/docs cleanup; custom-elements.json regenerated; version → 0.2.0.

Verification

  • npm test: 299/299 (was 286; +13 new tests covering every addition, all existing suites green)
  • npm run typecheck, npm run lint, npm run build: clean
  • Consumed end-to-end by sema-lisp/sema's notebook (49/49 Playwright) and playground (76 passed / 1 skipped) suites against this exact build

Notes

  • The dialog event rename is the reason for the 0.2.0 minor bump (0.x semver).
  • Publish to npm after merge (tag v0.2.0); the sema-side PR vendors this build's bytes and its notebook-ui-vendor jake recipe pins 0.2.0 for future refreshes.

…rt tokens

- blur() mirrors the focus() delegate into the shadow textarea
- firstUpdated() honors the native autofocus attribute
- class doc pins the composed-keydown pass-through as public API (only Tab
  is intercepted, never stopPropagation on other keys)
- gutter lines expose breakpoint/current state as part tokens so consumers
  and e2e suites stop coupling to internal class names
…eads destructive at rest

- sema-input/sema-textarea forward a testid prop onto the inner control,
  matching the sema-editor/sema-markdown pattern, so shadow-piercing test
  queries work
- variant=run + danger (a Stop button) shows --error border/text at rest,
  not only on hover
Panel is position:fixed, measured from the trigger on open, flipped
vertically at the viewport edge, clamped horizontally, and closed on
outside scroll/resize (scrolling the popover's own content is exempt via
composedPath, which keeps sema-select's listbox usable).
…ost a real box

BREAKING: sema-dialog-open/sema-dialog-close are now sema-open/sema-close,
aligning with sema-popover. The open host is position:fixed inset:0 so it
has a real box matching what is painted (its only child, the backdrop, is
out of flow — visibility checks used to report a shown dialog as hidden).
…omment)

- CHANGELOG 0.2.0 section (Added / Changed-BREAKING / Fixed)
- TODO-COMPONENTS: shipped items moved to Done; stale packaging/CI notes
  removed; event-name + popover-positioning marked resolved
- custom-elements.json regenerated
- sema-markdown fence-degradation comment no longer names one consumer
# Conflicts:
#	package.json
@HelgeSverre
HelgeSverre merged commit ecbdc4a into main Jul 27, 2026
1 check passed
@HelgeSverre
HelgeSverre deleted the feat/v0.2.0 branch August 4, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant