fix: integrate all ocis helper changes into the docs - #119
Merged
Merged
Conversation
LukasHirt
approved these changes
Sep 10, 2026
LukasHirt
added a commit
that referenced
this pull request
Sep 17, 2026
#119 renamed test/ to extension-tests/ (and flattened test/helpers/ into extension-tests/) but left two things pointing at the old layout: package.json's test script still globbed test/*.test.js (so npm test silently ran zero tests, in CI too), and latest-alias/next-alias/static-files.test.js still required ./helpers/latest-versions and latest-versions.js itself still walked up two directories to find content/ instead of one. Net effect: most of this suite has been dead since #119, always green because nothing ran. Found this while adding a guard test for the medium-zoom vendor sync (next commit) and needed it to actually execute. Signed-off-by: Lukas Hirt <info@hirt.cz>
This was referenced Sep 17, 2026
LukasHirt
added a commit
that referenced
this pull request
Sep 17, 2026
#119 renamed test/ to extension-tests/ (and flattened test/helpers/ into extension-tests/) but left several things pointing at the old layout: package.json's test script still globbed test/*.test.js (so npm test silently ran zero tests, in CI too), latest-alias.test.js / next-alias.test.js / static-files.test.js still required ./helpers/latest-versions, and latest-versions.js itself still walked up two directories to find content/ instead of one. Net effect: most of this suite has been dead since #119, always green because nothing ran. Signed-off-by: Lukas Hirt <info@hirt.cz>
LukasHirt
added a commit
that referenced
this pull request
Sep 18, 2026
* test: repair the extension-tests suite broken by the test/ rename #119 renamed test/ to extension-tests/ (and flattened test/helpers/ into extension-tests/) but left several things pointing at the old layout: package.json's test script still globbed test/*.test.js (so npm test silently ran zero tests, in CI too), latest-alias.test.js / next-alias.test.js / static-files.test.js still required ./helpers/latest-versions, and latest-versions.js itself still walked up two directories to find content/ instead of one. Net effect: most of this suite has been dead since #119, always green because nothing ran. Signed-off-by: Lukas Hirt <info@hirt.cz> * test: don't flag unrendered content/ocis/8.0 as a broken page alias Restoring npm test above turned this test back on, which surfaces it: content/ocis/8.0 has a page-aliases entry but isn't in site.yml's ocis source list (only 8.1-8.3 render; site.yml's own comment says an unnamed version folder "could safely be deleted if outdated"). The test walks the whole content/ tree, so it flagged that stale, never- published version as a dangling alias. Skip versions this build doesn't publish, matching the builtOrSkip pattern the rest of the suite already uses; verified it still fails when a real published stub (8.1) is removed. Signed-off-by: Lukas Hirt <info@hirt.cz> * feat: re-add mediumzoom as a tracked npm dependency (#133) * feat: re-add mediumzoom as a tracked npm dependency The previous vendored copy of medium-zoom.min.js was reverted (#131) for missing dependency management. Install medium-zoom via npm so it is tracked in package.json/package-lock.json (and covered by Dependabot), and copy its prebuilt browser bundle into ui/supplemental/js/vendor/ via a preantora/preantora-local script, since the site has no client-side bundler of its own. Signed-off-by: Lukas Hirt <info@hirt.cz> * refactor: make sync-vendor-assets.js data-driven Replace the two hardcoded copyFileSync calls with a VENDOR_FILES list, so vendoring another package's browser build later means adding an entry instead of writing a new script. Signed-off-by: Lukas Hirt <info@hirt.cz> * fix: address review on the medium-zoom vendoring approach - Add a build-output guard (extension-tests/static-files.test.js) that fails loudly if ui/supplemental/js/vendor/ wasn't repopulated before the build (e.g. npx antora run directly, bypassing the preantora hook): today it publishes green with a 404'ing <script> and image zoom silently dead site-wide. - Make scripts/sync-vendor-assets.js wipe js/vendor/ before repopulating it, so dropping an entry from VENDOR_FILES actually removes the stale file instead of leaving it on disk in any checkout that already had it. - Narrow the CSS z-index selector to img.medium-zoom-image--opened (the class only the currently-zoomed clone gets) instead of the bare medium-zoom-image class, which stays on every bound image for as long as it's attached and would promote them all to z-index 1000 the moment anything positions a doc image. - Add `body >` to the overlay selector so our rule outranks the library's own .medium-zoom-overlay by specificity rather than by injection order, in case a future medium-zoom release adds its own z-index there. - Document scripts/ and the generated ui/supplemental/js/vendor/ in README.md's layout tree. Signed-off-by: Lukas Hirt <info@hirt.cz> --------- Signed-off-by: Lukas Hirt <info@hirt.cz> --------- Signed-off-by: Lukas Hirt <info@hirt.cz>
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.
References: #117
This PR updates the versions to use the data created by the ocis_helper and other related cleanups.
Because of the unnoticed change from version
nextto a prerelease scheme during the mono-repo transition, a new extension was required to identify the prerelease tag as attribute that is not available in the standard Antora 3.2 release.