Repository navigation
Conversation
13 tasks
|
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 29 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
arikfr
force-pushed
the
fe/07-routing-utility-libs
branch
from
September 28, 2026 09:42
ba68eec to
3d57946
Compare
arikfr
force-pushed
the
fe/06-babel-8-browser-targets
branch
from
September 28, 2026 09:42
c60abf8 to
073936a
Compare
arikfr
force-pushed
the
fe/07-routing-utility-libs
branch
2 times, most recently
from
October 3, 2026 21:06
17aacee to
cb82389
Compare
arikfr
force-pushed
the
fe/06-babel-8-browser-targets
branch
2 times, most recently
from
October 4, 2026 13:56
2793dae to
2b92673
Compare
arikfr
force-pushed
the
fe/07-routing-utility-libs
branch
from
October 4, 2026 13:56
cb82389 to
5a1c8a9
Compare
- universal-router 8 → 10, which bundles path-to-regexp 8. Drop our direct path-to-regexp 3 dependency and use the bundled one in routes.ts, whose `parse()` now returns nested tokens. path-to-regexp 8 has no inline regex parameters, so the dashboard route matches `:dashboardId` and strips the `-slug` suffix in `render`, as the old regex did. - query-string 6 → 9 (ESM-only; added with its dependencies to Jest's transform list). - use-debounce 3 → 10: `useDebouncedCallback` returns the debounced function (with `.cancel()`) instead of an array, and `use-debounce/lib` is no longer importable. - chroma-js 1 → 3 and leaflet 1.3 → 1.9 in viz-lib. - viz-lib tests: start the clock at the fixed test date but let it run. use-debounce 10 measures elapsed time with Date.now(), so debounced callbacks never fired on MockDate's frozen clock. history stays on 4: history 5's `block()` always installs a beforeunload prompt, which would make the query editor's conditional unsaved-changes alert fire on every reload. Part of #7848. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Leaflet 1.9 adds a flag to its attribution prefix and anti-aliases map shape edges slightly differently.
arikfr
force-pushed
the
fe/07-routing-utility-libs
branch
from
October 8, 2026 12:36
5a1c8a9 to
109059d
Compare
This branch has not been deployed
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 type of PR is this?
Description
Part 7 of the frontend dependency upgrade stack tracked in #7848. Stacked on #7856.
Routing
universal-router/path-to-regexp), so the directpath-to-regexp3 dependency is gone.routes.tssorts routes by parameter count. path-to-regexp 8'sparse()returns{ tokens }with nested optional groups instead of a flat array, so the counting is rewritten.Contexttype is nowRouterContext, andRoute's generic parameters are in the opposite order./dashboards/:dashboardId([^-]+)(-.*)?, becomes/dashboards/:dashboardId, and itsrenderkeeps only the part before the first-, exactly what the regex captured.routes.tssorts them. The URLs covered every page, static routes that compete with parameterized ones (/queries/newvs/queries/:queryId), dashboards with and without slugs, trailing slashes, case differences, encoded characters and unknown paths. All 35 resolved to the same route and parameters.block()also registers abeforeunloadlistener that always triggers the browser's "leave page?" prompt (source).useUnsavedChangesAlertkeeps a blocker registered for as long as the query editor is mounted and only asks when there are unsaved changes. On history 5, every reload or tab close from the editor would prompt. history 5 hasn't had a release since 2022 and offers nothing we need.Utilities
parse/stringifyoutput is identical to 6.14.1 on 21 inputs matching how we use it: location search parsing, the axios params serializer, arrays, flags, null/undefined, encoded characters.useDebouncedCallbackreturns the debounced function (memoized, with.cancel()/.flush()) instead of[fn, cancel]. That touches 26 call sites, 25 of them one-line destructuring changes. Also,use-debounce/libdeep imports (4 viz-lib files) no longer resolve.color.css()output format, isn't used. It still ships a CommonJS build.leaflet.markercluster1.5 declaresleaflet ^1.3.1. The map and choropleth e2e specs cover the plugins. Leaflet 1.8+ sizes map text inrem, and our root font size is 10px (from Bootstrap), so legends and the attribution became tiny;.leaflet-containerkeeps its previous 12px. Leaflet's attribution prefix now includes a small flag of Ukraine (its default since 1.8).Tests
viz-lib's setup froze the clock with MockDate. use-debounce 10 measures elapsed time with
Date.now(), so on a frozen clock debounced callbacks never fired, and 29 editor tests timed out. The setup now uses Jest's fake clock, starting at the same fixed date but advancing in real time. Nothing in viz-lib depends on the current time (no snapshot contains the date), and the suite now runs in ~3s instead of ~20s.Route test:
client/app/services/routes.test.jsresolves 12 URLs against competing paths (/queries/newvs/queries/:queryId,/dashboards/favoritesvs/dashboards/:dashboardId, ...) and checks the sort order. Jest is pointed at universal-router's ES module build: the CommonJS build of its path parser throws on any path (it spreads a string with a helper that only handles arrays). The app is unaffected, since webpack uses the ES module build.How is this tested?
Unit tests (pytest, jest)
Lint, type-check (client and viz-lib), jest (client 96, viz-lib 154, no snapshot changes) and the production build pass locally.
The route-matching and query-string comparisons above.
Visual tests (Add Playwright visual tests for visualizations, remove Percy #7853): only the maps change: the attribution flag, and anti-aliasing along shape edges. Their baselines are updated in a separate commit.
🤖 Generated with Claude Code