Skip to content

Playground extends - #260

Open
dlrice wants to merge 3 commits into
nextfrom
playground-extends
Open

Playground extends#260
dlrice wants to merge 3 commits into
nextfrom
playground-extends

Conversation

@dlrice

@dlrice dlrice commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Purpose

Surface the extend-uniprot Starter Kit recipe as a playground preset so the extends: feature demos on the hosted site. The existing extend-default example extends /src/default-config.yaml, which only resolves under the dev server. Also fixes supporting docs/blog copy.

Approach

  • New extend-uniprot preset loads the recipe verbatim (?raw); its extends: is the version-pinned jsDelivr dist/default-config.yaml, fetched over the network at render time, so it resolves on the hosted page. Its ./data/ sample is repointed at the served hotspots.csv.
  • Deep-linked the tutorial "Try it live" callout to #preset=extend-uniprot.
  • Corrected the blog's Starter Kit paragraph: the config check is a schema shape check — dropped the inaccurate "prevents an empty track" claim.

Testing

src/playground/__spec__/presets.spec.ts loads every preset (now including extend-uniprot) through loadConfig, mocking the jsDelivr extends: fetch with this repo's src/default-config.yaml (mirrors starter-kit.spec.ts; throws on any non-http ref so a dev-only /src/ path can't sneak back in). Broadened the served-data assertion to not.toMatch(/data:\s*\.\//) so no bare relative data: path can survive substitution.

Run: npx vitest run src/playground/__spec__/presets.spec.ts

Visual changes

New "Extend UniProt (your track + the full default viewer)" entry in the playground preset picker; selecting it renders a custom track layered on the full default viewer.

Checklist

  • My PR is scoped properly, and "does one thing only"
  • I have reviewed my own code
  • I have checked that linting checks pass and type safety is respected
  • I have checked that tests pass and coverage has at least improved, and if not explained the reasons why
  • If needed, the changes have been previewed by all interested parties.

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.

1 participant