Skip to content

Fix broken samples, add root readme, expose convenient testing of the samples#51

Open
zdrawku wants to merge 2 commits into
mainfrom
zkolev/fix-broken-samples
Open

Fix broken samples, add root readme, expose convenient testing of the samples#51
zdrawku wants to merge 2 commits into
mainfrom
zkolev/fix-broken-samples

Conversation

@zdrawku

@zdrawku zdrawku commented Jun 16, 2026

Copy link
Copy Markdown
image
  • It also introduces a root readme.md file (as such was missing)
  • And exposes a way for convenient testing of the samples locally against an iframe integration

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates several Reveal SDK JavaScript samples to work in production/doc-embedded scenarios (notably srcdoc iframes with CSP), adds a missing root README.md, and introduces a local srcdoc harness to validate docs-style embedding behavior.

Changes:

  • Add tools/srcdoc-harness.html to load sample HTML into an iframe via srcdoc and toggle CSP modes (none / block / allow).
  • Add root README.md documenting a recommended local validation workflow (direct + srcdoc harness + docs integration).
  • Update selected “LoadingDashboards*” samples to use the hosted https://samples.revealbi.io/... backend instead of http://localhost:5111/ (and fix the blob sample’s direct dashboard fetch URL).

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/srcdoc-harness.html New srcdoc iframe harness for reproducing CSP behavior locally.
README.md New root documentation for running and validating samples + harness workflow.
LoadingDashboards/client/index.html Switch sample base URL to hosted backend for production/doc embedding.
LoadingDashboards-Resource/client/index.html Switch sample base URL to hosted backend.
LoadingDashboards-Json/client/index.html Switch sample base URL to hosted backend.
LoadingDashboards-FileStream/client/index.html Switch sample base URL to hosted backend.
LoadingDashboards-File/client/index.html Switch sample base URL to hosted backend.
LoadingDashboards-Blob/client/index.html Switch base URL and update direct dashboard fetch to hosted backend.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment on lines +19 to +23
Then open sample pages at:

```text
http://localhost:8080/<sample-folder>/index.html
```
Comment thread tools/srcdoc-harness.html
Comment on lines +214 to +217
} catch (error) {
preview.srcdoc = "";
statusEl.textContent = `Failed to load ${path}: ${error.message}`;
}
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.

2 participants