-
Notifications
You must be signed in to change notification settings - Fork 5
feat(gfi): migrate plugin #447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
oeninghe-dataport
wants to merge
143
commits into
next
Choose a base branch
from
vue3/migrate-plugin-gfi
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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 74e98dd
feat(core): export `center` and `extent` as instable API
oeninghe-dataport 0da4c0a
feat(core): add shared pagination component
oeninghe-dataport 15972bf
test(snowbox): allow jumping to Hamburg via button
oeninghe-dataport d449c8d
test(snowbox): debug assistant for browser devtools
oeninghe-dataport 1234994
feat(gfi): migrate plugin
oeninghe-dataport 8757e3b
refactor(core): make `renderType` a global plugin option
oeninghe-dataport 425cfdb
feat(gfi): improve support for different rendering options
oeninghe-dataport bf71346
Merge branch 'next' into vue3/migrate-plugin-gfi
oeninghe-dataport 70ff48d
Merge branch 'next' into vue3/migrate-plugin-gfi
dopenguin 11fe191
Merge branch 'next' into vue3/migrate-plugin-gfi
dopenguin 978d718
fix(gfi): remove legacy manual plugin prefix for console
oeninghe-dataport 6d60086
docs: fix shared locales hint
oeninghe-dataport 6182677
docs: fix shared locales hint
oeninghe-dataport 439ae45
docs: fix shared locales hint
oeninghe-dataport aa854c8
Merge remote-tracking branch 'origin/next' into vue3/migrate-plugin-gfi
oeninghe-dataport a0daad3
Merge remote-tracking branch 'origin/next' into vue3/migrate-plugin-gfi
oeninghe-dataport 63a5d72
docs(gfi): remove duplicate ToDo hint
oeninghe-dataport 55ff02a
docs(gfi): use typedoc-linking to layout nineRegions
oeninghe-dataport c2edb52
feat(core): introduce InterfacePluginOptions
oeninghe-dataport 79852f3
refactor(gfi): introduce new composable usePluginStoreWatcher
oeninghe-dataport 9f25413
fix(core): consider hoveredFeature set from plugin again
oeninghe-dataport d15b2c2
chore(core): markers: fix double star in comment
oeninghe-dataport 4dfe6af
test(snowbox): enable bindWithCoreHoverSelect for gfi plugin
oeninghe-dataport 875a35c
fix(gfi): wrap text for empty view in feature list
oeninghe-dataport ec689f1
fix(gfi): highlight selected feature with bindMarkers
oeninghe-dataport a6e5698
test(snowbox): disable separate geometry display as bindMarkers is used
oeninghe-dataport ef16d0b
Merge remote-tracking branch 'origin/next' into vue3/migrate-plugin-gfi
oeninghe-dataport 3271a30
test(iceberg): add GFI plugin w/ configuration options
oeninghe-dataport c7a096d
chore(snowbox): move comment to be at the right spot again
oeninghe-dataport 03243fe
fix(gfi): add plugin options to MapConfiguration
oeninghe-dataport 92c938c
fix(gfi): show export button only if export is configured
oeninghe-dataport 758e48e
Merge branch 'next' into vue3/migrate-plugin-gfi
dopenguin b13d946
docs(gfi): fix typo in src/plugins/gfi/types.ts
oeninghe-dataport 78cf7ea
refactor(gfi): simplify v-else-if for gfiUI
oeninghe-dataport 5c52f98
docs(gfi): improve inter-docs linking
oeninghe-dataport 2bc62e3
docs(gfi): improve inter-docs linking
oeninghe-dataport 30369fe
docs(gfi): improve wording for gfi types
oeninghe-dataport 71e0fe9
fix(gfi): remove superfluous gfiFailedSymbol
oeninghe-dataport de7c0a2
docs(gfi): explain where geometry property name default is derived from
oeninghe-dataport 049b529
docs(core): improve wording in src/core/utils/map/setupMarkers.ts
oeninghe-dataport c49b158
fix(gfi): use correct heading level for featureList
oeninghe-dataport 68760f7
fix(gfi): align feature buttons to top-right corner
oeninghe-dataport 37e1612
refactor(gfi): replace hardcoded `'gfi'` with `PluginId`
oeninghe-dataport acc27d6
feat: add info about shown and total items to pagination
oeninghe-dataport e50c423
fix(gfi): adapt KERN style properly
oeninghe-dataport e462655
docs(gfi): replace irregular whitespace with regular
oeninghe-dataport 2516299
docs(gfi): noted that text format for gfi is probably not standardized
oeninghe-dataport 6bebd40
docs(gfi): use JSDoc syntax for default value
oeninghe-dataport 92593c1
refactor(gfi): remove legacy code from vue2
oeninghe-dataport cf97607
style: introduce ESLint rule perfectionist/sort-named-imports
oeninghe-dataport f46aa79
chore(gfi): remove migrated type HighlightStyle from vue2 code
oeninghe-dataport b8fb5a2
fix(gfi): add missing import of PluginId to GfiUI
oeninghe-dataport 985bc02
fix: using more KERN variables for KernPagination
oeninghe-dataport 18d2a1a
fix: use english for english shared locales
oeninghe-dataport 4f9d2e1
fix(gfi): use correct Vue-deep reference in GfiUI
oeninghe-dataport e8f3597
Merge remote-tracking branch 'origin/next' into vue3/migrate-plugin-gfi
oeninghe-dataport c89b58b
fix(gfi): the CustomHighlightStyle keys are optional
oeninghe-dataport fa787b1
refactor(gfi): move tooltip to new plugin composable
oeninghe-dataport 07d6066
docs(gfi): hide internal types
oeninghe-dataport 0bbd0fb
docs(gfi): improve docs for format in GfiLayerConfiguration
oeninghe-dataport db2a657
docs(gfi): improve inter-docs linking
oeninghe-dataport 9edf830
refactor(core): add util `findLayer`
oeninghe-dataport d1be583
docs(gfi): fix typo
oeninghe-dataport f112666
refactor: make former getRefStore a composable
oeninghe-dataport 7b08d89
chore: remove superfluous CSS rules in pagination
oeninghe-dataport b7280b0
refactor(gfi): use UI CSS in the right places and w/ KERN
oeninghe-dataport 3b0c6f5
chore(gfi): remove superfluous TODO
oeninghe-dataport c598a80
fix(gfi): adapt styling of feature list items to KERN + previous POLAR
oeninghe-dataport 92f446f
test(snowbox): remove legacy eigengrau color variable
oeninghe-dataport 62062f0
docs(gfi): fix return value type of showTooltip
oeninghe-dataport ea8c02d
docs(gfi): improve docs of feature to text serializing
oeninghe-dataport f1ffdb6
docs(gfi): remove redundant sentence
oeninghe-dataport f835925
style(gfi): remove linter-failing whitespace
oeninghe-dataport bff6bdc
docs(gfi): plugin loading order does not matter anymore
oeninghe-dataport 9d95f73
docs(gfi): fix typo
oeninghe-dataport e82b7c6
docs(gfi): improve inter-docs linking
oeninghe-dataport 7f05d42
docs(gfi): fix typo
oeninghe-dataport 635a1e7
docs(gfi): improve inter-docs linking
oeninghe-dataport 2336f7e
docs(gfi): improve inter-docs typing for directSelect
oeninghe-dataport a6607c6
fix(gfi): debounce getFeatureInfo request again
oeninghe-dataport 3a9843a
Merge remote-tracking branch 'origin/next' into vue3/migrate-plugin-gfi
oeninghe-dataport 1087c8d
feat: add gfi to generic client
oeninghe-dataport 8d17a09
test(snowbox): configure isSelectable for gfi to match markers
oeninghe-dataport 1a360e9
fix(gfi): add hover state on keyboard focus
oeninghe-dataport 1370962
fix(gfi): refresh feature list on vector source changes
oeninghe-dataport 37588de
fix: markers remember their selection on clusters
oeninghe-dataport 271ad09
chore(gfi): remove legacy code
oeninghe-dataport 4a80f42
Merge branch 'next' into vue3/migrate-plugin-gfi
oeninghe-dataport fb59311
Merge remote-tracking branch 'origin/next' into vue3/migrate-plugin-gfi
oeninghe-dataport ab14bb0
chore(gfi): add link to spec for gfi wms in text format
oeninghe-dataport ed87486
docs: remove (incorrect) hint on the defined default value
oeninghe-dataport c7c6b35
refactor(gfi): replace logical OR w/ type assertion
oeninghe-dataport 1f639d8
refactor(gfi): improve type annotations for updateTooltip
oeninghe-dataport 67eafe4
refactor(gfi): strengthen updateTooltip parameter type
oeninghe-dataport 65ec115
refactor: remove superfluous type annotation in KernPagination
oeninghe-dataport 1ab845c
refactor(gfi): use implicit props binding for GfiFeature
oeninghe-dataport 7c49b21
refactor(gfi): remove unused prop in GfiFeature
oeninghe-dataport db7493f
refactor(gfi): use combination of class-styles in template for featur…
oeninghe-dataport d3d97d6
perf(gfi): use shallowRef's for OpenLayers references
oeninghe-dataport 13e685a
feat(gfi): add optional title-prepended icon
oeninghe-dataport 35610a2
refactor(gfi): remove unused css fragment
oeninghe-dataport cdeda5b
refactor(gfi): remove options object pattern for internal composables
oeninghe-dataport 4f6c62e
fix(gfi): consider default renderType
oeninghe-dataport bf3c65d
feat(gfi): add enrichedPaginatedFeatures to list store
oeninghe-dataport 1547b7b
refactor(gfi): remove extra blank line in feature UI
oeninghe-dataport 091af04
fix: adapt KERN variables to @kern-ux/native@^2.6.2
oeninghe-dataport d1f3a92
fix(gfi): hide exportProperty within properties
oeninghe-dataport 0a16793
fix(gfi): remove margin to match other independent-rendered plugins
oeninghe-dataport 5c8f0c4
fix(gfi): use icon buttons at the top for navigation between features
oeninghe-dataport 9cbbcf4
refactor(gfi): inline `serializeFeature`
oeninghe-dataport b0fc61e
docs(gfi): add inter-linking for gfiLayer properties
oeninghe-dataport 940cf78
docs(gfi): add inter-docs linking for featureList
oeninghe-dataport 0623319
refactor: shorten props reference in pagination template
oeninghe-dataport a20e34b
feat(gfi): allow clearing a coordinate source on closing dialog
oeninghe-dataport b760b14
feat(gfi)!: add configuration for selectionDiff in multiSelect
oeninghe-dataport 7b84459
test(snowbox): add "Go to Kiel" button for easier testing of Kiel layers
oeninghe-dataport 36db39c
refactor: add getter for masked interactions to core
oeninghe-dataport 4bc6e2b
fix(gfi): update default plugin icon
oeninghe-dataport a071a5d
fix(gfi): move pagination to header
oeninghe-dataport a3b965e
test(snowbox): add Meldemichel tooltip logic
oeninghe-dataport 0000a4f
fix: pagination offers different pages now
oeninghe-dataport b002d7b
fix: adapt spacing in pagination to match old behaviour
oeninghe-dataport 6445501
feat(gfi): allow configurable feature title in detail window
oeninghe-dataport 374117e
docs(gfi): fix formatting of literal value
oeninghe-dataport 48bdc5a
Merge branch 'next' into vue3/migrate-plugin-gfi
oeninghe-dataport 7f19cac
Merge branch 'next' into vue3/migrate-plugin-gfi
oeninghe-dataport b099e3f
fix(gfi): align icon with title in gfi UI
oeninghe-dataport bf29efb
fix(gfi): unified padding for gfi feature list
oeninghe-dataport 236c0fc
fix(gfi): replace PolarIconButton with KernButton
oeninghe-dataport 014198b
fix(gfi): adapt hover and selection behaviour to POLAR@2
oeninghe-dataport dc2dc75
fix: pagination buttons have the same height
oeninghe-dataport d321f67
fix(core): tooltip headers have reduced margins
oeninghe-dataport 3b72e2d
perf: add caching to getCluster
oeninghe-dataport 87c843a
perf: do not deep-watch OL objects in useOlVectorSources
oeninghe-dataport 43f7344
perf(gfi): lazy hover calculation
oeninghe-dataport 7555797
docs(core): add hint to evaluate maskedInteractions
oeninghe-dataport 178001a
refactor(gfi): extract setSelectedFeature in featureList
oeninghe-dataport debe186
perf(gfi): use `markRaw` with OpenLayers objects
oeninghe-dataport 97254a4
test(snowbox): use larger clusterDistance to match MML
oeninghe-dataport 07b7bad
Merge branch 'next' into vue3/migrate-plugin-gfi
oeninghe-dataport 6c762b2
refactor: rename `idx` to `index`
oeninghe-dataport 82d2196
fix(gfi): filter selectable features with zoom changes
oeninghe-dataport File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| 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> |
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
| 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) |
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
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
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
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
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
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
| 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 })[]>(() => { | ||
|
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); | ||
|
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; | ||
|
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); | ||
|
dopenguin marked this conversation as resolved.
Outdated
|
||
| } | ||
| } | ||
| </style> | ||
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
Oops, something went wrong.
Oops, something went wrong.
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.


There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you go: a3b965e