Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn Neos UI into a scaffold for Plugin/BackendModule integration #3119

Open
grebaldi opened this issue May 14, 2022 · 2 comments
Open

Turn Neos UI into a scaffold for Plugin/BackendModule integration #3119

grebaldi opened this issue May 14, 2022 · 2 comments

Comments

@grebaldi
Copy link
Contributor

grebaldi commented May 14, 2022

Motivation

Today, the Neos UI is a Single-Page-Application with a single route: The Content Module.

Yet, there's a lot more that would be perceived by end users as the "Neos Backend".

So far, we went with a hybrid approach to integrate Backend Modules. The Content Module is a React Application, while every other Backend Module is a pure Flow Application that's entirely rendered on the server side.

In part, this is desirable, because development of Custom Backend Modules should not require any knowledge in React (or even JavaScript for that matter). So, writing a Backend Module using just backend technologies should remain possible without any migration steps.

The purpose of this issue is to make the move to a more streamlined integration between Backend Modules and Neos UI.

This description will change over time, because this feature is still being conceptualized

Acceptance Criteria

TBD.

See also RFC on discuss https://discuss.neos.io/t/rfc-future-of-the-neos-package-architecture-neos-neos-in-particular/6593/8

@Sebobo
Copy link
Member

Sebobo commented May 16, 2022

So is our goal to make it work similar to the content module, that we have an outer module application and the module itself lives in an iframe and can optionally communicate with the "Neos backend app"?

@mhsdesign
Copy link
Member

mhsdesign commented Oct 23, 2022

So i always wanted to know how the ui archives its superior behavior as content module. Because indeed its not just another backend module.

Questions i had in mind.

  • how does the content module achieve its autogenerated "submodule" points, the sites?

this logic is deeply embedded to the module integration/rendering in Neos.Neos
https://github.com/neos/neos-development-collection/blob/720e3a080339b3ab1379ff1c1774b5d9aa6ee80a/Neos.Neos/Classes/Controller/Backend/MenuHelper.php#L78

  • why does the module drawer at the right feel in the ui a little different?

because it is different / completely rebuild

this for example is the <Drawer /> all the menu items are inlined in the page as json and used when booting the application.

export default class Drawer extends PureComponent {

even the neos icon and the user select box are rebuild - everything is rebuild (see next question).

  • is the neos ui influenced by the backend css styles of Neos.Neos?

nope - fun fact it doesnt use the module api at all - we only declare it to be a module, so it pops up in the menu

Neos:
  Neos:
    modules:
      content:
        label: 'Neos.Neos:Main:content'
        controller: 'Neos\Neos\Ui\Controller\BackendController'

one can still navigate to /neos/content without this config in place

modules:
content:
position: 'start'
label: 'Neos.Neos:Main:content'
controller: 'Neos\Neos\Ui\Controller\BackendController'
description: 'Neos.Neos:Modules:management.description'
icon: fas fa-file
mainStylesheet: 'Lite'

and this policy? it seems useless too (just tested without it):
'Neos\Neos\Security\Authorization\Privilege\ModulePrivilege':
'Neos.Neos.Ui:Backend.Module.Content':
matcher: 'content'

So why does the ui still work?

It works because neos/content is a subroute declared in:

-
name: 'Hostframe'
uriPattern: 'content'

which uses the Neos\Neos\Ui\Controller\BackendController and is now completely independent.

btw - the above linked controller in the module definition, will never be triggered that way.
We even could write gobbledygook and it would keep working:

      content:
        controller: 'Neos\Neos\Ui\Controller\FooBarBuzController'
  • why is the ui loaded up directly when only /neos is entered?

there is actually an backend module api for that see Neos.Neos.moduleConfiguration.preferredStartModules
odd is, that this is configured for the content module in Neos.Neos
https://github.com/neos/neos-development-collection/blob/f5c7fc03cb2c79a085940ac434b54acf30d5ac96/Neos.Neos/Configuration/Settings.yaml#L300

und nu?

how can we improve with this in our mind the module api for 3rd party modules and for the ui itself?

edit:

as it seems this is already an improved step from the beginning. A lot was done via: neos/neos-development-collection@e96889a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants