Skip to content

fix(launch): accessible name for the launch trigger + first launch-popover coverage#86

Merged
mmcky merged 6 commits into
mainfrom
feat/binderhub-launch
Jun 12, 2026
Merged

fix(launch): accessible name for the launch trigger + first launch-popover coverage#86
mmcky merged 6 commits into
mainfrom
feat/binderhub-launch

Conversation

@mmcky

@mmcky mmcky commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

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:

  • A11y fix: the launch toolbar trigger had no accessible name; it now has aria-label="Launch notebook".
  • First regression coverage of the launch popover (launch-colab, desktop-only — mobile wraps the launcher in MobileActionsMenu): asserts Google Colab is the default-checked radio and Private is present, stubs window.open for a deterministic offline assertion of the Colab URL (regex over the stable parts: host, .notebooks convention, branch, path), plus a launch-open.png viewport snapshot of the popover.
  • README documents the Colab-first decision; PLAN.md Phase 2 records the rationale and links Feature: Add BinderHub support to Launch Notebook #26/Consider removing the Private JupyterHub launch option (Colab-first direction) #87; CHANGELOG entry under Fixed.

Tests

Full suite green locally: 9 passed, 1 intentional mobile skip. -darwin launch-open.png refreshed; -linux needs a /update-snapshots refresh (the earlier bot commit baselined the three-option panel).

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings June 12, 2026 04:07
@mmcky

mmcky commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

/update-new-snapshots

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-06-12 05:02 UTC

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

🎭 Visual regression results

passed  9 passed
skipped  1 skipped

Details

stats  10 tests across 1 suite
duration  21.3 seconds
commit  d7c2ab4

Skipped tests

mobile-chrome › theme.spec.ts › QuantEcon theme — visual regression › launch-colab

@github-actions

Copy link
Copy Markdown
Contributor

🎭 Refreshed visual baselines in 525a424:

  • tests/visual/snapshots/desktop-chrome-linux/launch-open.png

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.

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 (default https://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.

Comment thread tests/visual/theme.spec.ts
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>
@mmcky mmcky changed the title feat(launch): add BinderHub option to the notebook launcher fix(launch): accessible name for the launch trigger + first launch-popover coverage Jun 12, 2026
@mmcky

mmcky commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

/update-snapshots

@github-actions

Copy link
Copy Markdown
Contributor

🎭 Refreshed visual baselines in 4f0dce4:

  • tests/visual/snapshots/desktop-chrome-linux/launch-open.png

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mmcky mmcky merged commit 1c8e80e into main Jun 12, 2026
4 checks passed
@mmcky mmcky deleted the feat/binderhub-launch branch June 12, 2026 05:01
mmcky added a commit that referenced this pull request Jun 12, 2026
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