rollthecloudinc / quell

Climate aware CMS breaking web apps free from carbon emissions.
https://demo.carbonfreed.app/pages/create-panel-page
GNU General Public License v3.0
14 stars 1 forks source link

Modals #24

Open verti-go opened 2 years ago

verti-go commented 2 years ago

My thoughts regarding this are supporting content that lives off to the side effectively in the "wilderness". The PanelPage would support adding content: panel pages, panes, and panels, etc or just configured content plugins. These pieces of content can than be referenced by key or something when opening overlays or portals. When that is done the portal or overlay will inject that piece of content into desired portal. Alternatively content can be loaded in the background using another panel page.

I think this would be quit straight forward for the basic scenarios.


I think the best way to implement this is to add an event / action system to panels. Events can propagate up and be caught / handled by panel pages. The architecture of this approach is discussed in the form persistence issue. I think this overlaps with that. The mechanism used to catch and handle events will be the same as the rules system.

In theory this could also be done using the bridge in combination with an extension or dedicated site module. The extension would provide a bridge function to open the dialog. The bridge function can be initiated from a script inside a snippet attached to a click event for dom element like a button.

Maybe it doesn't make as much senss to spend time on this knowing it is possible to achieve with a little code now that the bridge exists.


The prerequisite of this will be creating a mechanism to manage events originating from panel page resources. Some thought has already gone into that inside the below issue.

https://github.com/ng-druid/platform/issues/189

windbeneathyourwings commented 2 years ago

I think we are part the way here with hiding panes based on state and removing panes like we do in the tabs plugin. I think both those things support the idea of having a pane shown inside a modal instead of the normal flow of a panel.