OFFLINE-GmbH / oc-boxes-support

This repo is used for support requests for the OFFLINE.Boxes plugin
https://boxes.offline.ch
4 stars 0 forks source link

October CMS Editor Extension to edit Box Partials #4

Closed tobias-kuendig closed 8 months ago

tobias-kuendig commented 2 years ago

Provide an easy way to modify Box Partials and their configs in the October CMS Backend Editor.

daftspunk commented 1 year ago

Some advice for this: Adding a new tab to the CMS partials section might be tempting; however, the best approach could be to include a new namespace called "boxes" in the Editor.

It may need an extended Cms\Classes\Partial object that saves both a .htm and a .yaml file and only lists partials that meet this criterion. Basically, a duplication of the CMS > Partials section but filtered by box-activated partials.

Look at the tailor module Tailor\Classes\EditorExtension for a sample of this. It is registered with the service provider with the following code:

Event::listen('editor.extension.register', function () {
    return \Tailor\Classes\EditorExtension::class;
});

If you need help with this, feel free to reach out.


edit: Even consider possibly introducing a new CMS template type called Box that can house a single template approach inside a dedicated "boxes" folder. Although, I'm not sure how coupled it is to the existing partial system.

# File: themes/demo/boxes/my-box.htm
# YAML
fields: []
==
<!-- HTML -->
Hello world!
PubliAlex commented 1 year ago

As a developper, heavy user of october CMS (and soon, heavy user of boxes), the best UX experience would be this one :

Do you think it would be possible to handle boxes like that ? It would be awesome

EDIT : In fact, this is a really needed feature because, after some tests with the inline configuration, I discovered that they are deleted when you edit your boxes partial using october Editor, so, even with inline configuration, you are obliged to use an external IDE to work with boxes, which is really annonying for us in the agency.

daftspunk commented 1 year ago

@PubliAlex Exactly ^

Zmove commented 12 months ago

Following that thread cause I'm very interested by this feature. Editing boxes with octobercms editor would be game changer for that plugin

PubliAlex commented 9 months ago

Bump, is the feature planned in a near future ? We have many projects that would use boxes to give more control to final user, but the impossibility to manage boxes using october cms IDE is a real limitation to us.

tobias-kuendig commented 9 months ago

I am currently working on this, there will be a release in the coming days/weeks.

PubliAlex commented 9 months ago

Wonderful news, we are on the starting blocks to test that feature as soon as it's ready !

tobias-kuendig commented 9 months ago

An initial draft is available for testing as version v3.4.0-rc.4.

composer require offline/oc-boxes-plugin:^v3.4.0-rc.4

Basic functionality is available, child theme support will be up next.

PubliAlex commented 8 months ago

Tested and it seems wonderful. Being able to create boxes like that is a real comfort, great job !

tobias-kuendig commented 8 months ago

Thank you @PubliAlex

This feature is now available in v3.4.0.