Skip to content

Serve landing-page quibble.js from GitHub Pages + version switcher; retire demo/rc - #12

Merged
river0825 merged 1 commit into
mainfrom
feat/pages-cdn-version-switch
Jun 18, 2026
Merged

river0825 merged 1 commit into
mainfrom
feat/pages-cdn-version-switch

Conversation

@river0825

Copy link
Copy Markdown
Contributor

What

  1. Same-origin own build — new .github/workflows/pages.yml publishes docs/ plus the repo-root quibble.js (copied to /quibble.js). The landing page loads quibble same-origin by default, so https://onramplab.github.io/quibble/quibble.js is the current main build, live ~1 min after each push (no jsDelivr metadata lag).
  2. Version <select> — defaults to "This build (local)"; lists published releases from the jsDelivr data API. Picking one reloads with ?ver=X.Y.Z and loads that pinned release from jsDelivr. Reload-based (quibble is a single-load IIFE with no teardown API).
  3. Consolidation — migrated the modal <dialog> + fullscreen top-layer tests (issue Item is not clickable when a popup dialog is open #4) into docs/index.html, restyled with the landing page's own CSS (no Tailwind), then removed demo/ and docs/rc.html. Head-load case noted in the quibble.js header (code already rehomes on load).

Docs: README.md (RC section dropped — config panel shipped; demo ref → landing page) and CLAUDE.md (Actions deploy + same-origin loading; docs/index.html is landing + test surface) updated. Design doc in docs/plans/ (excluded from the published site).

⚠️ Post-merge manual step

After merge, switch the Pages source from "Deploy from branch (main/docs)" to GitHub Actions (repo Settings → Pages, or I can do it via gh api). The pages.yml workflow only takes over once the source is set to Actions.

Test checklist (after deploy)

  • …/quibble/quibble.js → 200 + content-type: application/javascript
  • Landing loads same-origin by default (URL note shows quibble.js)
  • Pick a version → reloads ?ver= → loads from jsDelivr
  • Modal dialog → quibble above modal; clicking quibble chrome doesn't close it
  • Hero fullscreen → quibble rehomes into the fullscreen element

🤖 Generated with Claude Code

…er; retire demo/rc

Publish docs/ via a GitHub Actions Pages workflow that also copies the repo-root
quibble.js to the site root, so the landing page loads our own current build
same-origin (/quibble.js) — live ~1 min after each push, no jsDelivr metadata lag.

The version <select> defaults to "This build (local)" and lists published
releases from the jsDelivr data API; picking one reloads with ?ver=X.Y.Z and
loads that pinned release from jsDelivr (reload-based — quibble has no teardown).

Migrate the modal <dialog> + fullscreen top-layer tests (issue #4) into
docs/index.html, restyled with the landing page's own CSS, then remove demo/
(index.html + head-load.html) and docs/rc.html. The head-load case is covered by
a note in the quibble.js header (the code already rehomes on load). README and
CLAUDE.md updated to match (RC section dropped — the config panel has shipped).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request consolidates the demo and manual testing pages into docs/index.html, removing the separate demo/ directory and docs/rc.html. It introduces a version picker on the landing page to load either the local build or published releases from jsDelivr, and adds top-layer tests for modal dialogs and fullscreen modes. Additionally, a new GitHub Pages deployment workflow is planned to publish the site. The reviewer pointed out a valid issue where local testing of docs/index.html will fail to load quibble.js due to path mismatch, and provided a dynamic path resolution suggestion to fix it.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread docs/index.html
Comment on lines +207 to +209
window.__quibbleSrc = ver === "local"
? "quibble.js"
: "https://cdn.jsdelivr.net/gh/" + REPO + "@" + ver + "/quibble.js";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

When testing locally by serving the repository root (e.g., http://localhost:8000/docs/index.html), the relative path "quibble.js" resolves to docs/quibble.js, which results in a 404 error because quibble.js is located at the repository root. However, when deployed to GitHub Pages, the docs/ directory is flattened to the root, so "quibble.js" is correct.\n\nTo support both local testing and the deployed environment, we can dynamically adjust the path to ../quibble.js if the current pathname contains /docs/.

Suggested change
window.__quibbleSrc = ver === "local"
? "quibble.js"
: "https://cdn.jsdelivr.net/gh/" + REPO + "@" + ver + "/quibble.js";
window.__quibbleSrc = ver === "local"
? (location.pathname.indexOf("/docs/") !== -1 ? "../quibble.js" : "quibble.js")
: "https://cdn.jsdelivr.net/gh/" + REPO + "@" + ver + "/quibble.js";

@river0825
river0825 merged commit b0a643c into main Jun 18, 2026
1 check passed
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