[MGNLUI-4473] Create content app based on content type Created: 16/Apr/18  Updated: 25/Jul/18  Resolved: 28/Jun/18

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0

Type: Story Priority: Neutral
Reporter: Christopher Zimmermann Assignee: Hieu Nguyen Duc
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 1.5h
Time Spent: 7d 0.5h
Original Estimate: Not Specified

Issue Links:
causality
is causing MGNLUI-4507 Update registered app upon updating c... Closed
dependency
is depended upon by MGNLCT-25 A chooser for a content type Open
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 foundation
Sprint: Saigon 148
Story Points: 8

 Description   

User story:

As a Business Analyst / Developer, I want Magnolia to create a content app based on a content type I have registered. I have already defined what type of content I am managing and what properties need to be captured. Don't make me repeat myself in app configuration, for example be needing to define which fieldtypes to use.

Acceptance criteria:

  • Developer can create a content app based on a registered content type.
    • Developer must still create an app definition - but this definition only needs to specify which content type it exposes. (ie the App definition could be just 2 lines.)
  • Developer must add the content app to the app launcher using the usual mechanisms.


 Comments   
Comment by Ngoc Nguyenthanh [ 27/Jun/18 ]
Usages
  • Define a content type: /contentTypes/stephen.yaml
  • Define a minimal app descriptor: /apps/stephen.yaml to connect with the content type in order to create a content app by automatically and support app decoration.
    • !with-type:stephen
      
  • Supports decorate generated App descriptor in the definition file. Other mechanisms works as usual.
    • !with-type:stephen
      label: Stephen App
Technical Detail
  • Defining a custom AppWithContentType Yaml construct in order to process the syntax: !with-type: {contenttype-name} within app descriptor file.
    • The construct will be triggered whenever an app descriptor is changed or read by current Magnolia implementation.
    • Detects the connected Content Type. Preparing data for app template.
  • Defining an app Yaml template by using FreeMarker syntax
    • Using Freemarker in order to support rendering app template with dynamic data from the content type.
    • Preparing for complicated scenarios when generating subapps with dynamic actions based on multiple node types.
    • Using the variable contentType to access connected content-type within the template.
    • See SimpleFreemarkerHelper for more detail.
  • CRUD
    • Create: Need to add the minimal app descriptor.
    • Delete:
      • Delete the content type and still keep the app descriptor: Error will be thrown
      • Delete the app descriptor: The generated app will be deleted.
      • Delete both: All thing should be cleared.
    • Update:
      • Changes in app descriptor: will be affected when a new app instance is initialized or reloaded.
      • Changes in content type: Need to trigger the app descriptor in order to make an effect on the app MGNLCT-43.
      • After the app descriptor is registered: Decoration should work as usual.
Comment by Dai Ha [ 03/Jul/18 ]

Verified at once with MGNLUI-4474

Generated at Mon Feb 12 09:16:57 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.