Skip to content

Merge branch 'main' into next#704

Open
dopenguin wants to merge 8 commits into
nextfrom
chore/update-next
Open

Merge branch 'main' into next#704
dopenguin wants to merge 8 commits into
nextfrom
chore/update-next

Conversation

@dopenguin
Copy link
Copy Markdown
Member

@dopenguin dopenguin commented May 4, 2026

Summary

Merges the current main branch into next.

Instructions for local reproduction and review

Some already migrated plugins have also received updates that have only been added to main before; this is also the reason why I am doing this as a PR.
Taking a close look to those files should be the priority.

This includes adding changes from main to already migrated parts.

# Conflicts:
#	.github/CODEOWNERS
#	.github/workflows/publish-packages.yml
#	.github/workflows/publish-pages.yml
#	.github/workflows/run-tests.yml
#	.gitignore
#	.npmrc
#	README.md
#	docs/assets/iceberg.svg
#	docs/assets/iceberg_icon.svg
#	docs/assets/logo-polar--horizontal--dark.svg
#	docs/assets/logo-polar--horizontal.svg
#	docs/assets/logo-polar.svg
#	nx.json
#	package-lock.json
#	package.json
#	packages/clients/generic/API.md
#	packages/clients/generic/CHANGELOG.md
#	packages/clients/generic/package.json
#	packages/clients/generic/src/polar-client.ts
#	packages/clients/generic/vite.config.js
#	packages/core/CHANGELOG.md
#	packages/core/README.md
#	packages/core/package.json
#	packages/core/src/components/MapContainer.vue
#	packages/core/src/utils/interactions.ts
#	packages/lib/getFeatures/CHANGELOG.md
#	packages/lib/getFeatures/package.json
#	packages/lib/getFeatures/tests/wfs.spec.ts
#	packages/lib/getFeatures/types.ts
#	packages/lib/getFeatures/wfs/buildWfsFilter.ts
#	packages/lib/getFeatures/wfs/parse.ts
#	packages/plugins/AddressSearch/CHANGELOG.md
#	packages/plugins/AddressSearch/README.md
#	packages/plugins/AddressSearch/package.json
#	packages/plugins/AddressSearch/src/components/Input.vue
#	packages/plugins/AddressSearch/src/store/actions.ts
#	packages/plugins/AddressSearch/src/utils/focusFirstResult.ts
#	packages/plugins/Attributions/CHANGELOG.md
#	packages/plugins/Attributions/package.json
#	packages/plugins/Attributions/src/store/index.ts
#	packages/plugins/Filter/CHANGELOG.md
#	packages/plugins/Filter/package.json
#	packages/plugins/GeoLocation/CHANGELOG.md
#	packages/plugins/GeoLocation/package.json
#	packages/plugins/IconMenu/CHANGELOG.md
#	packages/plugins/IconMenu/package.json
#	packages/plugins/IconMenu/src/locales.ts
#	packages/plugins/LayerChooser/CHANGELOG.md
#	packages/plugins/LayerChooser/package.json
#	packages/plugins/Pins/CHANGELOG.md
#	packages/plugins/Pins/package.json
#	packages/plugins/Pins/src/store/index.ts
#	packages/plugins/PointerPosition/package.json
#	packages/plugins/ReverseGeocoder/CHANGELOG.md
#	packages/plugins/ReverseGeocoder/README.md
#	packages/plugins/ReverseGeocoder/package.json
#	packages/plugins/ReverseGeocoder/src/store/actions/reverseGeocode.ts
#	packages/plugins/ReverseGeocoder/src/store/index.ts
#	packages/plugins/ReverseGeocoder/tests/reverseGeocode.spec.ts
#	packages/plugins/Scale/CHANGELOG.md
#	packages/plugins/Scale/package.json
#	packages/types/custom/core.ts
#	vue2/packages/clients/dish/src/utils/sortFeaturesByProperties.ts
#	vue2/packages/clients/dish/src/utils/watchActiveMaksIds.ts
#	vue2/packages/clients/dish/src/utils/watchSearchResultForAlkisSearch.ts
#	vue2/packages/clients/meldemichel/example/jenfeld.html
#	vue2/packages/clients/meldemichel/src/utils/jenfeld.ts
#	vue2/packages/clients/meldemichel/src/utils/jenfeld/addJenfeldBoundary.ts
#	vue2/packages/clients/meldemichel/src/utils/jenfeld/clipWithJenfeldBoundary.ts
#	vue2/packages/clients/meldemichel/src/utils/jenfeld/services.js
#	vue2/packages/plugins/Draw/src/store/reviseFeatures/mergeToMultiGeometries.ts
@dopenguin dopenguin added this to the POLAR@3 milestone May 4, 2026
@dopenguin dopenguin self-assigned this May 4, 2026
# Conflicts:
#	.github/dependabot.yml
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://Dataport.github.io/polar/pr-preview/pr-704/

Built to branch gh-pages at 2026-05-11 12:42 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link
Copy Markdown
Member

@warm-coolguy warm-coolguy left a comment

Choose a reason for hiding this comment

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

🏓 @dopenguin

Comment on lines +184 to +191
/**
* The function will receive the full FeatureCollection object that may be reduced before returning it.
* The resultModifier function will be called before adding anything to the store.
* Programming knowledge required.
*/
resultModifier?: (
object: PolarGeoJsonFeatureCollection
) => PolarGeoJsonFeatureCollection
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 new parameter is defined, but not used.

This seems to be the missing part:

diff --git a/packages/plugins/AddressSearch/src/store/actions.ts b/packages/plugins/AddressSearch/src/store/actions.ts
index ac0f7bf0b..d949d6801 100644
--- a/packages/plugins/AddressSearch/src/store/actions.ts
+++ b/packages/plugins/AddressSearch/src/store/actions.ts
@@ -26,7 +26,7 @@ const getResultsFromPromises = (
       ]
     }
     return accumulator
-  }, [] as object[])
+  }, [] as { index: number; value: FeatureCollection }[])
 
   // only print errors if search was not aborted
   if (!abortController.signal.aborted) {
@@ -147,12 +147,23 @@ export const makeActions = () => {
           )
         )
       return Promise.allSettled(searchPromises)
-        .then((results) =>
-          commit(
-            'setSearchResults',
-            getResultsFromPromises(results, localAbortControllerReference)
-          )
-        )
+        .then((results) => {
+          const searchResults = getResultsFromPromises(
+            results,
+            localAbortControllerReference
+          ).map(({ index, value }) => {
+            const config = activeSearchMethods[index]
+
+            return {
+              index,
+              value: config.resultModifier
+                ? config.resultModifier(value)
+                : value,
+            }
+          })
+
+          commit('setSearchResults', searchResults)
+        })
         .catch((error: Error) => {
           console.error(
             '@polar/plugin-address-search: An error occurred while searching.',

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's even shorter now c0fb800

@dopenguin
Copy link
Copy Markdown
Member Author

🏓 @dopenguin

🏓 @warm-coolguy

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.

2 participants