[Oskari-user] Oskari 2.8.0 released!

Mäkinen Sami sami.makinen at maanmittauslaitos.fi
Wed Jun 22 08:31:43 PDT 2022


Good news everyone,

We released Oskari 2.8.0 yesterday and it is now available on GitHub (https://github.com/oskariorg) and Oskari.org Maven repository. The sample application package has been updated on the download link in Oskari.org (https://oskari.org/download). Usually we have it in http://download.osgeo.org/oskari/ as well, but uploading there is not working for us currently (we are looking into it). As always you can take a peek at the latest release at https://demo.oskari.org/.

We have a fairly exciting release this time as we have:

  *   Improved the announcements functionality quite a bit since last release.
  *   We have rewritten the My data UI with React. There's a new bundle called "mydata" that is a drop-in replacement for "personaldata". Check the migration guide https://github.com/oskariorg/oskari-server/blob/master/MigrationGuide.md#280!
  *   Completed the capabilities parsing rewrite on the server-side which means we are in a good state for adding functionality that better utilizes the capabilities/detecting changes based on capabilities.
  *   Bunch of improvements to statistical data classification.
  *   New React-components for common use-cases and improvements on the old ones.
  *   We have taken our first steps towards theming of the UI! Take it for a spin and give feedback :)
  *   From technical point-of-view: We have rewritten the my data UI with React! This means we now have our first implementation for React-based UI that is modular in a way that other functionalities can add their own UI to it. My data doesn't know the content of most of its tabs while other functionalities add to the UI provided by My data based on what functionalities are in the app. This is awesome since we'll be needing and repeating this pattern in other parts of the UI for the eventual full React-based UI and we now have a nice solution for it.

Release Notes
Oskari-frontend

For a full list of changes see: https://github.com/oskariorg/oskari-frontend/milestone/37?closed=1

Announcement functionality improvements

  *   Announcements can now be localized by the admin
  *   Announcement description content is now edited with a rich text editor instead of a plain text area
  *   Admin can now select 3 types of announcements: title only, with description, with external link
  *   Admin can select hour for the announcement date range (previously only dates)
  *   Admin UI has been integrated to the end-user UI similar to map layer admin
  *   Announcements that are not shown as popups are now shown with a new banner UI-component (previously user needed to browse the listing to see if there's anything new)
  *   Announcements are now shown in Oskari-style popups instead of AntD-modals so they look more consistent compared to other UI-elements
  *   Admin can now preview announcements

Map layers

  *   Data providers are now handled in a similar way as layer groups and are available in Oskari.mapframework.service.MapLayerService
  *   Data providers/layer groups can now have descriptions (improved admin UI and added tooltips for end-users)
  *   Improved error handling in layerlist bundle
  *   Implementation changed for how features are highlighted as hover effect (#1799<https://github.com/oskariorg/oskari-frontend/pull/1799>)
  *   Hover style is now inherited from feature style instead of defaulting to a hard-coded one

User generated data listings

  *   New bundle mydata is a drop-in replacement for personaldata as a React-based rewrite (the "My data" functionality)
  *   If your app pushed customized content to personaldata you will need to migrate to the new API but personaldata is still available (but is deprecated and will be removed in a future release)
  *   Added created/updated fields for user generated items
  *   User views and user account tabs can now be hidden by config. Also my indicators is no longer shown if the datasource for my indicators is not used by the instance.
  *   API changed! Instead of using PersonalData.AddTabRequest you now use a service provided by the mydata bundle:

    const myDataService = Oskari.getSandbox().getService('Oskari.mapframework.bundle.mydata.service.MyDataService');

    myDataService.addTab('userlayers', this.loc('tab.title'), UserLayersTab, new UserLayersHandler(this));



Where:

  *   userlayers is the id for the tab
  *   this.loc('tab.title') is the label for the tab that is shown to end-users
  *   UserLayersTab is a React-component that handles state and controller props
  *   new UserLayersHandler(this) is a class extending StateHandler from oskari-ui/util that will provide the state and controller props for the previous parameter
See example: https://github.com/oskariorg/oskari-frontend/blob/12dba2584287985026eec3e7eb3a453a855d1d04/bundles/framework/myplacesimport/instance.js#L144-L160

Thematic maps

  *   Classification UI has been refactored
  *   Metadata handling for indicators has been improved
  *   Reset state now clears thematic maps properly
  *   Improvements in data parsing for adding user generated indicators
  *   Removing data from user generated indicator now updates UI choices for that indicator
  *   My indicators tab in My data: indicator name now opens thematic maps so user can more easily add the indicator on the map.

Usability

  *   Some clickable elements have been changed to buttons in DOM and cursors are changed for draggable windows, clickable buttons/icons.
  *   Major state change in application (like reset/useState for whole app) now triggers UIChangeEvent (for cleanup before state is changed) and a new event StateChangedEvent after state has been changed. This can be used by RPC-applications to detect state reset by built-in buttons: #1874<https://github.com/oskariorg/oskari-frontend/pull/1874>

Bug fixes

  *   layeranalytics data is no longer duplicated on UI when reopening the flyout
  *   Duplicated id-parameter on proxied WMS-urls has been removed
  *   GFI is no longer queried for layers with opacity 0
  *   Fixed an issue where editing a measurement feature could result in multiple measurement result windows for a single geometry

Theming

Initial theming support for React-based UI-components like Flyout/Popup/Banner (Note! Most flyouts are still jQuery-based). Also affects the "selected layers badge" for layer count and tool hover-color in mydata. This is still very much work-in-progress and subject to change as we fine-tune what can be customized by theming etc. We would also appreciate any input and feedback for this.

For testing you can add this kind of snippet in your apps main.js or run this in the browser dev-console:

Oskari.app.getTheming().setTheme({

    color: {

        icon: '#FFFFFF',

        accent: '#0c3c62',

        primary: '#009fe3'

    }

});

At this point most of the structure can be omitted (using default values instead) and reseting to default can be done by calling setTheme(). The goal is to make the theme serializable as JSON so it could be saved to DB/given through RPC etc. But to make it easier to use in code there's a helper that is currently located in oskari-ui/theme/ThemeHelper that can for example generate a sensible header text color based on the primary color etc.

An example for making React-components "theme-aware": #1886<https://github.com/oskariorg/oskari-frontend/pull/1886>

New components to be used in apps (under oskari-ui)

  *   TextEditor (draft.js based rich text editor)
  *   PrimaryButton/SecondaryButton that include localization for common buttons
  *   DeleteButton (includes confirmation popup/reduces boilerplate in actual code)
  *   IconButton for replacing clickable divs that hold an icon with button
  *   Link for showing links in a consistent way across the UI
  *   Pagination
  *   icons: InfoIcon, MetadataIcon from oskari-ui/components/icons

Improvements to components

  *   New showBanner() has been added next to showPopup() and showFlyout() in oskari-ui/components/window.
  *   These React-based window-instances are now "managed" so they can be closed externally.
  *   React-based windows are now closed automatically when UIChangeEvent is triggered.
  *   React popup now handles long titles properly
  *   React popup now recognizes positional flags instead of always opening centered on screen: #1836<https://github.com/oskariorg/oskari-frontend/pull/1836>
  *   ErrorBoundary can now include debug info controlled by the developer
  *   LocalizationComponent is now much easier to use and required less boilerplate code
  *   Added a bunch of CSS-selector classes for Selenium testing (prefixed by t_) that are always added when using the common components.
  *   GenericForm, DateRange, ColorPicker, Modal are no longer direct exports of oskari-ui to reduce amount of referenced code/optimize min.js. When needed import them with oskari-ui/components/ColorPicker etc.

Oskari-server

For a full list of changes see: https://github.com/oskariorg/oskari-server/milestone/40?closed=1

My data frontend implementation changed

A new bundle mydata has been added as (in most cases) drop-in replacement for personaldata. See MigrationGuide<https://github.com/oskariorg/oskari-server/blob/master/MigrationGuide.md#280> for details.

Map layer capabilities rewrite

All capabilities parsing have now been fully migrated to the rewritten implementation for all layer types that previously used layer capabilities parsing. The oskari_capabilities_cache database table has been dropped and all capabilities data is now stored per layer on oskari_maplayer table capabilities column as JSON. The service-capabilities Maven module now holds the logic for parsing capabilities and all functionalities use it when querying a service for its capabilities data.

org.oskari.capabilities.CapabilitiesService has methods to query a service for layers including their capabilities per layer, update a single layer capabilities from the service, serialize the capabilities to JSON for oskari_maplayer and deserialize it from oskari_maplayer to get for example WMTS-layer matrix sets for printing.

WFS/OGC API Features layers now also have the properties described in DescribeFeatureType included in the capabilities JSON.

Layer listing changes

Data providers are now included in the layer list response similar to layer groups. Most if not all localizable values are now only returned in the current users language. All current admin tools can query a single editable item separately to get the localized values so this simplifies the code and makes admins use the same code for normal layer operations as other users.

Date handling

Initial steps have been taken to make date handling more consistent on the database and server-side. For now the decisions for these have been documented in oskari.org FAQ<https://oskari.org/documentation/faq> under "Handling dates and timestamps". In short this means using timestamps with time zone in database, java.time package in server code and ISO strings in JSON.

Timestamp columns in database and server-side code have been updated for these for app setups and user generated content.

Metadata service integration

When parsing capabilities for layers it is assumed that the metadata url/id referenced in capabilities is a link to the same service that the Oskari instance uses as metadata service (like GeoNetwork or other CSW-compliant service). This is not always the case and we added a new config for oskari-ext.properties. You can configure a comma-separated list that you want to enable metadata ids to be used from capabilities:

service.metadata.domains=paikkatietohakemisto.fi, geonetwork.nls.fi

If the url referenced in capabilities doesn't match the domain the metadata id parsing is skipped for that layer. If not configured this functions the same as before. If the list is configure, the value of service.metadata.url property is automatically added to the list.

Hiding mydata views/account info tab

These can be configured in oskari-ext.properties with:

mydata.tabs.showUser=false

mydata.tabs.showViews=false

Other changes

  *   Removed deprecated routes: DeleteFeature, InsertFeature, SaveFeature (replaced by VectorFeatureWriter)
  *   Printing vector features with fill pattern is now visually closer to what is shown on the browser

Happy updating,
    Sami

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/oskari-user/attachments/20220622/21fd9fdd/attachment-0001.htm>


More information about the Oskari-user mailing list