Skip to content

Domma v0.49.0

Choose a tag to compare

@github-actions github-actions released this 27 Sep 22:28
· 267 commits to main since this release

v0.49.0 - Popovers (2026-09-27)

Popovers - E.popover() anchors a panel to a trigger: a title, text, a list or a small form,
opened by click, hover, focus or code, and closed by Esc, a click outside or its own close button. It
is the component help icons, quick-edit panels and profile cards are made of.

💬 Popover

  • E.popover(trigger, {title, content, placement, trigger, dismissible}). Content is text by
    default; a DOM node, or a function returning one on every open, is used as it is; html: true
    sends a string through the sanitiser first.

  • Placement top, bottom, left, right or auto, each with -start / -end. The panel
    flips to another side when there is no room, shifts to stay on screen with its arrow still on the
    trigger, and follows scrolling and resizing. It lives at the end of <body>, so a card with
    overflow: hidden cannot clip it, and sits above modals and slideovers.

  • Accessible by default: a click popover is a dialog - focus moves in, Tab leaves it in page order,
    Esc closes it and puts focus back on the trigger - with aria-haspopup, aria-expanded and
    aria-controls kept up to date. Hover and focus popovers are tooltips joined by
    aria-describedby, and hover ones open on keyboard focus too. Reduced motion skips the fade.

  • One open at a time per group; a popover opened from inside another keeps its parent open.

  • show(), hide(), toggle(), setContent(), setTitle(), update(), destroy(), and
    popover:show / shown / hide / hidden events on the trigger (show and hide can be
    cancelled). Nothing wraps the trigger, and destroy() restores every attribute it set.

🏷️ In markup

  • data-popover="..." (always text), data-popover-title, data-popover-placement and friends,
    or data-popover-content="#template" for rich content, turned into popovers by
    E.popover.scan(root). $.setup() takes component: 'popover'.

  • New showcase page with a tutorial, and docs/Popover.md.