Ngram UI fixes, URL normalisation unit tests and dependency upgrades - #505
Merged
thomasegense merged 26 commits intoJun 26, 2026
Merged
Conversation
Update filename of navigation history file
…directly. Removed unsused Vue2 legacy code
Fixed wrong option in .vscode settings.json
…ction in search box is invoked Fix bouncing search box when ngram search is performed Fix TypeError: undefined is not an object (evaluating 'this.datacollection.datasets.length') error when performing ngram seach Revert vscode eslint setting
… ngram search box
More unittests
Frontend dependency upgrades
jesperlauridsen
approved these changes
Jun 26, 2026
jesperlauridsen
left a comment
Collaborator
There was a problem hiding this comment.
A quick look over the code gave me no worries. I haven't spun it up to check it - but it looks solid enough, imho.
@thomasegense, if we need to test it, can we put it on a devel instance somwhere?
Contributor
|
I have tested it. |
thomasegense
approved these changes
Jun 26, 2026
thomasegense
left a comment
Contributor
There was a problem hiding this comment.
It is working.
Nice changelog details.
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.
Ngram UI fixes, URL normalisation tests and dependency upgrades
This PR collects a set of bug fixes, dependency upgrades, and test additions accumulated since the last upstream merge.
Bug fixes
Ngram chart / search box
Several interconnected bugs were present in the ngram search UI. They are fixed in this PR:
clearChartfunction is now called to tear down the existing chart instance when the query is cleared.TypeError: undefined is not an objectduring ngram searches — a missing null-guard caused a hard crash under certain search conditions. Fixed with a defensive check before accessing the relevant object.TypeError: undefined is not an objectwhen exporting chart data — the CSV export logic was referencing a Vue 2-era data shape that no longer exists. The export mixin has been refactored to read directly fromngramStoredatasets and labels, removing the stale legacy code path.Dependencies
Security/maintenance upgrades to keep the build toolchain current:
solr(backend)9.6.09.10.1vite(frontend)6.3.5^6.4.2vitest(frontend)3.1.3^3.2.6Both
viteandvitestbumps address known CVEs in the prior versions.Tests
New and improved test coverage for the URL normalisation layer:
NormalisationStandard.canonicaliseURL— expanded unit tests covering the canonical URL construction logic.PathResolver.waybackAPIResolverHelper— new test class (PathResolverWaybackAPIResolverTest) with broad coverage of the wayback API resolver helper, including port-stripping behaviour introduced in this PR.UrlUtilsurl_norm query building — tests forurl_normquery construction, including default-port handling (port 80 stripping) to prevent regressions on the fix above.Files changed: 16 files, +503 / −88 lines
Affected areas: ngram frontend components, CSV export mixin, Solr client, test suite