[MGNLDAM-813] Integrate image media editor for new dam app Created: 25/Nov/19  Updated: 03/Jan/20  Resolved: 16/Dec/19

Status: Closed
Project: Magnolia DAM Module
Component/s: DAM App
Affects Version/s: None
Fix Version/s: 3.0

Type: Task Priority: Neutral
Reporter: Rishab Dhar Assignee: Rishab Dhar
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 4h 2m
Time Spent: 1.3h
Original Estimate: Not Specified

Attachments: PNG File image-2019-12-20-09-51-01-895.png    
Issue Links:
dependency
depends upon MGNLUI-5469 Migrate media editor to new UI Closed
documentation
to be documented by MGNLUI-5528 DOC: DAM upload field - 6 UI Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Documentation update required:
Yes
Date of First Response:
Sprint: UI Framework 11, UI Framework 12, UI Framework 13
Story Points: 8

 Description   
  • Goal of this integration is to check whether the extracted media editor module works for both old and new assets app.
  • The old assets app already had media editor integration so work is required in that direction.
  • The new assets app still has no implementation, so a PoC integration is created to test whether the media editor will work if integrated into the new assets app.

 

  • The media editor in new asset app should work as current (check against demo)
    • we need a new field
    • remove hardcoding of dialog
    • use new UI framework to create media editor dialog 
  • Non-image editing should not be possible
  • Fit-to-size should work only for larger images 


 Comments   
Comment by Rishab Dhar [ 29/Nov/19 ]

PoC works and was tested by Adam.

Since this is PoC the code will not be merged. However, integration of media editor with new Dam app can use the code from the pull request as a base.

Comment by Rishab Dhar [ 14/Dec/19 ]

Changes in the UI framework:

  • Expose UploadField instance fields for enabling testing in subclasses
  • Expose tempFileManager and updateThumbnailPreview to update
    the UploadField from subclasses
  • MGNLDAM-807 - Fixes bug related to GIF images not shown correctly
  • Uses SimpleTranslator to i18nize the UploadField labels and messages displayed to user
  • Fixes the incorrect icon for removing uploaded file like in the old App.
  • Fixes bug related to missing filtering of uploaded image by allowedMimeTypePattern in UploadField
  • Code refactoring for improving readability
Comment by Adam Siska [ 16/Dec/19 ]

Description of https://git.magnolia-cms.com/projects/MODULES/repos/dam/pull-requests/121

  • Add dependency to media editor in the new dam app
  • Custom DamUploadField for adding editing functionality (opening media editor) to default UploadField.
  • Disable media editor if mimeType of uploaded file does not match supported media editor MimeType
  • Add custom DamUploadField to subApp descriptor
  • Add Unit tests for DamUploadField
Comment by Adam Siska [ 20/Dec/19 ]

FInal QA:

1/ https://git.magnolia-cms.com/projects/MODULES/repos/dam/browse/magnolia-dam-app/src/main/java/info/magnolia/dam/app/field/DamUploadFieldDefinition.java#71 mime type pattern set for upload field is way too general, at least image/svg+xml files can't be edited, and trying that causes "ActionExecutionException: Action execution failed for action: view"

2/ icons are not exactly placed and have no hover effect (old UI left, new UI right):

 

EDIT: resolved
https://git.magnolia-cms.com/projects/MODULES/repos/dam/pull-requests/126/overview
https://git.magnolia-cms.com/projects/PLATFORM/repos/ui/pull-requests/1274/overview

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