Playground extends - #260
Open
dlrice wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Surface the
extend-uniprotStarter Kit recipe as a playground preset so theextends:feature demos on the hosted site. The existingextend-defaultexample extends/src/default-config.yaml, which only resolves under the dev server. Also fixes supporting docs/blog copy.Approach
extend-uniprotpreset loads the recipe verbatim (?raw); itsextends:is the version-pinned jsDelivrdist/default-config.yaml, fetched over the network at render time, so it resolves on the hosted page. Its./data/sample is repointed at the servedhotspots.csv.#preset=extend-uniprot.Testing
src/playground/__spec__/presets.spec.tsloads every preset (now includingextend-uniprot) throughloadConfig, mocking the jsDelivrextends:fetch with this repo'ssrc/default-config.yaml(mirrorsstarter-kit.spec.ts; throws on any non-httpref so a dev-only/src/path can't sneak back in). Broadened the served-data assertion tonot.toMatch(/data:\s*\.\//)so no bare relativedata:path can survive substitution.Run:
npx vitest run src/playground/__spec__/presets.spec.tsVisual 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