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

4.0 Compatibility #57

Closed afbora closed 6 months ago

afbora commented 1 year ago

Tested on 4.0.0-alpha.3 and working great! There is just minor UI issue:

screen-capture-1610-Test - Mægazine-localhost

nmanngit commented 1 year ago

I just created #58 to address the dialog UI and resolve a breaking change introduced in alpha 4. While working on it, I also encountered some more UI bugs. However, I'm unsure whether these should be handled within this repo or reported to the Kirby repo. They happen due to these CSS overrides:

/* Causes locator icon to shrink which feels unintuitive */
:where(img,picture,svg) {
    max-inline-size: 100%;
}

/* Causes leaflet flag icon to move to a separate line. Note leaflet is an external dependency */
:where(img,svg,video,canvas,audio,iframe,embed,object) {
    display: block;
}

What do you think?

bnomei commented 12 months ago

ping @sylvainjule

bnomei commented 12 months ago

constructor of structure changed. your fieldMethods.php needs a fix

<?php

use Kirby\Cms\Structure;

return [
    'toLocation' => function ($field) {
        $structure = new Structure([$field->yaml()], [
            'parent' => $field->parent()
        ]);

        return $structure->first();
    },
];
nmanngit commented 12 months ago

@bnomei please have a look at my PR, where I used Structure::factory() as mentioned here.

ovenum commented 11 months ago

Just noticed that the Field Preview requires some tweaks and maybe rounded borders to be inline with the current Panel styles.

@sylvainjule do you prefer issues being created here or as separate github issues? Also happy to create pull requests if needed.

image
sylvainjule commented 10 months ago

Thank you for this and the PR! I'm catching up with maintenance of all my plugins this week, once they're all up to speed for Kirby 3.9 I'll dig into 4.0.

renestalder commented 7 months ago

Apart from visual quirks, does it otherwise work with v4? Does anybody use it without the fixes?

sylvainjule commented 6 months ago

The plugin is now compatible with Kirby 4 ✓ I'm closing this, I've tried to review all options / use cases, don't hesitate to open dedicated issues if you have trouble with this latest release.