Skip to content

feat(addressSearch): migrate plugin#479

Open
dopenguin wants to merge 193 commits intonextfrom
vue3/migrate-plugin-address-search
Open

feat(addressSearch): migrate plugin#479
dopenguin wants to merge 193 commits intonextfrom
vue3/migrate-plugin-address-search

Conversation

@dopenguin
Copy link
Member

@dopenguin dopenguin commented Jan 16, 2026

Summary

The addressSearch plugin is migrated to POLAR@3.

Instructions for local reproduction and review

  • Receive multiple configurations through a secure channel.
  • Open snowbox.
  • Search wildly with the different configurations.

Caveats

The order plugins are added is (sadly) still important for them to work with one another.
I've changed the order of plugins so that it works for now. If we got a coordinateSource like in ReverseGeocode and Pins, the initial watch can only be added when the order of plugins is correct. We should tackle this in a separate PR so that one can freely add or remove plugins and all watchers work.

Relevant tickets, issues, et cetera

Closes #369

@dopenguin
Copy link
Member Author

🏓 @dopenguin

Receive multiple configurations through a secure channel.

Please send multiple configurations through a secure channel.

@warm-coolguy pingpong

🏓 @dopenguin

🏓 @warm-coolguy

🏓 @dopenguin https://www.youtube.com/watch?v=GpTPm1R4_AM&t=16s

🏓 @warm-coolguy

@warm-coolguy
Copy link
Member

🏓 @dopenguin

Receive multiple configurations through a secure channel.

Please send multiple configurations through a secure channel.

@warm-coolguy pingpong

🏓 @dopenguin

🏓 @warm-coolguy

🏓 @dopenguin https://www.youtube.com/watch?v=GpTPm1R4_AM&t=16s

🏓 @warm-coolguy

🏓 @dopenguin

@dopenguin dopenguin force-pushed the vue3/migrate-plugin-address-search branch from 7d09885 to d6e2684 Compare February 16, 2026 16:28
@dopenguin
Copy link
Member Author

dopenguin commented Feb 16, 2026

🏓 @dopenguin

Receive multiple configurations through a secure channel.

Please send multiple configurations through a secure channel.

@warm-coolguy pingpong

🏓 @dopenguin

🏓 @warm-coolguy

🏓 @dopenguin https://www.youtube.com/watch?v=GpTPm1R4_AM&t=16s

🏓 @warm-coolguy

🏓 @dopenguin

As discussed, I've adjusted several things

  • Opening and closing menus now works via id d6e2684
  • The iconMenu now flows like before in layout: 'standard' fb7f20b, bf3061f
  • The width of the search is now using a proper maximum a698276
  • The results are now properly being displayed above other content 110b932
  • Clear button and loading indicator are now correctly placed in layout: 'nineRegions' d29a774
  • The search input now has a search icon prepended 2943896

🏓 @warm-coolguy

Copy link
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

Receive multiple configurations through a secure channel.

Please send multiple configurations through a secure channel.

@warm-coolguy pingpong

🏓 @dopenguin

🏓 @warm-coolguy

🏓 @dopenguin https://www.youtube.com/watch?v=GpTPm1R4_AM&t=16s

🏓 @warm-coolguy

🏓 @dopenguin

As discussed, I've adjusted several things

* Opening and closing menus now works via id [d6e2684](https://github.com/Dataport/polar/commit/d6e2684b1585bd081af4d9820aa2da99aec865a2)

* The iconMenu now flows like before in `layout: 'standard'` [fb7f20b](https://github.com/Dataport/polar/commit/fb7f20b463042b6e9d25575ed7cbf6ebc2f1759d), [bf3061f](https://github.com/Dataport/polar/commit/bf3061f933b0e3f308d25fb6e8052e91989a27d3)

* The width of the search is now using a proper maximum [a698276](https://github.com/Dataport/polar/commit/a6982767ca12c490d833b54091d4b1be6a68d509)

* The results are now properly being displayed above other content [110b932](https://github.com/Dataport/polar/commit/110b93239192e75e3879cb4c976b5f54624519ef)

* Clear button and loading indicator are now correctly placed in `layout: 'nineRegions'` [d29a774](https://github.com/Dataport/polar/commit/d29a774228614a2c6d06e4ba28cf6796440ee9a9)

* The search input now a search icon prepended [2943896](https://github.com/Dataport/polar/commit/2943896dc722273b5b7b8247feba9de384f0c564)

🏓 @warm-coolguy

🏓 @dopenguin

nope-not-happy

:value="selectedGroupId"
@update:value="selectedGroupId = $event as string"
/>
<span class="kern-icon kern-icon--search" aria-hidden="true" />
Copy link
Member

Choose a reason for hiding this comment

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

Image

The icon is visually off / vertically uncentered.

Copy link
Member Author

Choose a reason for hiding this comment

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

</span>
</button>
<!-- TODO: Displaying this when multipleGroups are being used jiggles a bit -->
<span v-if="hint.length > 0" class="polar-plugin-address-search-hint">
Copy link
Member

Choose a reason for hiding this comment

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

Image

The popping in/out of the hint bar is causing a huge shift in the element's sizing. This was an issue before, but now, with the magnifying glass jumping, the flickering's become quite the problem.

I suggest that vertical space is reserved for the hint so that it popping in/out no longer causes any resizing. This is visually calmer and hence less confusing to users, too.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've chatted with UX: The jiggle generally is suboptimal. Especially as the input element expands even more once results are visible. However, finding a solid solution for the long run is something that shall be tackled some time in the future by UX.
Until then, I've fixed the movement of the icon 659c97d

*
* @defaultValue false
*/
focusAfterSearch?: boolean
Copy link
Member

Choose a reason for hiding this comment

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

Image

The flag only works when no results were visible prior to a search. Navigations back to the input and starting another search has no focus steal.

Copy link
Member Author

@dopenguin dopenguin Feb 17, 2026

Choose a reason for hiding this comment

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

Watching the correct getter now 981839f

@keydown.down.prevent.stop="inputDown"
/>
<SmallLoader v-if="isLoading" :style="`right: ${slotPlacement}`" />
<button
Copy link
Member

Choose a reason for hiding this comment

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

It is currently not possible to interact with this element with pointer devices.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed 621ba98

@@ -0,0 +1,220 @@
<template>
Copy link
Member

Choose a reason for hiding this comment

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

Image

When narrowing the map client, the icon starts to tile and the clear button starts to overlap input again.

Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -0,0 +1,220 @@
<template>
Copy link
Member

Choose a reason for hiding this comment

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

Image

There's a scrollbar that, probably, shouldn't be there. If you feel like this is a proper solution, please confirm with UI/UX. However, if that stays, we'll have to make scrolling functional on mobile devices. As it is, it's hardly possible to do it at all, since the draggable region is hardly there.

However, even when scrolling completely to the right within the box, the border to the input element never becomes completely visible. The image represents that state.

Copy link
Member Author

Choose a reason for hiding this comment

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

Of course this was not intended 92a2353

@@ -0,0 +1,220 @@
<template>
Copy link
Member

Choose a reason for hiding this comment

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

Most of the input element as it visually appears on mobile devices is not clickable with my thumb. That is, I am fumbling around like an idiot and not getting any focus. It seems like I have to click into the left 1/3 of the input. However, since I am right-handed, and my pointer device thumb comes from the right of the screen, I regularly miss the clickable zone.

Copy link
Member Author

@dopenguin dopenguin Feb 17, 2026

Choose a reason for hiding this comment

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

Seems to be an issue with nineRegions, just like with #479 (comment) and #479 (comment). I'll take a look at it

Edit: Seems to be the same issue as mentioned in #479 (comment), so I'll handle it there.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed 621ba98

@@ -29,8 +29,11 @@
import type { PolarContainer } from '@polar/polar'
Copy link
Member

Choose a reason for hiding this comment

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

On my mobile device, when testing the snowbox, the Please use two fingers ... text no longer appears. I am either not panning the map at all, or I am directly panning with the thumb. This leads me to assume that, once the panning issue is fixed, we'll have scroll traps.

Copy link
Member Author

@dopenguin dopenguin Feb 17, 2026

Choose a reason for hiding this comment

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

Even though this is a comment on iceberg, I can reproduce the behaviour.
This has nothing to do with this PR though, as the bug already exists on next. Thus, I've created an issue #540

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed 621ba98

@@ -1,10 +1,13 @@
import {
Copy link
Member

Choose a reason for hiding this comment

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

Differing to the snowbox configuration, the reverse geocoder is no longer configured in this example. It also no longer works in the snowbox, but previously did.

I suggest you configure it in the iceberg client, too, to test whether the two plugins interoperate as expected. After all, AddressSearch♥Pins♥ReverseGeocoder are the three musketeers of figuring out what is where.

Copy link
Member Author

Choose a reason for hiding this comment

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

The reverse geocoder only works for addresses in Hamburg, thus setting a pin anywhere else won't yield a result. However, I've added the layer for the boundary of Hamburg to remove confusion while also centering the map initally on Hamburg as otherwise the layer is not yet loaded and the pin would be set either way 22dcc9b

However, I've added the reverse geocoder to iceberg, as that should be the client we are testing moving forward 7c47c09

Co-authored-by: Dennis Sen <108349707+warm-coolguy@users.noreply.github.com>
@dopenguin
Copy link
Member Author

🏓 @dopenguin

Receive multiple configurations through a secure channel.

Please send multiple configurations through a secure channel.

@warm-coolguy pingpong

🏓 @dopenguin

🏓 @warm-coolguy

🏓 @dopenguin https://www.youtube.com/watch?v=GpTPm1R4_AM&t=16s

🏓 @warm-coolguy

🏓 @dopenguin

As discussed, I've adjusted several things

* Opening and closing menus now works via id [d6e2684](https://github.com/Dataport/polar/commit/d6e2684b1585bd081af4d9820aa2da99aec865a2)

* The iconMenu now flows like before in `layout: 'standard'` [fb7f20b](https://github.com/Dataport/polar/commit/fb7f20b463042b6e9d25575ed7cbf6ebc2f1759d), [bf3061f](https://github.com/Dataport/polar/commit/bf3061f933b0e3f308d25fb6e8052e91989a27d3)

* The width of the search is now using a proper maximum [a698276](https://github.com/Dataport/polar/commit/a6982767ca12c490d833b54091d4b1be6a68d509)

* The results are now properly being displayed above other content [110b932](https://github.com/Dataport/polar/commit/110b93239192e75e3879cb4c976b5f54624519ef)

* Clear button and loading indicator are now correctly placed in `layout: 'nineRegions'` [d29a774](https://github.com/Dataport/polar/commit/d29a774228614a2c6d06e4ba28cf6796440ee9a9)

* The search input now a search icon prepended [2943896](https://github.com/Dataport/polar/commit/2943896dc722273b5b7b8247feba9de384f0c564)

🏓 @warm-coolguy

🏓 @dopenguin

nope-not-happy

🏓 @warm-coolguy

alone escobar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Refactoring of previous code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migration of AddressSearch plugin to POLAR@3

3 participants