[MAGNOLIA-7343] Respect order of keys coming from decorators Created: 28/Jun/18 Updated: 04/Sep/18 Resolved: 09/Jul/18 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.7.1 |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Oanh Thai Hoang | Assignee: | Oanh Thai Hoang |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 5d 3h | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||
| 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: | |||||||||||||||||||||||||||||
| Sprint: | Saigon 148, Saigon 149 | ||||||||||||||||||||||||||||
| Story Points: | 3 | ||||||||||||||||||||||||||||
| Description |
|
Say, we want to decorate tours app and change order of path column in tree view. See attached example decorate-tour-example.zip
Output: orders of list and columns are no changes Expected output: |
| Comments |
| Comment by Mikaël Geljić [ 03/Jul/18 ] |
|
To validate primarily by overriding template values in the app descriptor enabled with the !with-type directive. Secondarily, I agree it should work with decoration as well, although maybe the order of content-views is not flexible enough |
| Comment by Dai Ha [ 13/Jul/18 ] |
Double checking with oanh.thai to see whether it's regression or unrelated issue. |
| Comment by Oanh Thai Hoang [ 16/Jul/18 ] |
|
dai.ha: Regarding your concern about case 02 and you use my my example in PR. This is not a bug. It works as expectation. The impressive thing is there are 2 modules decorated tours at your case: 1 is your and 1 is travel-demo-content-tags. And travel-demo-content-tags always apply decoration after your module. So the final decoration from travel is more important than yours. And problem come from decoration of search views. Travel-demo-content-tags does not declare property class in search view and your module is overrided search views and remove it already.
Just change your app config like and it will be fine
subApps:
browser:
workbench:
contentViews: !override
list: # we want to order list before tree
active: true
tree:
class: info.magnolia.ui.workbench.tree.TreePresenterDefinition
columns: !override # we want to override tree with new column path2 and order path before name
- name: path2 # create a new column formatter and want it to be the the first column
enabled: true
expandRatio: 2
formatterClass: info.magnolia.ui.workbench.column.PathColumnFormatter
class: info.magnolia.ui.workbench.column.definition.MetaDataColumnDefinition
- name: path # we want to order path before name
enabled: true
- name: name
search:
class: info.magnolia.ui.workbench.search.SearchPresenterDefinition
|
| Comment by Dai Ha [ 16/Jul/18 ] |
|
Closed as clarification is clear. |
| Comment by Christopher Zimmermann [ 23/Jul/18 ] |
|
I want to provide a simple example for docs. I think there are at least 2 important things to document concerning re-ordering.
Here is an example for point 2: This will reorder the columns of the tree. Decoration filename: /mymodule/decorations/tours/apps/tours.yaml
subApps:
browser:
workbench:
contentViews:
tree:
columns: !override
path:
name:
author:
moddate:
tags:
|