[BLOSSOM-322] Resolve Blossom dialog in template, to render content based on page/component model Created: 17/Nov/23  Updated: 11/Dec/23

Status: Open
Project: Blossom
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Story Priority: High
Reporter: Björn Eschle Assignee: Mikaël Geljić
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)

 Description   

e.g. to determine if a dialog field is i18n

Currently, Blossom dialogs are only "generated" if we're in an app, in the Admincentral.
However at rendering time, the registry returns an empty dialog.

Example code

@RequestMapping("/foo")
public String render(Model model, Node node) {
    var dialog = dialogRegistry.getProvider("acme:foo").get();
    var bar = dialog.getForm().getFieldDefinition("bar").get();
    if (bar.isI18n()) {
        model.put(...)
    }

    return "components/foo.ftl";
}

 

Original summary: Unnecessary/confusing legacy ConfiguredFormDialogDefinition creation

Hello,

Blossom is still providing the UI5 ConfiguredFormDialogDefinition in the BlossomDialogDefinitionProvider regardless whether UI5 or UI6 is used. It gets replaced by the DialogCreatorDefinitionDecorator anyway, but since other decorators might get triggered beforehand, they still get the old definition (without any form and properties in there). Can we move the creation of the definition from DialogCreatorDefinitionDecorator to BlossomDialogDefinitionProvider? Or is there any intention behind creating an unfinished legacy definition and then decorating it later on?



 Comments   
Comment by Björn Eschle [ 11/Dec/23 ]

Created a PR for this: https://git.magnolia-cms.com/projects/MODULES/repos/blossom/pull-requests/67/overview

Generated at Sun Feb 11 23:32:19 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.