Skip to content
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
2f99431
refactor(reverseGeocoder): introduce shared lib getRefStore
oeninghe-dataport Jan 13, 2026
74e98dd
feat(core): export `center` and `extent` as instable API
oeninghe-dataport Jan 13, 2026
0da4c0a
feat(core): add shared pagination component
oeninghe-dataport Jan 16, 2026
15972bf
test(snowbox): allow jumping to Hamburg via button
oeninghe-dataport Jan 13, 2026
d449c8d
test(snowbox): debug assistant for browser devtools
oeninghe-dataport Feb 16, 2026
1234994
feat(gfi): migrate plugin
oeninghe-dataport Jan 8, 2026
8757e3b
refactor(core): make `renderType` a global plugin option
oeninghe-dataport Feb 17, 2026
425cfdb
feat(gfi): improve support for different rendering options
oeninghe-dataport Feb 17, 2026
bf71346
Merge branch 'next' into vue3/migrate-plugin-gfi
oeninghe-dataport Feb 17, 2026
70ff48d
Merge branch 'next' into vue3/migrate-plugin-gfi
dopenguin Feb 23, 2026
11fe191
Merge branch 'next' into vue3/migrate-plugin-gfi
dopenguin Feb 23, 2026
978d718
fix(gfi): remove legacy manual plugin prefix for console
oeninghe-dataport Mar 2, 2026
6d60086
docs: fix shared locales hint
oeninghe-dataport Mar 2, 2026
6182677
docs: fix shared locales hint
oeninghe-dataport Mar 2, 2026
439ae45
docs: fix shared locales hint
oeninghe-dataport Mar 2, 2026
aa854c8
Merge remote-tracking branch 'origin/next' into vue3/migrate-plugin-gfi
oeninghe-dataport Apr 13, 2026
a0daad3
Merge remote-tracking branch 'origin/next' into vue3/migrate-plugin-gfi
oeninghe-dataport Apr 15, 2026
63a5d72
docs(gfi): remove duplicate ToDo hint
oeninghe-dataport Apr 15, 2026
55ff02a
docs(gfi): use typedoc-linking to layout nineRegions
oeninghe-dataport Apr 15, 2026
c2edb52
feat(core): introduce InterfacePluginOptions
oeninghe-dataport Apr 15, 2026
79852f3
refactor(gfi): introduce new composable usePluginStoreWatcher
oeninghe-dataport Apr 15, 2026
9f25413
fix(core): consider hoveredFeature set from plugin again
oeninghe-dataport Apr 16, 2026
d15b2c2
chore(core): markers: fix double star in comment
oeninghe-dataport Apr 16, 2026
4dfe6af
test(snowbox): enable bindWithCoreHoverSelect for gfi plugin
oeninghe-dataport Apr 16, 2026
875a35c
fix(gfi): wrap text for empty view in feature list
oeninghe-dataport Apr 16, 2026
ec689f1
fix(gfi): highlight selected feature with bindMarkers
oeninghe-dataport Apr 21, 2026
a6e5698
test(snowbox): disable separate geometry display as bindMarkers is used
oeninghe-dataport Apr 21, 2026
ef16d0b
Merge remote-tracking branch 'origin/next' into vue3/migrate-plugin-gfi
oeninghe-dataport Apr 21, 2026
3271a30
test(iceberg): add GFI plugin w/ configuration options
oeninghe-dataport Apr 21, 2026
c7a096d
chore(snowbox): move comment to be at the right spot again
oeninghe-dataport Apr 21, 2026
03243fe
fix(gfi): add plugin options to MapConfiguration
oeninghe-dataport Apr 21, 2026
92c938c
fix(gfi): show export button only if export is configured
oeninghe-dataport Apr 21, 2026
758e48e
Merge branch 'next' into vue3/migrate-plugin-gfi
dopenguin Apr 21, 2026
b13d946
docs(gfi): fix typo in src/plugins/gfi/types.ts
oeninghe-dataport May 4, 2026
78cf7ea
refactor(gfi): simplify v-else-if for gfiUI
oeninghe-dataport May 4, 2026
5c52f98
docs(gfi): improve inter-docs linking
oeninghe-dataport May 4, 2026
2bc62e3
docs(gfi): improve inter-docs linking
oeninghe-dataport May 4, 2026
30369fe
docs(gfi): improve wording for gfi types
oeninghe-dataport May 4, 2026
71e0fe9
fix(gfi): remove superfluous gfiFailedSymbol
oeninghe-dataport May 4, 2026
de7c0a2
docs(gfi): explain where geometry property name default is derived from
oeninghe-dataport May 5, 2026
049b529
docs(core): improve wording in src/core/utils/map/setupMarkers.ts
oeninghe-dataport May 13, 2026
c49b158
fix(gfi): use correct heading level for featureList
oeninghe-dataport May 13, 2026
68760f7
fix(gfi): align feature buttons to top-right corner
oeninghe-dataport May 13, 2026
37e1612
refactor(gfi): replace hardcoded `'gfi'` with `PluginId`
oeninghe-dataport May 13, 2026
acc27d6
feat: add info about shown and total items to pagination
oeninghe-dataport May 13, 2026
e50c423
fix(gfi): adapt KERN style properly
oeninghe-dataport May 13, 2026
e462655
docs(gfi): replace irregular whitespace with regular
oeninghe-dataport May 5, 2026
2516299
docs(gfi): noted that text format for gfi is probably not standardized
oeninghe-dataport May 5, 2026
6bebd40
docs(gfi): use JSDoc syntax for default value
oeninghe-dataport May 5, 2026
92593c1
refactor(gfi): remove legacy code from vue2
oeninghe-dataport May 13, 2026
cf97607
style: introduce ESLint rule perfectionist/sort-named-imports
oeninghe-dataport May 13, 2026
f46aa79
chore(gfi): remove migrated type HighlightStyle from vue2 code
oeninghe-dataport May 13, 2026
b8fb5a2
fix(gfi): add missing import of PluginId to GfiUI
oeninghe-dataport May 13, 2026
985bc02
fix: using more KERN variables for KernPagination
oeninghe-dataport May 13, 2026
18d2a1a
fix: use english for english shared locales
oeninghe-dataport May 13, 2026
4f9d2e1
fix(gfi): use correct Vue-deep reference in GfiUI
oeninghe-dataport May 18, 2026
e8f3597
Merge remote-tracking branch 'origin/next' into vue3/migrate-plugin-gfi
oeninghe-dataport May 18, 2026
c89b58b
fix(gfi): the CustomHighlightStyle keys are optional
oeninghe-dataport May 18, 2026
fa787b1
refactor(gfi): move tooltip to new plugin composable
oeninghe-dataport May 18, 2026
07d6066
docs(gfi): hide internal types
oeninghe-dataport May 18, 2026
0bbd0fb
docs(gfi): improve docs for format in GfiLayerConfiguration
oeninghe-dataport May 18, 2026
db2a657
docs(gfi): improve inter-docs linking
oeninghe-dataport May 18, 2026
9edf830
refactor(core): add util `findLayer`
oeninghe-dataport May 18, 2026
d1be583
docs(gfi): fix typo
oeninghe-dataport May 18, 2026
f112666
refactor: make former getRefStore a composable
oeninghe-dataport May 18, 2026
7b08d89
chore: remove superfluous CSS rules in pagination
oeninghe-dataport May 18, 2026
b7280b0
refactor(gfi): use UI CSS in the right places and w/ KERN
oeninghe-dataport May 18, 2026
3b0c6f5
chore(gfi): remove superfluous TODO
oeninghe-dataport May 18, 2026
c598a80
fix(gfi): adapt styling of feature list items to KERN + previous POLAR
oeninghe-dataport May 18, 2026
92f446f
test(snowbox): remove legacy eigengrau color variable
oeninghe-dataport May 18, 2026
62062f0
docs(gfi): fix return value type of showTooltip
oeninghe-dataport May 18, 2026
ea8c02d
docs(gfi): improve docs of feature to text serializing
oeninghe-dataport May 18, 2026
f1ffdb6
docs(gfi): remove redundant sentence
oeninghe-dataport May 18, 2026
f835925
style(gfi): remove linter-failing whitespace
oeninghe-dataport May 18, 2026
bff6bdc
docs(gfi): plugin loading order does not matter anymore
oeninghe-dataport May 18, 2026
9d95f73
docs(gfi): fix typo
oeninghe-dataport May 18, 2026
e82b7c6
docs(gfi): improve inter-docs linking
oeninghe-dataport May 18, 2026
7f05d42
docs(gfi): fix typo
oeninghe-dataport May 18, 2026
635a1e7
docs(gfi): improve inter-docs linking
oeninghe-dataport May 18, 2026
2336f7e
docs(gfi): improve inter-docs typing for directSelect
oeninghe-dataport May 18, 2026
a6607c6
fix(gfi): debounce getFeatureInfo request again
oeninghe-dataport May 18, 2026
3a9843a
Merge remote-tracking branch 'origin/next' into vue3/migrate-plugin-gfi
oeninghe-dataport May 18, 2026
1087c8d
feat: add gfi to generic client
oeninghe-dataport May 18, 2026
8d17a09
test(snowbox): configure isSelectable for gfi to match markers
oeninghe-dataport May 18, 2026
1a360e9
fix(gfi): add hover state on keyboard focus
oeninghe-dataport May 19, 2026
1370962
fix(gfi): refresh feature list on vector source changes
oeninghe-dataport May 19, 2026
37588de
fix: markers remember their selection on clusters
oeninghe-dataport May 19, 2026
271ad09
chore(gfi): remove legacy code
oeninghe-dataport May 19, 2026
4a80f42
Merge branch 'next' into vue3/migrate-plugin-gfi
oeninghe-dataport Jun 2, 2026
fb59311
Merge remote-tracking branch 'origin/next' into vue3/migrate-plugin-gfi
oeninghe-dataport Jun 16, 2026
ab14bb0
chore(gfi): add link to spec for gfi wms in text format
oeninghe-dataport Jun 16, 2026
ed87486
docs: remove (incorrect) hint on the defined default value
oeninghe-dataport Jun 17, 2026
c7c6b35
refactor(gfi): replace logical OR w/ type assertion
oeninghe-dataport Jun 17, 2026
1f639d8
refactor(gfi): improve type annotations for updateTooltip
oeninghe-dataport Jun 17, 2026
67eafe4
refactor(gfi): strengthen updateTooltip parameter type
oeninghe-dataport Jun 17, 2026
65ec115
refactor: remove superfluous type annotation in KernPagination
oeninghe-dataport Jun 17, 2026
1ab845c
refactor(gfi): use implicit props binding for GfiFeature
oeninghe-dataport Jun 17, 2026
7c49b21
refactor(gfi): remove unused prop in GfiFeature
oeninghe-dataport Jun 17, 2026
db7493f
refactor(gfi): use combination of class-styles in template for featur…
oeninghe-dataport Jun 17, 2026
d3d97d6
perf(gfi): use shallowRef's for OpenLayers references
oeninghe-dataport Jun 22, 2026
13e685a
feat(gfi): add optional title-prepended icon
oeninghe-dataport Jun 23, 2026
35610a2
refactor(gfi): remove unused css fragment
oeninghe-dataport Jun 23, 2026
cdeda5b
refactor(gfi): remove options object pattern for internal composables
oeninghe-dataport Jun 23, 2026
4f6c62e
fix(gfi): consider default renderType
oeninghe-dataport Jun 23, 2026
bf3c65d
feat(gfi): add enrichedPaginatedFeatures to list store
oeninghe-dataport Jun 23, 2026
1547b7b
refactor(gfi): remove extra blank line in feature UI
oeninghe-dataport Jun 24, 2026
091af04
fix: adapt KERN variables to @kern-ux/native@^2.6.2
oeninghe-dataport Jun 26, 2026
d1f3a92
fix(gfi): hide exportProperty within properties
oeninghe-dataport Jun 26, 2026
0a16793
fix(gfi): remove margin to match other independent-rendered plugins
oeninghe-dataport Jun 26, 2026
5c8f0c4
fix(gfi): use icon buttons at the top for navigation between features
oeninghe-dataport Jun 26, 2026
9cbbcf4
refactor(gfi): inline `serializeFeature`
oeninghe-dataport Jun 26, 2026
b0fc61e
docs(gfi): add inter-linking for gfiLayer properties
oeninghe-dataport Jun 26, 2026
940cf78
docs(gfi): add inter-docs linking for featureList
oeninghe-dataport Jun 26, 2026
0623319
refactor: shorten props reference in pagination template
oeninghe-dataport Jun 26, 2026
a20e34b
feat(gfi): allow clearing a coordinate source on closing dialog
oeninghe-dataport Jul 1, 2026
b760b14
feat(gfi)!: add configuration for selectionDiff in multiSelect
oeninghe-dataport Jul 1, 2026
7b84459
test(snowbox): add "Go to Kiel" button for easier testing of Kiel layers
oeninghe-dataport Jul 1, 2026
36db39c
refactor: add getter for masked interactions to core
oeninghe-dataport Jul 1, 2026
4bc6e2b
fix(gfi): update default plugin icon
oeninghe-dataport Jul 1, 2026
a071a5d
fix(gfi): move pagination to header
oeninghe-dataport Jul 1, 2026
a3b965e
test(snowbox): add Meldemichel tooltip logic
oeninghe-dataport Jul 1, 2026
0000a4f
fix: pagination offers different pages now
oeninghe-dataport Jul 1, 2026
b002d7b
fix: adapt spacing in pagination to match old behaviour
oeninghe-dataport Jul 1, 2026
6445501
feat(gfi): allow configurable feature title in detail window
oeninghe-dataport Jul 2, 2026
374117e
docs(gfi): fix formatting of literal value
oeninghe-dataport Jul 2, 2026
48bdc5a
Merge branch 'next' into vue3/migrate-plugin-gfi
oeninghe-dataport Jul 2, 2026
7f19cac
Merge branch 'next' into vue3/migrate-plugin-gfi
oeninghe-dataport Jul 9, 2026
b099e3f
fix(gfi): align icon with title in gfi UI
oeninghe-dataport Jul 17, 2026
bf29efb
fix(gfi): unified padding for gfi feature list
oeninghe-dataport Jul 17, 2026
236c0fc
fix(gfi): replace PolarIconButton with KernButton
oeninghe-dataport Jul 17, 2026
014198b
fix(gfi): adapt hover and selection behaviour to POLAR@2
oeninghe-dataport Jul 20, 2026
dc2dc75
fix: pagination buttons have the same height
oeninghe-dataport Jul 20, 2026
d321f67
fix(core): tooltip headers have reduced margins
oeninghe-dataport Jul 20, 2026
3b72e2d
perf: add caching to getCluster
oeninghe-dataport Jul 21, 2026
87c843a
perf: do not deep-watch OL objects in useOlVectorSources
oeninghe-dataport Jul 21, 2026
43f7344
perf(gfi): lazy hover calculation
oeninghe-dataport Jul 21, 2026
7555797
docs(core): add hint to evaluate maskedInteractions
oeninghe-dataport Jul 21, 2026
178001a
refactor(gfi): extract setSelectedFeature in featureList
oeninghe-dataport Jul 21, 2026
debe186
perf(gfi): use `markRaw` with OpenLayers objects
oeninghe-dataport Jul 28, 2026
97254a4
test(snowbox): use larger clusterDistance to match MML
oeninghe-dataport Jul 28, 2026
07b7bad
Merge branch 'next' into vue3/migrate-plugin-gfi
oeninghe-dataport Jul 28, 2026
6c762b2
refactor: rename `idx` to `index`
oeninghe-dataport Jul 28, 2026
82d2196
fix(gfi): filter selectable features with zoom changes
oeninghe-dataport Jul 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions examples/snowbox/YetAnotherEmptyComponent.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
<template>
<div style="background: #fff">Awesome</div>
<div style="background: #fff; z-index: 99999; pointer-events: all">
Awesome
<button @click="goHamburg()">Go to Hamburg</button>
</div>
</template>

<script setup lang="ts">
// keep this block to enforce language
// eslint-disable-next-line
// @ts-nocheck

const coreStore = document.getElementById('snowbox').store

function goHamburg() {
coreStore.center = [561210, 5932600]
}
</script>
25 changes: 25 additions & 0 deletions examples/snowbox/debug-assistant.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { getStore } from '@polar/polar'

function initializeDebugAssistant() {
const map = document.getElementById('snowbox')
const coreStore = getStore(map, 'core')
const activePluginIds = coreStore.activePluginIds

window.map = map
window.olMap = coreStore.map
window.coreStore = coreStore
window.activePluginIds = activePluginIds
for (const pluginId of activePluginIds) {
window[`${pluginId}Store`] = coreStore.getPluginStore(pluginId)
}
}

// We want to load as late as possible.
// Especially, the timeout stuff from snowbox code should be done when doing this.
setTimeout(() => {
initializeDebugAssistant()

// 7 seconds may be long sometimes, inform the developer about it.
// eslint-disable-next-line no-console
console.info('POLAR debug assistant was successfully initialized')
}, 7000)
1 change: 1 addition & 0 deletions examples/snowbox/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate, max-age=0" />
<link rel="stylesheet" href="@polar/polar/polar.css" />
<script type="module" defer src="index.js"></script>
<script type="module" defer src="debug-assistant.js"></script>
<style>
/* style just for example page, not directly related to POLAR */
:root {
Expand Down
82 changes: 82 additions & 0 deletions examples/snowbox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import pluginFooter from '@polar/polar/plugins/footer'
import pluginFullscreen from '@polar/polar/plugins/fullscreen'
import pluginGeoLocation from '@polar/polar/plugins/geoLocation'
import pluginGfi from '@polar/polar/plugins/gfi'
import pluginIconMenu from '@polar/polar/plugins/iconMenu'
import pluginLayerChooser from '@polar/polar/plugins/layerChooser'
import pluginLoadingIndicator from '@polar/polar/plugins/loadingIndicator'
Expand All @@ -30,6 +31,7 @@
const ausgleichsflaechen = '1454'
const reports = '6059'
const denkmal = 'denkmaelerWMS'
const kielPolygon = 'kiel_polygon'
const hamburgBorder = '1693'

let colorScheme = 'light'
Expand Down Expand Up @@ -73,7 +75,7 @@
},
}

// TODO: Re-enable with isSelectable

Check warning on line 78 in examples/snowbox/index.js

View workflow job for this annotation

GitHub Actions / Linting

Unexpected 'todo' comment: 'TODO: Re-enable with isSelectable'
/*
// arbitrary condition for testing
const isEvenId = (mmlid) => Number(mmlid.slice(-1)) % 2 === 0
Expand All @@ -93,7 +95,7 @@
colorScheme,
startCenter: [573364, 6028874],
layers: [
// TODO: Add internalization to snowbox

Check warning on line 98 in examples/snowbox/index.js

View workflow job for this annotation

GitHub Actions / Linting

Unexpected 'todo' comment: 'TODO: Add internalization to snowbox'
{
id: basemapId,
visibility: true,
Expand Down Expand Up @@ -149,6 +151,12 @@
},
},
},
{
id: kielPolygon,
type: 'mask',
name: 'Kiel Polygone',
visibility: true,
},
],
layout: 'standard',
checkServiceAvailability: true,
Expand All @@ -173,14 +181,14 @@
stroke: '#FFFFFF',
fill: '#333333',
},
// TODO(dopenguin): Has some HMR issues, needs to be fixed

Check warning on line 184 in examples/snowbox/index.js

View workflow job for this annotation

GitHub Actions / Linting

Unexpected 'todo' comment: 'TODO(dopenguin): Has some HMR issues,...'
// isSelectable: isReportSelectable,
},
],
clusterClickZoom: true,
},
// theme: dataportTheme,
/*

Check warning on line 191 in examples/snowbox/index.js

View workflow job for this annotation

GitHub Actions / Linting

Unexpected 'todo' comment: 'TODO(dopenguin): Surrounding application...'
TODO(dopenguin): Surrounding application should be able give information about dark or light mode via update of a state parameter; light mode by default
*/
locales: [
Expand All @@ -193,6 +201,18 @@
label_off: 'Mach klein',
},
},
gfi: {
layer: {
[reports]: {
property: {
addr: 'Adresse',
statu: 'Status',
beschr: 'Beschr.',
kat_text: 'Kat.',
},
},
},
},
iconMenu: {
hints: {
attributions: 'LMAO',
Expand Down Expand Up @@ -293,7 +313,7 @@
key: 'coordinate',
},
],
// TODO: Check if this works when addressSearch is implemented

Check warning on line 316 in examples/snowbox/index.js

View workflow job for this annotation

GitHub Actions / Linting

Unexpected 'todo' comment: 'TODO: Check if this works when...'
addressTarget: {
plugin: 'addressSearch',
key: 'selectResult',
Expand All @@ -318,7 +338,7 @@
},
],
menus: [
// TODO: Delete the mock plugins including the components once the correct plugins have been implemented

Check warning on line 341 in examples/snowbox/index.js

View workflow job for this annotation

GitHub Actions / Linting

Unexpected 'todo' comment: 'TODO: Delete the mock plugins including...'
[
{
plugin: pluginGeoLocation({
Expand All @@ -334,6 +354,68 @@
}),
},
],
[
{
plugin: pluginGfi({
layers: {
[reports]: {
window: true,
properties: [
'addr',
'statu',
'beschr',
'pic',
'kat_text',
'skat_text',
],
exportProperty: 'pic',
showTooltip: (feature) => [

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous function also received the map.
As this example also uses the same logic, I prefer to include that function in this example as well.

import { Feature, Map } from 'ol'
import { isVisible } from '@polar/lib-invisible-style'

export function showTooltip(feature: Feature, map: Map) {
  const visibleFeatures = (feature.get('features') || []).filter(isVisible)
  const isCluster = visibleFeatures.length > 1
  if (isCluster) {
    return [
      ['h2', 'meldemichel.gfi.tooltip.multiHeader'],
      [
        'span',
        `meldemichel.gfi.tooltip.multiBody${
          map.getView().getZoom() === map.getView().getMaxZoom()
            ? 'Unresolvable'
            : ''
        }`,
      ],
    ]
  }
  const tooltipFeature = visibleFeatures[0]
  return [
    ['h2', `${tooltipFeature.get('str')} ${tooltipFeature.get('hsnr')}`],
    ['span', `meldemichel.skat.${tooltipFeature.get('skat')}`],
  ]
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you go: a3b965e

[
'span',
`Coordinates: ${feature.getGeometry().getCoordinates().join(', ')}`,
],
],
},
[kielPolygon]: {
window: true,
},
},
afterLoadFunction: (featuresByLayerId) => {
Object.values(featuresByLayerId).forEach((featureList) => {
featureList.forEach((feature) => {
if (feature.properties) {
feature.properties = {
addr: [
feature.properties.str,
feature.properties.hsnr,
].join(' '),
...feature.properties,
}
}
})
})
return featuresByLayerId
},
featureList: {
activeLayers: {
plugin: 'layerChooser',
key: 'activeMaskIds',
},
mode: 'visible',
bindWithCoreHoverSelect: false,
pageLength: 5,
text: {
title: (feature) =>
feature.get('str') + ' ' + feature.get('hsnr'),
subtitle: 'Michels Meldung',
subSubtitle: (feature) => feature.get('skat_text'),
},
},
multiSelect: 'box',
directSelect: true,
Comment thread
dopenguin marked this conversation as resolved.
Outdated
}),
},
],
[
{
plugin: {
Expand Down
10 changes: 10 additions & 0 deletions examples/snowbox/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,14 @@ export default [
version: '1.3.0',
transparent: true,
},
{
id: 'kiel_polygon',
name: 'Kiel Polygon',
url: 'https://polar.dataport.de/qgisserver?MAP=/home/qgis/projects/dev_services.qgz',
typ: 'WFS',
featureType: 'polygon_kiel',
outputFormat: 'XML',
version: '1.1.0',
legendURL: '',
},
]
2 changes: 1 addition & 1 deletion src/architecture.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('Architectural checks', () => {
.matchingPattern('^plugins/.*$')
.should()
.matchPattern(
'^plugins/[^/]+/((index|locales|store|types)\\.ts|utils/.*\\.ts|components/.*\\.spec\\.ts)$'
'^plugins/[^/]+/((index|locales|store|types)\\.ts|utils/.*\\.ts|components/.*\\.spec\\.ts|stores/.*\\.ts|composables/.*\\.ts)$'
)
.check()
expect(violations).toEqual([])
Expand Down
154 changes: 154 additions & 0 deletions src/components/kern/KernPagination.ce.vue

@dopenguin dopenguin Jun 5, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer the way the navigation shows the dots in the middle and gives me more options towards the end.

Image

Also, I prefer the navigation to not spread apart like it currently does.

Image

These screenshots are taken from Meldemichel.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the offered pages: 0000a4f
For the spacing: b002d7b

Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
<template>
<nav
v-if="pageCount > 1"
:aria-label="$t(($) => $.pagination.wrapper, { ns: 'shared' })"
>
<ul>
<li>
<button
class="kern-btn kern-btn--secondary"
:disabled="currentPage <= 1"
@click="currentPage--"
>
<span class="kern-icon kern-icon--arrow-back" />
<span class="kern-label kern-sr-only">
{{ $t(($) => $.pagination.previous, { ns: 'shared' }) }}
</span>
</button>
</li>
<li
v-for="option of visibleOptions"
:key="'dots' in option ? option.dots : option.page"
>
<template v-if="'dots' in option">…</template>
<button
v-else-if="option.page"
class="kern-btn kern-btn--secondary"
:class="{ active: currentPage === option.page }"
:aria-label="
$t(($) => $.pagination.page, { ns: 'shared', page: option.page })
"
@click="currentPage = option.page"
>
<span class="kern-label">
{{ option.page }}
</span>
</button>
</li>
<li>
<button
class="kern-btn kern-btn--secondary"
:disabled="currentPage >= pageCount"
@click="currentPage++"
>
<span class="kern-icon kern-icon--arrow-forward" />
<span class="kern-label kern-sr-only">
{{ $t(($) => $.pagination.next, { ns: 'shared' }) }}
</span>
</button>
</li>
</ul>
</nav>
</template>

<script lang="ts" setup>
import { computed, watch } from 'vue'

const props = defineProps<{
count: number
pageSize: number
}>()

const startIndex = defineModel<number>({ required: true })
const currentPage = computed({
get: () => startIndex.value / props.pageSize + 1,
set: (page) => {
startIndex.value = (page - 1) * props.pageSize
},
})

const pageCount = computed(() => Math.ceil(props.count / props.pageSize))

watch([() => props.count, () => props.pageSize], () => {
if (currentPage.value > pageCount.value) {
startIndex.value = 0
}
})

const visibleOptions = computed<({ dots: string } | { page: number })[]>(() => {
Comment thread
oeninghe-dataport marked this conversation as resolved.
Outdated
const generatePageInterval = (start: number, end: number) =>
new Array(end - start + 1).fill(null).map((_, idx) => ({
page: idx + start,
}))

if (pageCount.value <= 7) {
return generatePageInterval(1, pageCount.value)
}

if (currentPage.value < 5) {
return [
...generatePageInterval(1, 5),
{ dots: 'only' },
...generatePageInterval(pageCount.value, pageCount.value),
]
}

if (currentPage.value > pageCount.value - 4) {
return [
...generatePageInterval(1, 1),
{ dots: 'only' },
...generatePageInterval(pageCount.value - 4, pageCount.value),
]
}

return [
...generatePageInterval(1, 1),
{ dots: 'only' },
...generatePageInterval(currentPage.value - 1, currentPage.value + 1),
{ dots: 'only' },
...generatePageInterval(pageCount.value, pageCount.value),
]
})
</script>

<style scoped>
nav {
width: 100%;
}

ul {
width: 100%;
display: flex;
list-style-type: none;
padding: 0;
align-items: center;
justify-content: space-between;
gap: var(--kern-metric-space-x-small);
Comment thread
dopenguin marked this conversation as resolved.
Outdated
}

.kern-btn {
padding: 0;
min-width: var(--kern-metric-dimension-large);
min-height: calc(
var(--kern-metric-dimension-large) + var(--kern-metric-dimension-2x-small)
);

&:has(.kern-sr-only) {
width: var(--kern-metric-dimension-large);
}

&.active {
background-color: var(--kern-color-action-default);
pointer-events: none;

.kern-label {
color: white;
Comment thread
dopenguin marked this conversation as resolved.
Outdated
}
}

.kern-label {
font-size: var(--kern-typography-font-size-static-small);
line-height: var(--kern-typography-line-height-static-small);
Comment thread
dopenguin marked this conversation as resolved.
Outdated
}
}
</style>
4 changes: 3 additions & 1 deletion src/core/components/PolarMap.ce.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ import { updateDragAndZoomInteractions } from '../utils/map/updateDragAndZoomInt
import PolarMapOverlay from './PolarMapOverlay.ce.vue'

const mainStore = useMainStore()
const { hasWindowSize, hasSmallDisplay, center, zoom } = storeToRefs(mainStore)
const { hasWindowSize, hasSmallDisplay, center, extent, zoom } =
Comment thread
oeninghe-dataport marked this conversation as resolved.
storeToRefs(mainStore)

const polarMapContainer = useTemplateRef<HTMLDivElement>('polar-map-container')
const overlay = useTemplateRef<typeof PolarMapOverlay>('polar-map-overlay')

function onMove() {
center.value = mainStore.map.getView().getCenter() || center.value
extent.value = mainStore.map.getView().calculateExtent()
zoom.value = mainStore.map.getView().getZoom() || zoom.value
}

Expand Down
Loading
Loading