Skip to content

feat: embed @gemara/react live demo in the website - #52

Draft
PaarthPandey10 wants to merge 1 commit into
gemaraproj:mainfrom
PaarthPandey10:feat/embed-gemara-reat-live-demo
Draft

PaarthPandey10 wants to merge 1 commit into
gemaraproj:mainfrom
PaarthPandey10:feat/embed-gemara-reat-live-demo

Conversation

@PaarthPandey10

@PaarthPandey10 PaarthPandey10 commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Closes #6

Summary

Adds an interactive @gemara/react live demo page at /sdk/demo.html (sdk/demo.md) that embeds the hosted @gemara/react demo via a sandboxed <iframe>, keeping this repository strictly Jekyll + Go with zero Node toolchain dependencies.

Changes

  • sdk/demo.md: Embeds https://gemaraproj.github.io/gemara-react/ inside a strict <iframe sandbox="allow-scripts"> container with postMessage support for light/dark theme synchronization (gemara-theme) and dynamic height resizing (gemara-resize), plus fallback links and quick-start usage examples.
  • Navigation & Discovery: Links the demo page from the top navigation (_data/navigation.yml), the SDK sidebar (_data/sidebar.yml), the SDK index and React SDK docs (sdk/index.md, sdk/react-sdk.md), and the homepage Quick Start section (index.md).

Deployment Order

Held as Draft until the companion GitHub Pages demo workflow and gemara-ready / gemara-resize / gemara-theme postMessage handlers land in gemaraproj/gemara-react.

@PaarthPandey10
PaarthPandey10 requested review from a team as code owners November 3, 2026 21:26
Copilot AI balanced review requested due to automatic review settings November 3, 2026 21:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@jmeridth jmeridth left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 (summary)

Thanks for putting this together. The description and the diff don't line up: the Makefile, workflow, .gitignore, and nav changes it lists aren't here, and it removes an unrelated sentence from index.md. Were you able to build and run this locally?

Comment thread _config.yml Outdated
compliance activities, their interactions, and schemas for automated interoperability.

url: "https://gemara.openssf.org"
url: "[https://gemara.openssf.org](https://gemara.openssf.org)"

@jmeridth jmeridth Nov 4, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 (high)

These URLs got wrapped in markdown link syntax (here and in social_links), which is what's breaking the Jekyll build.

Comment thread sdk/demo.md Outdated
<div class="demo-iframe-container" style="margin: 1.5rem 0; border: 2px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; background: var(--color-bg-secondary); box-shadow: var(--shadow-sm);">
<iframe
id="gemara-demo-frame"
src="{{ '/assets/demo/frame.html' | relative_url }}"

@jmeridth jmeridth Nov 4, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 (high)

Nothing in the deploy pipeline builds /assets/demo/frame.html. deploy.yml has no Node setup or npm ci, so this would 404 on the live site.

@jmeridth

jmeridth commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

🤖 (summary)

Bigger picture, I'd rather not add a Node toolchain to this Jekyll and Go pipeline. Would hosting the demo in gemaraproj/gemara-react and embedding it here work for you?

@jmeridth
jmeridth dismissed their stale review November 4, 2026 01:55

Switching to comments so you can iterate. Feedback inline still stands.

@PaarthPandey10

Copy link
Copy Markdown
Contributor Author

Hi @jmeridth, thanks again for the guidance on this!

I've updated the PR based on your feedback:

  1. Removed Node Toolchain: Completely removed tools/demo/ and all build steps from this repository so it stays strictly Jekyll + Go.
  2. Hosted Embed Approach: Updated sdk/demo.md to embed the @gemara/react live demo via a sandboxed <iframe> pointing to the hosted demo endpoint (https://gemaraproj.github.io/gemara-react/), complete with postMessage theme/height synchronization and local fallback links.
  3. Cleaned Up Diff & Git History: Reset the branch against clean upstream main (preserving all recent upstream SDK additions and homepage wording) and fixed the _config.yml URL formatting issue.

All CI build and validation checks are now completely green. Let me know if this implementation looks good to you!

@jmeridth jmeridth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 (summary)

Thanks for moving this to gemara-react. The PR description still describes the earlier Node build in tools/demo. Could you update it to match the iframe approach?

Comment thread sdk/demo.md
<div class="demo-iframe-container" style="margin: 1.5rem 0; border: 2px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; background: var(--color-bg-secondary); box-shadow: var(--shadow-sm);">
<iframe
id="gemara-demo-frame"
src="https://gemaraproj.github.io/gemara-react/"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 (high)

This URL returns 404 right now, and Pages isn't enabled on gemara-react yet. Merging this would add nav, sidebar, and homepage links to an empty frame. Could the hosted demo (including the gemara-ready/gemara-resize messages) land in gemara-react first, with this PR held as draft until then?

Comment thread index.md Outdated
<img src="{{ '/assets/gemara-logo.png' | relative_url }}" alt="Gemara Logo" class="gemara-logo" />

**GRC Engineering Model for Automated Risk Assessment**
**[GRC](model/02-definitions.html#grc) Engineering Model for Automated [Risk Assessment](model/02-definitions.html#risk-assessment)**

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 (medium)

These glossary links are termlinker output from make gendocs, which adds them at build time. Committing them would double them up on the next build. Could you run make cleanup-links so the diff only has the demo changes?

Comment thread sdk/demo.md Outdated
id="gemara-demo-frame"
src="https://gemaraproj.github.io/gemara-react/"
title="Gemara React Live Artifact Renderer Demo"
sandbox="allow-scripts allow-same-origin"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 (medium)

allow-scripts with allow-same-origin together let the framed page lift its own sandbox, so "strict sandbox isolation" overstates it. Does the demo need allow-same-origin?

Signed-off-by: PaarthPandey10 <paarthdxb@gmail.com>
@PaarthPandey10

Copy link
Copy Markdown
Contributor Author

Thanks for the thorough review @jmeridth! I've addressed all four points:

  1. Removed termlinker output: Reset against upstream/main and cleaned up the glossary links so the diff only contains the 6 demo/nav files.
  2. Reverted to sandbox="allow-scripts": Removed allow-same-origin so the iframe stays in an opaque origin, and updated the parent postMessage listener to authenticate messages via event.source === iframe.contentWindow.
  3. Updated PR Description & Converted to Draft: Updated the top PR summary to reflect the hosted iframe setup and marked this PR as Draft.
  4. Companion PR in gemara-react: Opened 45 in gemaraproj/gemara-react to configure examples/astro with the gemara-ready / gemara-resize / gemara-theme bridge and deploy it to GitHub Pages. Once that lands and Pages is enabled on gemara-react, I'll mark this PR ready for final merge!

This branch has not been deployed

No deployments
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.

feat: embed gemara-react live demo in the website

3 participants