<!-- 
RSS generated by JIRA (9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b) at Mon Feb 12 09:06:49 CET 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Magnolia - Issue tracker</title>
    <link>https://jira.magnolia-cms.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-uk</language>    <build-info>
        <version>9.4.2</version>
        <build-number>940002</build-number>
        <build-date>19-01-2023</build-date>
    </build-info>


<item>
            <title>[MGNLUI-3458] Backwards compatibility in DialogDefinitionRegistry and providers</title>
                <link>https://jira.magnolia-cms.com/browse/MGNLUI-3458</link>
                <project id="10625" key="MGNLUI">Magnolia UI</project>
                    <description>&lt;p&gt;Priority set to critical because it prevents using Blossom with 5.4.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Background&quot;&gt;&lt;/a&gt;Background&lt;/h4&gt;

&lt;p&gt;Blossom creates its dialogs on demand when they&apos;re needed. Every time a dialog is to be displayed its definition is created from scratch. This allows the dialog creation code to adapt to the current context, for instance who&apos;s using it and what content it is being used for. The context is captured by a custom FormDialogPresenter and picked up by the dialog provider. It is therefore impossible to get the definition of a blossom dialog without a context. The definition can only be acquired from the provider when called from the custom FormDialogPresenter.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Magnolia5.4&quot;&gt;&lt;/a&gt;Magnolia 5.4&lt;/h4&gt;

&lt;p&gt;In 5.4 the whole registry and provider concept changes. These changes break Blossom because:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;There&apos;s no longer a getPresenterClass() on the provider. It is instead read directly from the definition, which cannot be acquired. This is done in FormDialogPresenterFactoryImpl and in DialogDefinitionRegistry.&lt;/li&gt;
	&lt;li&gt;There&apos;s no way to register a legacy dialog definition provider. There needs to be a register() method in DialogDefintionRegistry for the legacy provider interface. The method should wrap the legacy interface to adapt it to the new interface. The new provider keeps an in memory representation of the definition which is acquired when the provider is created. This must not happen when registering a legacy provider.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;In 5.4 TemplateDefinitionRegistry has a backwards compatible register method. It works fine for Blossom because its template definitions are created once at startup and then never changed. Having said that, its design makes it impossible for implementations to have a provider that created the definition on demand.&lt;/p&gt;

&lt;p&gt;I have implemented very hackish workarounds for these issues and will commit them on branches. Should at least serve as some kind of example.&lt;/p&gt;</description>
                <environment></environment>
        <key id="45695">MGNLUI-3458</key>
            <summary>Backwards compatibility in DialogDefinitionRegistry and providers</summary>
                <type id="2" iconUrl="https://jira.magnolia-cms.com/secure/viewavatar?size=xsmall&amp;avatarId=10891&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="6" iconUrl="https://jira.magnolia-cms.com/images/icons/priorities/neutral.gif">Neutral</priority>
                        <status id="6" iconUrl="https://jira.magnolia-cms.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="gjoseph">Magnolia International</assignee>
                                    <reporter username="tmattsson">Tobias Mattsson</reporter>
                        <labels>
                            <label>blossom</label>
                            <label>config</label>
                            <label>dialog</label>
                    </labels>
                <created>Tue, 9 Jun 2015 13:22:18 +0200</created>
                <updated>Wed, 1 Jul 2015 16:51:25 +0200</updated>
                            <resolved>Fri, 26 Jun 2015 16:39:21 +0200</resolved>
                                    <version>5.4</version>
                                    <fixVersion>5.4</fixVersion>
                                    <component>dialogs</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="106104" author="mgeljic" created="Mon, 15 Jun 2015 17:38:17 +0200"  >&lt;p&gt;Linking to the related ticket in UI re: refactoring of the &lt;tt&gt;DialogDefinitionRegistry&lt;/tt&gt;.&lt;br/&gt;
Linking as well to the other introduced API change re: &lt;tt&gt;LocaleProvider&lt;/tt&gt;. We&apos;ll restore the interface here as well.&lt;/p&gt;</comment>
                            <comment id="106109" author="mgeljic" created="Mon, 15 Jun 2015 18:46:30 +0200"  >&lt;p&gt;pushed current progress respectively to branches:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;&lt;tt&gt;fix/DialogDefinitionRegistry-compatibility&lt;/tt&gt; (ui)&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;fix/LocaleProvider-compatibility&lt;/tt&gt; (main)
	&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
		&lt;li&gt;to be checked what we can do there, in particular because we&apos;d likely keep &lt;tt&gt;LocaleProvider&lt;/tt&gt; extending &lt;tt&gt;Provider&amp;lt;Locale&amp;gt;&lt;/tt&gt;&lt;/li&gt;
		&lt;li&gt;main blossom incompatibility seems to lie around &lt;tt&gt;MagnoliaMessageSource&lt;/tt&gt;;&lt;br/&gt;
backporting a &lt;tt&gt;FixedLocaleProvider&lt;/tt&gt; to 5.3 series could be an option (thus using it instead of the &lt;tt&gt;StaticLocaleProvider&lt;/tt&gt; in there)&lt;/li&gt;
		&lt;li&gt;to be checked as well: re-introduction of &lt;tt&gt;ContextLocaleProvider&lt;/tt&gt;&apos;s no-arg ctor.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="106123" author="tmattsson" created="Mon, 15 Jun 2015 22:49:40 +0200"  >&lt;p&gt;Regarding &lt;tt&gt;MagnoliaMessageSource&lt;/tt&gt; this would work in both 5.3 and 5.4 if &lt;tt&gt;LocaleProvider&lt;/tt&gt; remains an interface.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;class &lt;/span&gt;StaticLocaleProvider &lt;span class=&quot;code-keyword&quot;&gt;implements&lt;/span&gt; LocaleProvider {

    &lt;span class=&quot;code-keyword&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;final&lt;/span&gt; Locale locale;

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; StaticLocaleProvider(Locale locale) {
        &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;.locale = locale;
    }

    @Override
    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; Locale getLocale() {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; locale;
    }

    &lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; Locale get() {
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; getLocale();
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;As for &lt;tt&gt;ContextLocaleProvider&lt;/tt&gt; I could change the code to use &lt;tt&gt;ComponentProvider.newInstance&lt;/tt&gt; which would work in both 5.3 och 5.4. So that&apos;s not a problem.&lt;/p&gt;</comment>
                            <comment id="106124" author="tmattsson" created="Mon, 15 Jun 2015 23:32:38 +0200"  >&lt;p&gt;Regarding &lt;tt&gt;DialogDefinitionRegistry&lt;/tt&gt; I have now pushed my hackish workarounds on branch &lt;a href=&quot;https://jira.magnolia-cms.com/browse/MGNLUI-3458&quot; title=&quot;Backwards compatibility in DialogDefinitionRegistry and providers&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MGNLUI-3458&quot;&gt;&lt;del&gt;MGNLUI-3458&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://git.magnolia-cms.com/gitweb/?p=magnolia_ui.git;a=commit;h=74e55dd35e799a1dfa59fddbb832cd600b642d69&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.magnolia-cms.com/gitweb/?p=magnolia_ui.git;a=commit;h=74e55dd35e799a1dfa59fddbb832cd600b642d69&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It solves these problems:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Uses a custom provider implementation instead of using builders so it can be found behind wrappers in front of it.&lt;/li&gt;
	&lt;li&gt;The presenter class is acquired without getting the definition.&lt;/li&gt;
	&lt;li&gt;The custom provider doesn&apos;t keep a definition in memory, instead calls the legacy provider every time.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I know this hacks around the new design to reestablish the earlier design exactly. Hopefully we can find a more elegant solution.&lt;/p&gt;

&lt;p&gt;I&apos;m very curious to see how this behaves in the new tooling. Does it just break down horribly and burn to the ground? Maybe it should be presented using some kind of placeholder and the provider should return &lt;em&gt;that&lt;/em&gt; when called from anywhere but BlossomFormDialogPresenter.&lt;/p&gt;

&lt;p&gt;Mika could you give me some hints on how to test this with the tooling?&lt;/p&gt;</comment>
                            <comment id="107217" author="tmattsson" created="Fri, 26 Jun 2015 16:00:47 +0200"  >&lt;p&gt;I&apos;ve lowered the priority to neutral because after investigating this more I&apos;ve realized the best option is to do a Blossom 3.1 release for 5.4 which adopts the new API both for registries + providers and for locale provider.&lt;/p&gt;

&lt;p&gt;To fit the new registry api Blossom will return an empty dialog when not called from BlossomFormDialogPresenter. The definition returned then will have presenterClass set so it can be acquired safely.&lt;/p&gt;

&lt;p&gt;Created &lt;a href=&quot;https://jira.magnolia-cms.com/browse/BLOSSOM-214&quot; title=&quot;Adapt to changed LocaleProvider in Magnolia 5.4&quot; class=&quot;issue-link&quot; data-issue-key=&quot;BLOSSOM-214&quot;&gt;&lt;del&gt;BLOSSOM-214&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.magnolia-cms.com/browse/BLOSSOM-215&quot; title=&quot;Adapt to changes in template and dialog registries and providers in Magnolia 5.4&quot; class=&quot;issue-link&quot; data-issue-key=&quot;BLOSSOM-215&quot;&gt;&lt;del&gt;BLOSSOM-215&lt;/del&gt;&lt;/a&gt; for these changes.&lt;/p&gt;</comment>
                            <comment id="107227" author="gjoseph" created="Fri, 26 Jun 2015 16:38:19 +0200"  >&lt;p&gt;Merged in the &lt;tt&gt;fix/DialogDefinitionRegistry-compatibility&lt;/tt&gt; branch to provide a &quot;compatibility&quot; method in DialogRegistry, similar to what we did in TemplateRegistry.&lt;br/&gt;
Since Blossom is doing a new release, &lt;tt&gt;fix/LocaleProvider-compatibility&lt;/tt&gt; branch is not needed.&lt;/p&gt;</comment>
                            <comment id="107381" author="mmuehlebach" created="Mon, 29 Jun 2015 14:42:40 +0200"  >&lt;p&gt;The code for backward compatibility in DialogDefinitionRegistry and TemplateDefinitionRegistry could be improved because it is duplicated and uses assumptions about the definition Id we want to get rid of.&lt;br/&gt;
But as it is already deprecated code and will be removed soon it makes no sense to invest in it ...&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10040">
                    <name>causality</name>
                                                                <inwardlinks description="is causing">
                                        <issuelink>
            <issuekey id="45982">BLOSSOM-214</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="45983">BLOSSOM-215</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10010">
                    <name>relation</name>
                                            <outwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="42671">MGNLUI-3335</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="44901">MAGNOLIA-6203</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_14166" key="com.okapya.jira.checklist:checklist">
                        <customfieldname>Acceptance criteria</customfieldname>
                        <customfieldvalues>
                            
        <checklist>
        <![CDATA[
                            




                
                                    <div class="o-completion" style="display: flex; flex-shrink: 0;"><span  class="aui-lozenge aui-lozenge-complete" style="font-size: 12px; font-weight: normal; display: flex; flex-direction: row; align-items: center;" ><span style="padding-right: 4px; vertical-align: middle;"><svg width="15" height="15" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg" fill="white"><path clip-rule="evenodd" d="m10.41037,3.42544l-7.86501,0c-0.72395,0 -1.31084,0.58688 -1.31084,1.31084l0,7.86508c0,0.7239 0.58689,1.3108 1.31084,1.3108l7.86501,0c0.724,0 1.3109,-0.5869 1.3109,-1.3108l0,-7.86508c0,-0.72396 -0.5869,-1.31084 -1.3109,-1.31084zm-7.86501,-0.65542c-1.08593,0 -1.96626,0.88032 -1.96626,1.96626l0,7.86508c0,1.0859 0.88033,1.9662 1.96626,1.9662l7.86501,0c1.086,0 1.9663,-0.8803 1.9663,-1.9662l0,-7.86508c0,-1.08594 -0.8803,-1.96626 -1.9663,-1.96626l-7.86501,0z" fill-rule="evenodd"/><path d="m5.09049,10.18526l-1.82767,-1.82766l-0.78479,0.78479l2.61246,2.61246l5.38758,-5.38754l-0.78483,-0.78479l-4.60275,4.60274z"/></svg></span><span>Empty</span></span></div>
                        ]]>
    </checklist>


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10111" key="com.atlassian.jira.toolkit:reporterdomain">
                        <customfieldname>Company</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>gmail.com</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10031" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of First Response</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 15 Jun 2015 17:38:17 +0200</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_12730" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_14151" key="com.atlassian.jira.toolkit:message">
                        <customfieldname>Docu info</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10061" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comm is not jira-dev</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10071" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last participant</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>mmuehlebach</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_13136" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 33 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10020" key="com.atlassian.jira.toolkit:attachments">
                        <customfieldname>Number of attachments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10150" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname>Number of comments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>gjoseph</customfieldvalue>
            <customfieldvalue>mmuehlebach</customfieldvalue>
            <customfieldvalue>mgeljic</customfieldvalue>
            <customfieldvalue>tmattsson</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_10833" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i0511b:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10244" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14145" key="com.intenso.jira.issue-templates:issue-templates-customfield">
                        <customfieldname>Template</customfieldname>
                        <customfieldvalues>
                            


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_15131" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Time in Discovery</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time in Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>