[MGNLCT-90] Too hard to reference items from stock content apps with CT Created: 24/Jan/19  Updated: 19/Feb/19  Resolved: 30/Jan/19

Status: Closed
Project: Content Types
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1

Type: Story Priority: Major
Reporter: Christopher Zimmermann Assignee: Sang Ngo Huu
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 3d
Time Spent: 1d
Original Estimate: 4d

Issue Links:
Cloners
is cloned by CONTEDIT-204 Migrate stories app to Content Type s... Closed
is cloned by MGNLDAM-777 Migrate assets app to Content Type su... Closed
is cloned by MGNLDEMO-306 Migrate tours app to Content Type sup... Closed
is cloned by PAGES-170 Migrate pages app to Content Type sup... Closed
causality
is causing MGNLCT-94 DOC: Some stock content apps now have... Closed
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)
Release notes required:
Yes
Documentation update required:
Yes
Date of First Response:
Epic Link: Content Types finalization
Sprint: Features 3
Story Points: 8

 Description   

As a developer or business analyst I want to easily add properties to my CT that reference the stock content apps, so that I can fulfull project requirements.

Acceptance Criteria

  • When a developer creates a CT that references a stock app, they need only to use the simple reference property and supply the name of the CT for that app.

Rationale:

  • Currently it confusing to link to stock apps, a developer must decorate the existing apps and create CT files.
  • It is a common use case.
  • Doing this has another important benefit which is making the content model of the stock Magnolia installation immediately clear and understandable.

 

Suggestion:

Convert the key stock content apps to have the contentType class so that they can be referenced:

  • Assets App
  • Categories app
  • Pages App
  • Stories App

And in the travel demo

  • Tours app

(But not the Contacts app. Because it is not commonly used in projects and is more of a demonstration.)

 

Note that all that is required is to change the class of the app, and add a contentType field.

And to create a simple CT so that referencing is possible. the CT for these apps does not need to include all of the properties. Something like this will suffice:

datasource:
  workspace: website


 Comments   
Comment by Sang Ngo Huu [ 24/Jan/19 ]

Comment from Mika:

[ So, exposing an existing app for referencing could be as "simple" as:

  1. Doing the "CT-retrofit" as above, in /<my-module>/contentTypes/<my-content-type>.yaml
    • (autoCreate is false by default anyway)
    • optionally specifying the model "parent" node-type if different from mgnl:content, or if the chooser shows too much
  2. Doing minimal changes in the content-app descriptor as well:
 
class: info.magnolia.ui.api.app.contenttypes.ContentTypeAppDescriptor
contentType: <my-content-type> 

Then LinkFieldFactory should have enough information then; if that works for our selected content apps, should be easy to add to CT docs too. ]

[ * From the Content Types workshop, the minimal "retrofit" content-type can be as small as:

 
datasource: 
  workspace: website 

—at least if the targeted content extends mgnl:content (worked for stories and/or pages).

  • Only remaining annoyance is that for these, we cannot guess the appName when pressing the select button; we should generalize the fallback logic from the find bar (find a suitable content app based on app registry lookup for JCR content connectors).
  • Once this is done, we can provide those retrofits for common magnolia modules. ]
Comment by Sang Ngo Huu [ 30/Jan/19 ]

Mark it done due to related tickets are done

Generated at Mon Feb 12 00:37:03 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.