Repository navigation
Put the whole family into the search index - #407
Merged
Merged
Conversation
The index the home page and the playground read carried the manual and the three sample catalogues. It now carries the rest of what a reader looks for from the home page (scripts/lib/search-family.mjs): - where to go: the playground, the layout editor, the AI builder, the sister sites, releases, issues - with the words people use for them - every repository of abap2UI5 and abap2UI5-addons (GitHub API), with its README and issues as actions - the essays, the page for decision makers and the addons, from the search.json each of those sites now publishes - the client API, each method leading to its section and to its line in z2ui5_if_client, and every class of the framework outside src/99 - a sample's source on GitHub as an action beside it Every source may fail and costs its rows, never the build. The matcher answers three more things about a query: a scope (`repo:`, `api:`, ... narrow to one area), jumps (`#1234`, a class, a repository or a tool named whole) and elsewhere( ): the query handed to GitHub's code, issue and discussion search - links, so issues and discussions are never a day old and nothing is fetched from GitHub in the browser. A box that does not use them loses nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014YZFmFLTfBmZJXKPuRQWci
A box appends a heading's anchor to the url; on a url that already names a section that made #a#b. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014YZFmFLTfBmZJXKPuRQWci
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.
What
/docs/search-index.json— read by the search box on https://abap2ui5.github.io/ and by the playground — carried the manual and the three sample catalogues. It now carries the rest of what a reader looks for (scripts/lib/search-family.mjs):tools— Playground, Layout Editor, AI builder, sister sites, releases, issues, with the words people userepos— every non-archived repository ofabap2UI5andabap2UI5-addons, README/Issues as actionsGITHUB_TOKENin CI)insights,why,addonssearch.jsoneach site now publishes (abap2UI5/insights#10, abap2UI5/why#22, abap2UI5-addons/abap2UI5-addons.github.io#29)api— each client method → its section of resources/api.md and its line inz2ui5_if_client; every framework class outsidesrc/99→ its fileclient-api.json+ the tree of mainSamples get their source on GitHub as an action. Feeds are filtered: only fields of the right type, only URLs of the family or GitHub.
Every source may fail and costs its rows, never the build — the catalogues' rule. Issues and discussions are deliberately not indexed.
The matcher
search-engine.jsgains, all backward compatible (the playground's copy keeps working):parseScope( )—repo: popup,api: bind, … narrow to one area; a scope alone lists itjumps( )— a query that names something:#1234/issue 1234, a class, a method, a repository or tool named whole; an unknownz2ui5_…→ code searchelsewhere( )— the query as links to GitHub's code (both orgs), issue and discussion searchactions( )— a hit's links, plus a repository's code searched for the queryCI
GITHUB_TOKENon thedocs:buildstep ofcheck.ymlanddeploy.yml(the index lists repositories and the framework tree). The nightly deploy keeps new repositories current.Size: 832 → ~1005 kB raw, ~180 → ~233 kB gzip; still fetched on first use only.
Tests
test/search-family.test.mjs: feeds filtered, archived repos left out,src/99left out, API anchors + line numbers, a source that is down costs its rows only (no network in the test), scopes, jumps, elsewhere, actions.npm test: 180 pass;docs:buildpasses.Generated by Claude Code