Naming and organisation
All presenters must have start methods that return their view. They can take any number and types of arguments.
Sub apps are presenters and don't have to delegate everything to a child presenter.
Q: Do the sub apps have enough responsibility already? If so this separation actually makes sense.
A: We stick to having separate presenters to have a separation of responsibility.
Browser sub app
The browser is a workbench and an actionbar. Previously known as WorkbenchSubApp and containing a ContentWorkbench.
Classes related to the browser sub app should live in package info.magnolia.ui.contentapp.browser
Before | After |
---|---|
info.magnolia.ui.contentapp.workbench.ContentWorkbenchPresenter | info.magnolia.ui.contentapp.browser.BrowserPresenter |
info.magnolia.ui.contentapp.workbench.ContentWorkbenchView | info.magnolia.ui.contentapp.browser.BrowserView |
info.magnolia.ui.contentapp.workbench.ContentWorkbenchViewImpl | info.magnolia.ui.contentapp.browser.BrowserViewImpl |
info.magnolia.ui.contentapp.location.ContentLocation | info.magnolia.ui.contentapp.browser.BrowserLocation |
info.magnolia.ui.contentapp.ContentSubAppDescriptor | info.magnolia.ui.contentapp.browser.BrowserSubAppDescriptor |
info.magnolia.ui.contentapp.ConfiguredContentSubAppDescriptor | info.magnolia.ui.contentapp.browser.ConfiguredBrowserSubAppDescriptor |
info.magnolia.ui.contentapp.ContentSubApp | info.magnolia.ui.contentapp.browser.BrowserSubApp |
All sub apps named main or workbench that are browser sub apps should be renamed to browser, this includes their configuration nodes.
Detail sub app
The detail sub app is the previous item sub app.
Classes related to the browser sub app should live in package info.magnolia.ui.contentapp.detail
Before | After |
---|---|
info.magnolia.ui.contentapp.location.ItemLocation | info.magnolia.ui.contentapp.detail.DetailLocation |
info.magnolia.ui.contentapp.workbench.ItemWorkbenchPresenter | info.magnolia.ui.contentapp.detail.DetailEditorPresenter |
info.magnolia.ui.contentapp.workbench.ItemWorkbenchView | info.magnolia.ui.contentapp.detail.DetailEditorView |
info.magnolia.ui.contentapp.workbench.ItemWorkbenchViewImpl | info.magnolia.ui.contentapp.detail.DetailEditorViewImpl |
info.magnolia.ui.contentapp.ItemSubAppDescriptor | info.magnolia.ui.contentapp.detail.DetailSubAppDescriptor |
info.magnolia.ui.contentapp.ConfiguredItemSubAppDescriptor | info.magnolia.ui.contentapp.detail.ConfiguredDetailSubAppDescriptor |
info.magnolia.ui.contentapp.ItemSubApp | info.magnolia.ui.contentapp.detail.DetailSubApp |
info.magnolia.ui.contentapp.item.ItemPresenter | info.magnolia.ui.contentapp.detail.DetailPresenter |
info.magnolia.ui.contentapp.item.ItemView | info.magnolia.ui.contentapp.detail.DetailView |
info.magnolia.ui.contentapp.item.ItemViewImpl | info.magnolia.ui.contentapp.detail.DetailViewImpl |
info.magnolia.ui.contentapp.item.action.* | info.magnolia.ui.contentapp.detail.action.* |
All sub apps named item or editor that are detail sub apps should be renamed to detail, this includes their configuration nodes.
The intention going forward is to have view/preview of an item being a rendered representation of the item. Possibly using a freemarker template. This is out of scope for this concept.
Q: Does detail sub app need to have configurable views like workbench does?
A: We don't invest in this now. We leave it until we have properly defined how to present items in view mode.
Actions
Add support for configuring action availability (hide, disable) based on node type and/or role.
Workbench
Extract WorkbenchPresenter and WorkbenchView from the content app framework and place them in workbench module.
Views in workbench (ContentView) should be configurable
Metadata column is not needed and should be removed.
ContentViews should have dedicated presenters.
Rename displayInDialog to displayInChooseDialog
Q: What is a better name for ContentView?
A: We stick with ContentView.
New features and improvements
Simplify its use by losing the need to implement WorkbenchSubAppView in every content sub app and change its name to not contain the word workbench.
Setting theme should be done with a property in the app descriptor. No longer with an annotation. The annotation should be removed.
Views should not extend vaadin interfaces, see ContentWorkbenchView.
SubAppDescriptor should not have configuration of actions, actionbar and image provider. These should be on content sub app descriptors.
Configuration by code
Add support for passing arbitrary config objects to @App and @Dialog methods. For instance DAM module should be able to install support for passing a DamConfig. Possibly simply using IoC and taking objects by type from the ComponentProvider.
Methods annotated with @App and @Dialog should always return a definition or descriptor instead of being passes a builder.
Add support for configuring actions on content sub apps for the basic actions.
Add method on builder for adding everything related to supporting folders. I.e. app.supportFolders(). Should build the definition not set a property in the definition.