12 Changelog
In the following paragraphs we've listed an aggregated result of changes specific to this version of Oskari. Following the links below you can access full notes of different components.
12.1 Frontend release notes
For a full list of changes see: https://github.com/oskariorg/oskari-frontend/milestone/57?closed=1
12.1.1 React version updated 16 -> 18
The new version requires some modifications to current code for any app specific bundles. See React migration guide for details: https://react.dev/blog/2022/03/08/react-18-upgrade-guide
Examples for changes needed on oskari-frontend can be found on https://github.com/oskariorg/oskari-frontend/pull/2869
For most bundles can be migrated with these steps:
Replace: import ReactDOM from 'react-dom';
With import { getReactRoot } from 'oskari-ui/components/window';
Replace: ReactDOM.render(<jsx/>, element)
With: getReactRoot(element).render(<jsx/>)
If you need to unmount the React-component:
Add import import { unmountReactRoot } from 'oskari-ui/components/window';
Call unmountReactRoot(element); instead of ReactDOM.unmountComponentAtNode(element);
PropTypes are not functioning with the new React version like before. As they are being removed from React:
https://react.dev/blog/2024/04/25/react-19-upgrade-guide#removed-deprecated-react-apisv
It's easiest to replace most current non-working PropTypes values with type any.
We are considering adding TypeScript support to address this: https://github.com/oskariorg/oskari-documentation/issues/124
12.1.2 Migrated bundles
These bundles have been migrated from under packages to bundles and/or to the new bundle-loader syntax introduced in Oskari 3.0. Applications will need to modify the main.js files accordingly:
- import 'oskari-loader!oskari-frontend/packages/mapping/ol/mapmodule/bundle.js';
+ import 'oskari-bundle!oskari-frontend/bundles/mapping/mapmodule/map2d_ol';- packages/mapping/ol/mapmodule/bundle.js -> bundles/mapping/mapmodule/map2d_ol
- packages/mapping/ol/drawtools/bundle.js -> bundles/mapping/drawtools
- packages/mapping/ol/infobox/bundle.js -> bundles/mapping/infobox
- packages/mapping/ol/heatmap/bundle.js -> bundles/mapping/heatmap
- packages/mapping/ol/layerswipe/bundle.js -> bundles/mapping/layerswipe
- packages/mapping/ol/maprotator/bundle.js -> bundles/mapping/maprotator
- packages/mapping/ol/toolbar/bundle.js -> bundles/mapping/toolbar
- packages/mapping/ol/userstyle/bundle.js -> bundles/mapping/userstyle
- packages/mapping/ol/mapmyplaces/bundle.js -> bundles/mapping/mapmyplaces
- packages/mapping/ol/mapuserlayers/bundle.js -> bundles/framework/myplacesimport/mapuserlayers
- packages/mapping/ol/maparcgis/bundle.js -> bundles/mapping/maparcgis
- packages/framework/bundle/rpc/bundle.js -> bundles/framework/rpc
- packages/mapping/olcs/mapmodule/bundle.js -> bundles/mapping/mapmodule/map3d_olcs
- packages/mapping/olcs/map3dtiles/bundle.js -> bundles/mapping/tiles3d
12.1.2.1 Bundles combined
Support for different kinds of mapmodule plugins have been historically required an import on applications main.js, but since most instances have them enabled anyways the most common ones have been included in map module itself. These include:
wfsvector(ormapwfs2, it's been around long enough to have multiple names)mapwmts
The plugins they register are now started by default even if not referenced in the mapfull.conf.plugins array:
Oskari.mapframework.wmts.mapmodule.plugin.WmtsLayerPluginOskari.mapframework.mapmodule.VectorLayerPluginOskari.mapframework.mapmodule.WmsLayerPluginOskari.mapframework.bundle.mapmodule.plugin.LayersPlugin
If you need to pass some configuration for these plugins, you will need to do it by including them on the mapfull.conf.plugins array like before. Otherwise references can be removed from the database.
You can remove imports from your applications main.js to these (the imports will fail since bundle.js files have been removed from packages-folder, but they are automatically included now).
- import 'oskari-loader!oskari-frontend/packages/mapping/ol/wfsvector/bundle.js';
- import 'oskari-loader!oskari-frontend/packages/mapping/ol/mapwmts/bundle.js';12.1.3 Preview of upcoming bundle: myfeatures
The release includes a new bundle myfeatures that can be used in place of the userlayer-functionality (myplacesimport). It's not production ready yet, but it's available for testing. This is the functionality that will replace myplaces and userlayer functionalities in the future with migrations from those data types to myfeatures are on the roadmap for future development. The functionality from user perspective is the same as userlayer today, but the internal code has been rewritten on both frontend and server.
Most changes for frontend has been combined to https://github.com/oskariorg/oskari-frontend/pull/2891, but they also depend on changes done to for example mapmodule and the functionality is still under development and subject to change.
12.1.4 Other changes
Layer listing with the free keyword filter is now more usable on mobile devices. The filtering isn't automatically triggered until 5 characters has been added which makes it much more usable with less powerful devices. The filter can be manually executed with fewer characters by pressing enter on the virtual keyboard.
Clicking a search result no longer tries to keep the infobox on screen. It still moves the map to where the clicked result is but there's a hard-to-reproduce issue with panning the map to show the whole infobox while the map is panning to show the search result. There's not much difference to the user usually, but trying to do both can lead to the map showing a totally wrong location occasionally so it's best to just have the map move once per search result. When useing InfoBox.ShowInfoBoxRequest to show an infobox on coordinates that are currently NOT in the viewport, we advice passing { keepOnScreen: false } in the options to prevent this from happening.
The metadataflyout now combines accessRestrictions and otherRestrictions from metadata under a single Restrictions listing.
Added Oskari.util.formatNumberWithDecimalSeparator(value, optionalPrecision) for formatting numbers with precision. Similar to Number.toFixed() or Intl.NumberFormat(), but returns empty string instead of NaN for showing numbers on the UI.
Added a parameter for mapmodule.formatMeasurementResult() that allows selecting a formatter for measurement. See https://github.com/oskariorg/oskari-frontend/pull/2910 for details. Added a formatter for nautical miles as an example. The options in StartDrawingRequest can be used to select formatter.
Fixed an issue regarding adding several vector layers from the same service. The defaults style for the layer was copied from the previous layer that resulted in weird situations with vector layer styles: https://github.com/oskariorg/oskari-documentation/issues/117
Reverted back from cesium/engine to Cesium (including the unused widgets) since olcs references Cesium and npm decides to install it anyway since it doesn't recognize cesium/engine being an alternative for Cesium.
Fixed an issue where the button to remove layer coverage polygon from map was duplicated: https://github.com/oskariorg/oskari-frontend/pull/2875
ESLint config changed to flat config. Requires manual migration of apps like this: https://github.com/oskariorg/sample-application/pull/52
Library updates:
@ant-design/icons5.5.1 -> 5.6.1@babel/core7.26.0 -> 7.28.4 (and related plugins)@cesium/engine20.0.1 replaced withcesium1.135.0antd5.21.6 -> 5.27.5babel-loader8.4.1 -> 10.0.0corejs3.38.1 -> 3.46.0react-beautiful-dndreplaced with@hello-pangea/dndeslint8.57.0 -> 9.37.0 (and related plugins)jest29.7.0 -> 30.2.0 (and related dependencies)react16.14.0 -> 18.3.1 (tested 19.x, needs more work)@testing-library/react12.1.5 -> 16.3.0 (and related dependencies)ol10.6.0 -> 10.6.1uglifyjs-webpack-pluginreplaced withterser-webpack-pluginwebpack4.47.0 -> 5.102.1 (and related loaders/dev-server)
12.2 Migration guide
Changes related to library updates have been made to the frontend. You can more information about them in https://github.com/oskariorg/oskari-frontend/blob/develop/ReleaseNotes.md#320
XMLUnit dependency has been updated. If you used it on application specific JUnit tests, you will need to modify the code. We have added a XmlTestHelper class on shared-test-resources Maven module that helps with the migration. See https://github.com/oskariorg/oskari-server/pull/1199 for details.
12.3 Server release notes
For a full list of changes see: https://github.com/oskariorg/oskari-server/milestone/56?closed=1
12.3.1 Preview of upcoming functionality: myfeatures
Server-side functionality for myfeatures functionality has been added for testing purposes. Testing the functionality requires the myfeatures Flyway-module to be enabled on oskari-ext.properties with:
db.additional.modules=myfeaturesand the control-myfeatures included in the application dependencies:
<dependency>
<groupId>org.oskari</groupId>
<artifactId>control-myfeatures</artifactId>
</dependencyThe functionality is not production ready and lacks UI for feature editing etc, but at this stage could be used as a replacement for userlayer functionality (importing layers from files).
12.3.2 Other changes
Fixed an issue with OGC API Features "capabilities" parsing that prevented layers from being added easily by pointing to a service url: https://github.com/oskariorg/oskari-server/pull/1219
Improved parsing of restrictions for metadata (CSW).
Fixed an issue with printing when layer required an additional parameter like apikey. Now params are included from the oskari_maplayer database tables params column to requests from print functionality.
Library updates:
- XMLUnit updated 1.6 -> 2.10.4. See Migration Guide for details.
- Spring core 6.2.9 -> 6.2.11
- Spring security 6.5.3 -> 6.5.5