kirby icon indicating copy to clipboard operation
kirby copied to clipboard

Status button: use custom status label also for title

Open bezin opened this issue 1 year ago • 4 comments

Description

The change status button title attribute is not translated according to the page blueprint. It still contains the German label Ungelistet for unlisted status, wheras I set label and text to be something else. This also happens for the other translated label, too (listed => Freigegeben)

Expected behavior
The button text and title communicate the same status.

Screenshot

Image

To reproduce

  1. Have a page blueprint with the following status configuration:
status:
  draft:
    label: Entwurf
    text: Im Entwurfstadium können Sie die Inhalte frei bearbeiten
  unlisted:
    label: In Prüfung
    text: Ihre Inhalte werden geprüft und ggf. redaktionell bearbeitet. Sie können nun keine Änderungen mehr vornehmen
  listed:
    label: Freigegeben
    text: Ihre Inhalte sind für das Programm freigegeben
  1. Edit the page in the panel and change status to In Prüfung
  2. Hover over the change status button with your pointer

The title attribute shows Ungelistet rather than In Prüfung.

Your setup

Kirby 4.6.1 MacOS 15.3.1 PHP 8.4

bezin avatar Mar 04 '25 10:03 bezin

This also applies to the status indicator in the pages section:

Image

bezin avatar Mar 12 '25 09:03 bezin

@getkirby/backend If we read the blueprint for each model ($page->blueprint()) in the sections data prop and send it to Vue, will we experience performance issues? Or could the blueprint already be read and kept in the cache?

afbora avatar Mar 13 '25 10:03 afbora

I think there performance concerns is why we haven't done it so far. But not sure we actually tested the performance impact.

distantnative avatar Mar 13 '25 13:03 distantnative

I just checked again: for the status view button this does work in Kirby 5: Image

But in sections, it isn't working in Kirby 5 either - and this might be a performance bottleneck if there are pages with many different blueprints in a section and all have to be read (at least currently where we aren't reading blueprints more lazily).

I would say to be further explored after release of 5.0.

distantnative avatar Mar 29 '25 16:03 distantnative