Merge branch 'main' into next#704
Open
dopenguin wants to merge 8 commits into
Open
Conversation
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
# Conflicts: # .github/dependabot.yml
|
# Conflicts: # vue2/packages/plugins/Export/CHANGELOG.md # vue2/packages/plugins/Export/package.json # vue2/pages/examples/draw.html
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 |
Member
There was a problem hiding this comment.
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.',
Member
Author
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Merges the current
mainbranch intonext.Instructions for local reproduction and review
Some already migrated plugins have also received updates that have only been added to
mainbefore; this is also the reason why I am doing this as a PR.Taking a close look to those files should be the priority.