sylvainjule / kirby-locator

A simple map & geolocation field, built on top of open-source services and Mapbox. Kirby 3 and 4.
97 stars 14 forks source link

v4 Compatibility #58

Closed nmanngit closed 6 months ago

nmanngit commented 1 year ago

v4 Compatibility

Dialog UI fix

Changes the confirm button to be more in line with the new Kirby v4 UI by using the standard layout and design + hiding the cancel button. Not as sleek as v3 but I think the most 'standard' approach. Looks identical to before in v3 (second image):

new dialog ui old dialog ui

Breaking change fix

Kirby 4 alpha 4 introduced a breaking change that makes this plugin unusable. Here it says to use Structure::factory() instead of new Structure(). This PR uses a version check to keep compatibility with v3. Please check if the code is sufficient.

Bump kirbyup dependency

I bumped kirbyup to the newest version which makes it a lot faster to rebuild and then rebuilt it with above changes.

ToDo

I found some more problems introduced with the new UI:

Last two are due to Kirby CSS SVG overrides introduced in alpha 5. I don't know if they should be handled here or over at the Kirby repo.

locator icon shrunken down flag icon on separate line
sylvainjule commented 6 months ago

Thanks a lot for the PR! I've updated the field with a bunch of additional changes, still a few things to fix to be ready for K4. I'll update the field method manually, thank you!