[MGNLUI-5979] in 6.2.2 There is no preview for linkFields linking to assets as there was in M5UI. Created: 19/Jun/20 Updated: 20/Jan/21 Resolved: 10/Aug/20 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.2.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Christopher Zimmermann | Assignee: | Dai Ha |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 7.25d | ||
| 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)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Release notes required: |
Yes
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Documentation update required: |
Yes
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Epic Link: | M6 UI & UX Improvements | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | CM & OC 6, CM & OC 7, CM & OC 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Story Points: | 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
When a linkfield targets an asset it is a common requirement to show a preview of the linked asset, in the form itself. IN M5 we had this preview class: https://documentation.magnolia-cms.com/display/DOCS62/Link+field
|
| Comments |
| Comment by Christopher Zimmermann [ 22/Jun/20 ] |
|
5711 looks to be all about the Chooser. This is about a having a preview of an asset that can be used in the form itself. |
| Comment by Aleksandr Pchelintcev [ 02/Jul/20 ] |
|
DEV notes:
|
| Comment by Christopher Zimmermann [ 02/Jul/20 ] |
|
How would migrating MTK solve the issue? On m6 dialogs there is currently no way to have an asset preview. |
| Comment by Marek Lesiak [ 22/Jul/20 ] |
|
@Christopher Zimmermann Actually in 6.2.2 asset preview is somehow working. It is not perfect, but it displays at least something alongside many other properties... If we could only hide other properties from that preview. Please take a look at following definition:
link:
label: Select image
$type: linkField
chooser:
workbenchChooser:
appName: dam-chooser
preview:
implementationClass: info.magnolia.contacts.app.ContactPreview
To get it working you need `magnolia-contacts` dependency in your project. On the attached screen(not-ideal.png) you can see how it looks for my content app that is written in v6.2 style. So maybe asset preview could be written basing on `info.magnolia.contacts.app.ContactPreview`? |
| Comment by Dai Ha [ 23/Jul/20 ] |
|
a viet.nguyen, mlesiak,
This is how a link field to asset should look like, not just as simple as hiding properties from model to UI.
For `info.magnolia.contacts.app.ContactPreview`, it is one of simple implementation of PreviewComponent that is specific for contacts-app and will drag inappropriate dependency from contacts-app to custom modules. The current approach will introduce new preview components in DAM and not based on `info.magnolia.contacts.app.ContactPreview` |
| Comment by Marek Lesiak [ 23/Jul/20 ] |
|
@Dai Ha Great! That is what I was looking for from the beginnig. In what version can I expect that? =) |
| Comment by Christopher Zimmermann [ 28/Jul/20 ] |
|
Can you provide an example of the configuration for the new damLinkField and also for the regular linkField to have a preview? |
| Comment by Dai Ha [ 10/Aug/20 ] |
|
Hi czimmermann, a typical definition for damLinkField will be: damImage: label: Image from DAM $type: damLinkField and that was introduced by ui team before I had a chance to do the same thing info.magnolia.dam.app.field.DamLinkFieldDefinition it wraps a normal LinkFieldDefinition ** with components that more DAM related.
|
| Comment by Dai Ha [ 10/Aug/20 ] |
|
Hi mlesiak, the PRs went to UI 6.2.3, thank you |