Skip to content

embed v0.4.0

Choose a tag to compare

@hhkaos hhkaos released this 13 Aug 00:17
· 56 commits to main since this release

Added

  • group-events="series,multipart" attribute: in layout="cards", collapses
    events sharing the same partOf.id into a single stacked card with a
    mandatory "Series"/"Multi-part" badge. The header card is always the
    group's next upcoming occurrence (or the most recent past one if none are
    upcoming). Opt-in only — absent by default, so existing embeds are
    unaffected. list and calendar layouts are unchanged; every occurrence
    keeps rendering individually there.
  • The detail modal gains prev/next navigation and an "N of M" counter when
    opened from a grouped card, letting a viewer step through every occurrence.
  • PreviewEvent.id and PreviewEvent.partOf (from @opentechevents/preview-feed)
    are now first-class fields, alongside the existing id detail row.
  • EventRenderContext.group exposes { key, type, index, total, members }
    for the currently-rendered occurrence, so host apps (e.g. the editor's own
    eventActions) can react to group membership. ote-event-action's DOM
    event detail carries the same group field when applicable.
  • Past occurrences (only reachable with show-past="true") now render at
    reduced opacity in list/cards layouts, so upcoming events stand out.
  • fields-preview and fields-detail attributes let you configure the card
    (preview) and the detail modal/list-body independently, instead of the
    single fields attribute controlling both. fields still works as a
    shared fallback for both when the specific attribute is absent, so
    existing embeds are unaffected.
  • eligibility and cfp are now captured from OTE feeds (via
    @opentechevents/preview-feed) and rendered as small, linkable badges —
    e.g. "Members only" or "Call for Proposals" — wherever fields/
    fields-preview/fields-detail includes them. Off by default on the card
    (same opt-in policy as group-events), but shown by default in the detail
    modal along with every other optional field.
  • A priced event's badge now links to its registration/ticket URL when the
    winning offers[] entry has one (PreviewEvent.price.url).
  • card-width attribute ("small"/"medium"/"large", or any raw CSS
    length) and the underlying --ote-card-min-width CSS custom property
    control the minimum card width — and so, responsively, the column count —
    in layout="cards". Default (220px) is unchanged.

Fixed

  • The detail modal now closes on Escape. The keydown listener already
    existed but nothing ever moved focus into the modal, so the key never
    reached it; opening a modal now focuses its close button.
  • Markdown inline formatting is now recursive: a link nested inside
    **bold** or *italic* (e.g. **see [our calendar](https://...)**) now
    renders as an actual link instead of literal [text](url).
  • Numbered lists (1. , 2. ) in Markdown descriptions now render as <ol>
    instead of showing the literal 1. prefix as plain text.
  • Markdown descriptions are now rendered with marked (the same
    CommonMark+GFM parser the editor's own preview uses) instead of a hand-rolled
    line-based parser, with DOMPurify sanitizing the result since feed
    descriptions come from a remote, untrusted source. Headings (### ...) were
    previously stripped down to plain paragraph text; they now render as real
    <h1>-<h6> elements. A sub-list nested inside a list item (e.g. a bullet
    list under one step of a numbered list) previously got flattened into a
    separate sibling list; it now stays correctly nested.
  • The detail modal now respects field configuration (fields/
    fields-detail) instead of always rendering every optional field
    unconditionally, regardless of what the card was configured to show.
  • The location field no longer echoes the attendance badge's "Online" label
    for an online event with no link (now "No public link", with a title
    tooltip noting the organizer may share it privately), and no longer wrongly
    claims "Online" for an in-person/hybrid event with no venue (now "Venue not
    specified"). Both were symptoms of the same upstream fallback in
    @opentechevents/preview-feed defaulting to a generic "online" location
    whenever a source gave no venue and no URL, regardless of the event's
    actual attendanceMode.