getkirby / kirby

Kirby's core application folder
https://getkirby.com
Other
1.27k stars 167 forks source link

Integrate "Panel View Extended" in core #3489

Closed distantnative closed 3 years ago

distantnative commented 3 years ago

To better see if/what could be done, let's break this down into small actionable steps:

WIP PR: https://github.com/getkirby/kirby/pull/3490

nilshoerrmann commented 3 years ago

Please consider that some of these things could be done using plain CSS easily on a per install basis, if the panel provided context information on the wrapping elements. So it might not be necessary to have blueprint options.

E. g. if the action underneath the headline featured ids like action-open, action-status or action-settings those could be hidden easily using CSS. If the body provided the current page id this would allow for more specific CSS application, too.

Or if pages sections provided information about the current item status via classes that would also allow for manifold visual changes.

distantnative commented 3 years ago

@nilshoerrmann that's a very good comment. Indeed "the more blueprint options the worse" and in this case it is really a lot about how to "display" something, permissions for most of the actions tied to these elements already exists. So hiding the display would make a lot sense via CSS to me, I agree.

nilshoerrmann commented 3 years ago

Or if pages sections provided information about the current item status via classes that would also allow for manifold visual changes.

While you're at this, I'd like to suggest another addition:

If the panel added three classes to section items – is-draft, is-unlisted and is-unlisted – it would become possible to add custom styles to dim drafts visually for example. This alone would be great. But what about making these classnames dynamic?

The page class could have a method that generates the classnames used in the section:

function toSectionClassnames() {
    return 'is-' . $this->status();
}

This would give us a way to change the output in a model, e. g.:

function toSectionClassnames() {
    return 'is-' . $this->intendedTemplate()->name();
}

This would be very helpful for case where you'd like to color-code specific items in a section. Currently, this is only possible by adding custom markup to the item's content (see the orange tags):

grafik
distantnative commented 3 years ago

I don't think I'd add this backend method etc. - to me that seems a bit overkill (for the use cases the need that much customisation, adding own markup might still be the way to go). But I agree that we can look into adding some standard info (template, status).

nilshoerrmann commented 3 years ago

I'm fine with that.

Let me just point out that "adding your own markup" does not mean you can customize the item itself. It's only possible to add markup inside the padding box of the item. This can be very limiting at times.

bastianallgeier commented 3 years ago

If we want to implement the last check mark as well, we can still open a new issue.