Embeddable <ote-events> web component (closes #27) - #28
Merged
Conversation
Extracts the OTE JSON/ICS/RSS-to-display normalizer already living inline in apps/preview/src/main.ts into a new shared @opentechevents/preview-feed package, then builds apps/embed on top of it: a single <ote-events> custom element (feed/limit/theme/lang/show-past/layout attributes, list/cards layouts, shadow-DOM --ote-* theming) plus an interactive playground page that doubles as its documentation and copy-paste snippet generator. The widget only fetches native JSON feeds — preview-feed is built with sideEffects:false so esbuild tree-shakes the heavier ICS/RSS converters (ical.js, DOMParser) out of its bundle, keeping dist/ote-events.js at ~7kb. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011dPq4KUvwFaPbSUmYXBGae
Wires the new embeddable widget into the same GitHub Pages pipeline that already publishes the editor and feed previewer, so the script URL used in the playground snippet (tools.opentechevents.org/embed/ote-events.js) resolves once this merges to main. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011dPq4KUvwFaPbSUmYXBGae
This was referenced Aug 7, 2026
3 tasks
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.
Summary
apps/preview/src/main.tsinto a new shared, private@opentechevents/preview-feedpackage (with its own fixtures/tests), so it isn't duplicated between the previewer and the new widget.apps/embed: a single<ote-events>custom element (feed/limit/theme/lang/show-past/layoutattributes, list/cards layouts, Shadow DOM with--ote-*CSS custom-property theming, loading/empty/error states) plus an interactive playground page that doubles as its documentation (every control maps to one attribute, live preview, copy-paste snippet generator).preview-feedis built withsideEffects:falseso esbuild tree-shakes the heavier ICS/RSS converters (ical.js,DOMParser) out ofdist/ote-events.js, which comes out to ~7kb minified.apps/embedintodeploy-tools.ymlsotools.opentechevents.org/embed/ote-events.js(the URL referenced in the playground snippet) resolves once this merges.Test plan
pnpm build && pnpm test && pnpm typecheck && pnpm lint— all green across the whole workspace (578 tests)https://combuilderses.github.io/events/feed.json, currently empty — correctly renders the empty state) and against a synthetic feed with past/future events: list layout, cards layout, light/dark theme,show-past,lang=es/en, and the error state on a broken feed URL all render correctly.apps/embed/CLAUDE.md.deploy-tools.ymlchange once merged (tools.opentechevents.org/embed/should come up alongside/editor/and/preview/).Closes #27.
https://claude.ai/code/session_011dPq4KUvwFaPbSUmYXBGae