Skip to content

Bumps the CDN-hosted front-end libraries in the HTML templates. - #247

Merged
jampukka merged 1 commit into
nlsfi:mainfrom
jampukka:html-lib-versions-199
Oct 22, 2026
Merged

jampukka merged 1 commit into
nlsfi:mainfrom
jampukka:html-lib-versions-199

Conversation

@jampukka

Copy link
Copy Markdown
Collaborator

new template fragment, key piece:

  • mapLibs.ftl
    • Holds the Leaflet and proj4/proj4leaflet imports, included by featureCollection.ftl and feature.ftl after backgroundMap.ftl (proj4 is only loaded when bgProj4 is set)
    • Keeps the two map pages on the same library versions, which they were not before (feature.ftl was still on Leaflet 1.7.1 / proj4 2.7.5)

Library versions:

  • Bootstrap 5.0.0-beta3 -> 5.3.8 (all seven templates using it)
  • Leaflet 1.7.1 -> 1.9.4, proj4 2.7.5 -> 2.22.0 (proj4leaflet stays at 1.0.2, the latest)
  • swagger-ui 3.45.1 -> 5.29.1 (still cdnjs)
  • All SRI hashes were recomputed from the downloaded files, and every URL points to a file the package actually publishes (no jsDelivr on-the-fly minification, see Fix SRI hash failures by using published proj4 and proj4leaflet files #216)

The effects of Bootstrap version bump, validated that the new ones look good (again, default HTML templates are not the focus point of hakunapi):

  • The JSON link in the page header no longer uses navbar-brand: in Bootstrap 5.3 its spacing and font size come from CSS variables that only exist inside a .navbar, and here it sits in a .nav. It now uses utility classes and looks as before.
  • A custom template directory that overrides feature.ftl or featureCollection.ftl keeps its own library versions until it includes mapLibs.ftl.
  • Bootstrap 5.3 shifts a few shades slightly (table text is pure black, text-muted footer, active breadcrumb and pagination hover are a bit different). Nothing breaks and the layout is unchanged. Not verified in a browser beyond a manual check of the pages.

Should fix #199

@jampukka
jampukka merged commit 5b28de7 into nlsfi:main Oct 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTML page script and css dependencies and security considerations

1 participant