sylvainjule / kirby-color-palette

A color palette to pick colors from in the panel. Kirby 3 only.
57 stars 9 forks source link

Selected color not recognized as active after structure edited #32

Open timkinali opened 10 months ago

timkinali commented 10 months ago

When using structured color themes, the field does not indicate the active color if anything in the structure is added or edited after a page has been saved. I'm using the duo color mode.

For example, I added tooltips to all my colors. Now on the existing pages in the panel, the field does not outline the selected color anymore. I'm assuming this happens because the structure object in the content file is no longer identical to what is defined in the field blueprint? To fix, I have to select the same color again and save so the tooltip data is added to the content file (this is a bit tricky and cumbersome for hundreds of pages). Note: just doing a save without selecting does not work.

Perhaps this is indented behaviour but I suggest:

  1. only the key together with the color values should need to be identical to be recognized as selected.
  2. tooltip does not need to be stored in the content file

I think if suggestion 1 is fixed, any additonal edited or added data in the structure will then just require a simple re-save to repopulate in the content file?

Unfortunately I'm not skilled enough to fix this myself!

Plugin v1.0.4, Kirby 3.9