fix(launch): accessible name for the launch trigger + first launch-popover coverage#86
Conversation
Adds a BinderHub radio to the launch popover between Colab and Private,
building {binderhub_url}/v2/gh/{org}/{repo}.notebooks/main?urlpath=tree/
{page}.ipynb per the book-theme's launch.py. Binder serves repo contents
at the server root, so unlike the JupyterHub git-pull URL there is no
leading repo-name path segment.
The deployment is configurable via a new binderhub_url site option
(default mybinder.org), read from the site manifest like the existing
page-design options. The popover trigger also gains
aria-label="Launch notebook" - it previously had no accessible name.
Test: desktop-only launch-binder spec (mobile wraps the launcher in
MobileActionsMenu) - stubs window.open for a deterministic offline URL
assertion, asserts the three radios, and adds a launch-open.png
snapshot (-darwin written; -linux via /update-new-snapshots).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
/update-new-snapshots |
|
🎭 Visual regression resultsDetails
Skipped testsmobile-chrome › theme.spec.ts › QuantEcon theme — visual regression › launch-colab |
|
🎭 Refreshed visual baselines in 525a424:
|
There was a problem hiding this comment.
Pull request overview
Adds BinderHub as a third notebook-launch target in the QuantEcon MyST theme’s launcher, configurable via a new site.options.binderhub_url setting, and extends the visual regression suite to cover the launcher popover (including an a11y fix for the trigger button’s accessible name).
Changes:
- Add BinderHub option to the launcher UI and construct BinderHub launch URLs using
binderhub_url(defaulthttps://mybinder.org). - Document the new site option and surface it in
TemplateOptions. - Add a new Playwright visual spec + snapshot for the launcher popover.
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
app/components/toolbar/LaunchButton.tsx |
Adds BinderHub radio option, URL builder, reads site.options.binderhub_url, and adds aria-label to the trigger. |
app/types.ts |
Extends TemplateOptions with binderhub_url. |
README.md |
Documents BinderHub default and configuration via binderhub_url. |
tests/visual/theme.spec.ts |
Adds launch-binder visual+behavior test and snapshot assertion. |
CHANGELOG.md |
Notes BinderHub launcher option and new accessible name. |
PLAN.md |
Marks the BinderHub launcher item as completed for #26. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The baseline commit was pushed by the snapshots workflow, whose runs are gated; an actor-attributed commit gives CI a clean run on the final tree. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…h coverage Decision on #26: BinderHub proved flaky in practice and Colab is the launch target QuantEcon standardises on - primarily for GPU access on the lectures that need it. #26 stays open as a demand-driven future request (the stripped implementation is recoverable from this PR's history). Private JupyterHub remains; its possible removal is tracked in #87. What ships: the launch trigger's accessible name (aria-label="Launch notebook") and the first regression coverage of the launch popover - Colab default-checked, Private present, stubbed window.open asserting the Colab URL - plus the launch-open.png snapshot (now two options). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
/update-snapshots |
|
🎭 Refreshed visual baselines in 4f0dce4:
|
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ab-first note + git-history section
Summary
Reworked after maintainer discussion — this PR originally added a BinderHub launch option (#26). Decision: BinderHub is deliberately not offered — Colab is the launch target QuantEcon standardises on, primarily because it provides GPU access for the lectures that need it. #26 stays open as a demand-driven future request; the stripped BinderHub implementation is recoverable from this PR's history (commit 7704c49). The Private JupyterHub option remains; its possible removal (collapsing the launcher to a direct Colab button) is tracked in #87.
What ships now:
aria-label="Launch notebook".launch-colab, desktop-only — mobile wraps the launcher inMobileActionsMenu): asserts Google Colab is the default-checked radio and Private is present, stubswindow.openfor a deterministic offline assertion of the Colab URL (regex over the stable parts: host,.notebooksconvention, branch, path), plus alaunch-open.pngviewport snapshot of the popover.Tests
Full suite green locally: 9 passed, 1 intentional mobile skip.
-darwinlaunch-open.pngrefreshed;-linuxneeds a/update-snapshotsrefresh (the earlier bot commit baselined the three-option panel).🤖 Generated with Claude Code