Repository navigation
Regenerate dita-demo with encoded answers; turn off search autocomplete in the template - #102
Merged
Merged
Conversation
WebHelp's autocomplete script runs on every page and throws "Cannot set properties of undefined (setting '_renderItem')" once the template no longer renders the search box (SRD 013 ANS-01). The publishing template now sets webhelp.enable.search.autocomplete=no. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019erPampkiqiri3Gab6oSHB
…without Oxygen npm run protect-dita-demo runs scripts/protect-demo-output.js on dita-demo/. It follows the template's rules: qd1: encoding of Answer cells and numeric tolerances (quizAnswerEncoding.xsl), the #qd-question-total and #qd-answer-key spans (customHeader.xsl), search box, index and results removed (header.xml, wt_search.html), and search autocomplete off (f13ldMan-CSA.opt). It is a developer stand-in for an Oxygen republish, documented as such in dita/README.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019erPampkiqiri3Gab6oSHB
Ran npm run protect-dita-demo: 37 questions across 21 pages, default key, search index deleted. check:answer-leak passes on dita-demo. The committed bundle is the current release build (npm run build:dita); the old one could not decode qd1: values when the demo is opened from a checkout. The DITA flow E2E tests now expect "0 of 37 answered", since the demo publishes its question total (SCO-05). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019erPampkiqiri3Gab6oSHB
Screenshots now show the question total ("2 of 37 answered") and the
template's header without search, so the capture no longer hides the
search box and the intro slide no longer says it does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019erPampkiqiri3Gab6oSHB
Contributor
🚀 PR Preview Deployment✅ Your changes are being built and deployed to a preview environment. 📋 Live PR Preview Links: ℹ️ About PR Previews:
📦 Production Demo (main branch): 🧪 Testing Locally: npm install
npm run build
# Open demo/quiz-index.html in your browser (use file:// or http-server)This comment will be automatically updated when you push new commits. |
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.
The demo and the PR previews still showed plain answers and the search box, because
dita-demo/had not been republished since SRD 013 WP3. This PR brings it up to date without Oxygen.Changes
npm run protect-dita-demo(scripts/protect-demo-output.js, with unit tests): applies the template's rules to existing WebHelp output.qd1:.#qd-question-totaland#qd-answer-keyspans.It is a stand-in for a republish, and
dita/README.mdsays so. A real Oxygen publish is still the check that the template works.dita-demo/regenerated: 37 questions across 21 pages, default key, search index deleted.check:answer-leakpasses on it.qd-quizrows in the DITA source.qd1:when the demo is opened from a checkout. CI still copies a fresh bundle for previews and E2E.Template fix found along the way: with the search box gone, WebHelp's autocomplete script throws
Cannot set properties of undefined (setting '_renderItem')on every page.f13ldMan-CSA.optnow setswebhelp.enable.search.autocomplete=no. A real Oxygen publish of the current template would very likely have shown the same error.E2E: the DITA flow tests expect "0 of 37 answered", since the demo now publishes its total.
Walkthrough:
Verification
src/.dita-instructor-flow"View student answers", which fails intermittently on the original demo too (3 of 5 runs locally) at its 5 s test budgetsearch.htmlkeeps its earliernull.trimerror, and nothing links to it nowGenerated by Claude Code